clang/test/Driver/qa_override.c: Resurrect a part of r187376. It still requires the feature 'clang-driver' for cygming.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187405 91177308-0d34-0410-b5e6-96231b3b80d8
Add MicrosoftVFTableContext to AST

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187409 91177308-0d34-0410-b5e6-96231b3b80d8
Replacing err_attribute_argument_not_int with err_attribute_not_type_attr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187419 91177308-0d34-0410-b5e6-96231b3b80d8
err_attribute_missing_parameter_name has been replaced by err_attribute_argument_type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187420 91177308-0d34-0410-b5e6-96231b3b80d8
Start keeping track of what work was done to detect a GCC installation
on the system, and report it when running the driver in verbose mode.
Without this it is essentially impossible to understand why a particular
GCC toolchain is used by Clang for libstdc++, libgcc, etc.

This also required threading a hook through the toolchain layers for
a specific toolchain implementation to print custom information under
'clang -v'. The naming here isn't spectacular. Suggestions welcome.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187427 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Improve detection of templates.

Before:
  template <typename... Types>
        typename enable_if < 0<sizeof...(Types)>::type Foo() {}
After:
  template <typename... Types>
  typename enable_if<0 < sizeof...(Types)>::type Foo() {}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187458 91177308-0d34-0410-b5e6-96231b3b80d8
Fix read of uninitialized enum value in test, caught by UBSan. No functionality
change, other than removal of undefined behavior.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187465 91177308-0d34-0410-b5e6-96231b3b80d8
Find a better compromise with the default library search paths used by
Clang when linking and using a GCC installation from a GCC
cross-compiler.

This was desired already by two special case platforms (Android and
Mips), and turns out to be generally (if frustratingly) true. I've added
a substantial comment to the code clarifying the underlying assumptions
of doing actual cross compiles with Clang (or GCC for that matter!) and
help avoid further confusion here.

The end result is to realize that fully general form of PR12478 cannot
be resolved while we support existing cross-compiling GCC toolchains,
and linking with them (namely, linking against their libgcc and
libstdc++ installs). GCC installs these target libraries under
a target-specific prefix but one that may not be available within the
actual sysroot in use. When linking in this world, GCC works and Clang
should as well, but caveat emptor: DSOs from this tree must be
replicated and rpath-fixed to be found at runtime within the sysroot.

I've extended the cross compile test cases to cover these issues by
pointing them at a sysroot and actually checking the library search
paths.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187466 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a crasher than manifests when typo correction suggests a function template.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187467 91177308-0d34-0410-b5e6-96231b3b80d8
Fixing an unused variable warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187474 91177308-0d34-0410-b5e6-96231b3b80d8
clang/test/Driver/cross-linux.c is suppressed on win32 for now. Investigating.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187483 91177308-0d34-0410-b5e6-96231b3b80d8
Re-enable the cross-linux test on windows after making it tolerant of
the path separator used when locating crtbegin.o.

I'll watch the bots to see if there are other issues lurking here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187486 91177308-0d34-0410-b5e6-96231b3b80d8
Try only two slashes as that seems to be working elsewhere in this
testcase.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187487 91177308-0d34-0410-b5e6-96231b3b80d8
Run an experiment to try to understand the windows failure better by
replacing one variable with the regex. This won't fix anything, but will
hopefully shed light on the nature of the failure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187488 91177308-0d34-0410-b5e6-96231b3b80d8
With help from chapuni on IRC, I think this is right now. =] The issue
is that the command is quoted differently from the arguments. The
command has '\' and the argument has '\\'. This is made unclear because
FileCheck escapes the single matched '\' when it prints the contents of
the variable, thus fooling me into thinking it had matched '\\' as
intended. The solution is to bind the gcc_install variable in the
argument list rather than out of the command. To do so we also have to
be a bit more careful so that we don't get stray other things into the
'.*' regex.

Also, because of the argument difference, '\\\\' is the correct
formulation before crtbegin, go back to that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187489 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187502 91177308-0d34-0410-b5e6-96231b3b80d8
ObjectiveC arc: Move check for type conversions in arc
out of ImpCastExprToType and to the caller site
as appropriate. This is in prep. to do more work for
// rdar://14569171 


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187503 91177308-0d34-0410-b5e6-96231b3b80d8
Improve the diagnostic experience, including adding recovery, for
changing '->' to '.' when there is no operator-> defined for a class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187504 91177308-0d34-0410-b5e6-96231b3b80d8
ObjectiveC arc: Introduce a new initialization kind
for parameters passed to CF audited functions
to be used for better diagnostics. Current set but
unused. // rdar://14569171


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187508 91177308-0d34-0410-b5e6-96231b3b80d8
Fix declaring class template methods with an attributed typedef

This change unifies the logic for template instantiation of methods and
functions declared with typedefs.

It ensures that SubstFunctionType() always fills the Params out param
with non-null ParmVarDecls or returns null.

Reviewers: rsmith

Differential Revision: http://llvm-reviews.chandlerc.com/D1135