Fix clash of gcc toolchains in hexagon driver regression tests.

If clang was configured with a custom gcc toolchain (either by using GCC_INSTALL_PREFIX in cmake or the equivalent configure command), the path to the custom gcc toolchain path takes precedence to the one specified by -ccc-install-dir. This causes several regression tests to fail as they will be using an unexpected path. Adding the switch --gcc-toolchain="" in each test command is not enough as the hexagon toolchain implementation in the driver is not evaluating this argument. This commit modifies the hexagon toolchain to take the --gcc-toolchain="" argument into account when deciding the toolchain path, similarly to what is already done for other targets toolchains. Additionally, the faulty regression tests are modified in order to --gcc-toolchain="" be passed to the commands.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221546 91177308-0d34-0410-b5e6-96231b3b80d8
Use @rpath for ASan dylib in Makefiles

Reviewed at http://reviews.llvm.org/D6176




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221557 91177308-0d34-0410-b5e6-96231b3b80d8
Introduce a SanitizerKind enum to LangOptions.

Use the bitmask to store the set of enabled sanitizers instead of a
bitfield. On the negative side, it makes syntax for querying the
set of enabled sanitizers a bit more clunky. On the positive side, we
will be able to use SanitizerKind to eventually implement the
new semantics for -fsanitize-recover= flag, that would allow us
to make some sanitizers recoverable, and some non-recoverable.

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221558 91177308-0d34-0410-b5e6-96231b3b80d8
ARM ABI: simplify decisions on whether args can be expanded.

Homogeneous aggregates on AAPCS_VFP ARM need to be passed *without* being
flattened (e.g. [2 x float] rather than "float, float") for various weird ABI
reasons. However, this isn't the case for anything else; further, we know at
the ABIArgInfo::getDirect callsites whether this flattening is allowed.

So, we can get more unified ARM code, with a simpler Clang, by just using that
knowledge directly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221559 91177308-0d34-0410-b5e6-96231b3b80d8
[Objective-C Sema]. Issue availability/deprecated warning when 
there is a uinque method found when message is sent to receiver 
of 'id' type. // rdar://18848183


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221562 91177308-0d34-0410-b5e6-96231b3b80d8
Fix unintended fallthrough in ASTReader

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221567 91177308-0d34-0410-b5e6-96231b3b80d8
Fixed a buildbot failure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221568 91177308-0d34-0410-b5e6-96231b3b80d8
Check module signature when the module has already been loaded

We may need to verify the signature on subsequent imports as well, just
like we verify the size/modtime:
@import A;
@import B; // imports A
@import C; // imports A

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221569 91177308-0d34-0410-b5e6-96231b3b80d8
[c++1z] N4295: fold-expressions.

This is a new form of expression of the form:

  (expr op ... op expr)

where one of the exprs is a parameter pack. It expands into

  (expr1 op (expr2onwards op ... op expr))

(and likewise if the pack is on the right). The non-pack operand can be
omitted; in that case, an empty pack gives a fallback value or an error,
depending on the operator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221573 91177308-0d34-0410-b5e6-96231b3b80d8
[c++1z] Implement nested-namespace-definitions.

This allows 'namespace A::B { ... }' as a shorthand for 'namespace A {
namespace B { ... } }'. We already supported this correctly for error recovery;
promote that support to a full implementation.

This is not the right implementation: we do not maintain source fidelity
because we desugar the nested namespace definition in the parser. This is
tricky to avoid, since the definition genuinely does inject one named
entity per level in the namespace name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221574 91177308-0d34-0410-b5e6-96231b3b80d8
[c++1z] Support for u8 character literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221576 91177308-0d34-0410-b5e6-96231b3b80d8
[c++1z] Support for attributes on namespaces and enumerators.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221580 91177308-0d34-0410-b5e6-96231b3b80d8
Updated the wording for a diagnostic to be more grammatically correct, and use a %select. Also ensure that nested namespace definitions are diagnosed properly. Both changes are motivated by post-commit feedback from r221580.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221581 91177308-0d34-0410-b5e6-96231b3b80d8
Missing testcase from r221581.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221582 91177308-0d34-0410-b5e6-96231b3b80d8
[Tooling] Restore current directory after processing each file.

Summary:
If we actually change directory before processing a file, we need to
restore it afterwards. This was broken in r216620.

Added a comment for the changes in r216620.

Reviewers: klimek

Reviewed By: klimek

Subscribers: klimek, cfe-commits

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221605 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Document that --assume-filename affects the language.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221606 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [Java] Never treat @interface as annotation.

'@' followed by any keyword can't be an annotation, but @interface is currently
the only combination of '@' and a keyword that's allowed, so limit it to this
case. `@interface Foo` without a leading `public` was misformatted prior to
this patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221607 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Fix pointer formatting.

Before:
  void f(Bar* a = nullptr, Bar * b);
After:
  void f(Bar* a = nullptr, Bar* b);

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