Revert "Don't build invalid AST nodes during recovery"

This reverts commit r224451. It caused us to reject some valid existing
code.

This code appears to run in non-error cases as well as error cases. If
the scope of a DependentScopeDeclRefExpr is still incomplete it probably
means we still have more instantiation to do.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224526 91177308-0d34-0410-b5e6-96231b3b80d8
ModuleBuilder: assert that all deferred inline method defs get handled

While we're here, also move the declaration of DeferredInlineMethodDefinitions
closer to the other member vars and make it a SmallVector. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224533 91177308-0d34-0410-b5e6-96231b3b80d8
Objective-C. Provide group name for warning
on multiple selector names found during lookup.
rdar://19265296


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224536 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] Add check-asan-dynamic command to external compiler-rt setup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224545 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "Change -save-temps to emit unoptimized bitcode files."

This reverts commit r224503.

It broke compilation of fortran through the Clang driver. Previously
`clang -c t.f` would invoke `gcc t.f` and `clang -cc1as`, but now it
tries to call `clang -cc1 t.f` which fails for obvious reasons.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224546 91177308-0d34-0410-b5e6-96231b3b80d8
[c Sema]. Patch fixes pointer-bool-conversion warning on C code
when source range is incorrect causing the warning to be
issued when it should not because expression is in a macro.
rdar://19256338


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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224557 91177308-0d34-0410-b5e6-96231b3b80d8
Correct delayed typos in the operand to typeof expressions.

Fixes PR21947.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224558 91177308-0d34-0410-b5e6-96231b3b80d8
PR21969: Improve diagnostics for a conversion function that has any pieces of a
declared return type (including a trailing-return-type in C++14).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224561 91177308-0d34-0410-b5e6-96231b3b80d8
Fix layering violation, Lex shouldn't know about Decl

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224562 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizer] Get rid of parseArgument helper function. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224564 91177308-0d34-0410-b5e6-96231b3b80d8
Putting unevaluated expression warnings, and evaluated typeid warnings, under their own warning flags. Amends r224465.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224578 91177308-0d34-0410-b5e6-96231b3b80d8
Attributes accepting an EnumArgument are allowed to pass a string literal, or an identifier. VariadicEnumArguments now behave consistently instead of only accepting a string literal.

This change affects the only attribute accepting a variadic enumeration: callable_when.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224582 91177308-0d34-0410-b5e6-96231b3b80d8
Use ObjCMultipleMethodNames to match the option.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224585 91177308-0d34-0410-b5e6-96231b3b80d8
Fix an address space id reset with array decay's
implicit conversion. 

The issue was produced with OpenCL C code that 
called a function with a constant string literal
argument.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224592 91177308-0d34-0410-b5e6-96231b3b80d8
Added a fixit to remove empty parens from a C++11 attribute argument list when we diagnose this as an error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224595 91177308-0d34-0410-b5e6-96231b3b80d8
Allow to disable all sanitizers with "-fno-sanitize=all" option.

Summary:
This patch adds "all" sanitizer group. A shortcut "-fno-sanitize=all"
can be used to disable all sanitizers for a given source file.

"-fsanitize=all" option makes no sense, and will produce an error.

This group can also be useful when we add "-fsanitize-recover=<list>"
options (patch in http://reviews.llvm.org/D6302), as it would allow
to conveniently enable/disable recovery for all specified sanitizers.

Test Plan: regression test suite

Reviewers: kcc, rsmith

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D6733

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224596 91177308-0d34-0410-b5e6-96231b3b80d8
DR1048: drop top-level cv-qualifiers when deducing the return type of a
lambda-expression in C++11, to match the C++14 rules.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224620 91177308-0d34-0410-b5e6-96231b3b80d8
Tweak the assert in ModuleBuilder from r224533 (PR21989)

Turns out there will be left-over deferred inline methods if there have
been errors, because in that case HandleTopLevelDecl bails out early.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224649 91177308-0d34-0410-b5e6-96231b3b80d8
Don't drop attributes when checking explicit specializations.

Consider a template class with attributes on a method, and an explicit
specialization of that method:

    template <int>
    struct A {
      void foo() final;
    };

    template <>
    void A<0>::foo() {}

In this example, the attribute is `final`, but it might also be an
__attribute__((visibility("foo"))), noreturn, inline, etc. clang's current
behavior is to strip all attributes, which for some attributes is wrong
(the snippet above allows a subclass of A<0> to override the final method, for
example) and for others disagrees with gcc.

So stop dropping attributes. r95845 added this code without a test case, and
r176728 added the code for dropping attributes on parameters (with tests, but
they still pass).

As an additional wrinkle, do drop dllimport and dllexport, since that's how
these two attributes work. (This is covered by existing tests.)

Fixes PR21942.

The approach is by Richard Smith, initial analysis and typing was done by me.

With this, clang also matches GCC and EDG on all attributes Richard tested.


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