Only build ARM-specific runtimes if ARM is enabled

The soft-float variants of (embedded) libclang_rt only make sense for ARM, so
there's no point in trying to build them if the compiler is only capable of
targeting x86.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197033 91177308-0d34-0410-b5e6-96231b3b80d8
Modules: Let -fmodules-decluse ignore headers that aren't in a module

Includes might always pull in arbitrary header or data files outside of
modules. Among others, this includes builtin includes, which do not have
a module (story) yet.

Also cleanup implementation of ModuleMap::findModuleForHeader() to be
non-recursive.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197034 91177308-0d34-0410-b5e6-96231b3b80d8
Add file missing from r197034.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197035 91177308-0d34-0410-b5e6-96231b3b80d8
Add front-end infrastructure now address space casts are in LLVM IR.

With the introduction of explicit address space casts into LLVM, there's
a need to provide a new cast kind the front-end can create for C/OpenCL/CUDA
and code to produce address space casts from those kinds when appropriate.

Patch by Michele Scandale!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197036 91177308-0d34-0410-b5e6-96231b3b80d8
Add comment about PragmaIntroducerKind

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197043 91177308-0d34-0410-b5e6-96231b3b80d8
Better diagnostic for static override when methods are thiscall by default

Methods are thiscall by default in the MS ABI, and also in MinGW targetting GCC 4.7 or later.

This changes the diagnostic from the technically correct but hard to understand:

  virtual function 'foo' has different calling convention attributes ('void ()') than the function it overrides (which has calling convention 'void () __attribute__((thiscall))')

to the more intuitive and also correct:

  'static' member function 'foo' overrides a virtual function

We already have a test for this. Let's just run it in both ABI modes.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197055 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Add checker callbacks for MemberExpr and UnaryExprOrTypeTraitExpr.

Found by Arthur Yoo!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197059 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-cxxabi] Fix linkage of dtor thunks for anonymous classes

We were mistakengly giving linkonce_odr linkage instead of internal
linkage to the deleting and complete destructor thunks for classes in
anonymous namespaces.

Fixes PR17273.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197060 91177308-0d34-0410-b5e6-96231b3b80d8
[AArch64] Refactor the NEON scalar floating-point reciprocal estimate, floating-
point reciprocal exponent, and floating-point reciprocal square root estimate
LLVM AArch64 intrinsics to use f32/f64 types, rather than their vector
equivalents.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197069 91177308-0d34-0410-b5e6-96231b3b80d8
[AArch64] Refactor the NEON scalar floating-point reciprocal step and
floating-point reciprocal square root step LLVM AArch64 intrinsics to
use f32/f64 types, rather than their vector equivalents.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197070 91177308-0d34-0410-b5e6-96231b3b80d8
[AArch64] Add NEON scalar floating-point compare LLVM AArch64 intrinsics that
use f32/f64 types, rather than their vector equivalents.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197071 91177308-0d34-0410-b5e6-96231b3b80d8
[objcmt] When whitelisting the headers we want to modify, allow changing the
the ObjC implementation declarations, just don't change implementations for
classes that are not in the whitelisted headers.

For example, if we change a method to return 'instancetype' we should also
update the method definition in the implementation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197075 91177308-0d34-0410-b5e6-96231b3b80d8
[objcmt] When emitting a remap file, use a json format with the edit entries, instead of applying the changes
to a temp file directly.

This allows to combine the edits when they can be different based on whether you saw
the implementation or not, e.g. with the designated initializer migration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197076 91177308-0d34-0410-b5e6-96231b3b80d8
Revert r197043, not a good comment

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197077 91177308-0d34-0410-b5e6-96231b3b80d8
No longer accepting attribute spellings with prefix and suffix underscores except for GNU attributes, or C++11-style attributes in the GNU namespace. This prevents attributes such as __declspec(__dllexport__) or [[__noreturn__]] from being treated as known attributes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197082 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-abi][cleanup] Removing FinalizeCXXLayout : no functional change

After r196549 there is no need to separate FinalizeCXXLayout and 
FinalizeLayout so they were merged and FinalizeCXXLayout was eliminated.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197083 91177308-0d34-0410-b5e6-96231b3b80d8
Remove extra qualification to fix build with g++ after r197076

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197086 91177308-0d34-0410-b5e6-96231b3b80d8
[AArch64] Refactor NEON floating-point Max/Min/Maxnm/Minnm across vector AArch64
intrinsics to use f32 types, rather than their vector equivalents.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197091 91177308-0d34-0410-b5e6-96231b3b80d8
Change semantics of regex expectations in the diagnostic verifier

Previously, a line like

  // expected-error-re {{foo}}

treats the entirety of foo as a regex. This is inconvenient when matching type
names containing regex characters. For example, to match
"void *(class test8::A::*)(void)" inside such a regex, one would have to type
"void \*\(class test8::A::\*\)\(void\)".

This patch changes the semantics of expected-error-re to only treat the parts
of the directive wrapped in double curly braces as regexes. This avoids the
escaping problem and leads to nicer patterns for those cases; see e.g. the
change to test/Sema/format-strings-scanf.c.

(The balanced search for closing }} of a directive also makes us handle the
full directive in test\SemaCXX\constexpr-printing.cpp:41 and :53.)

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197092 91177308-0d34-0410-b5e6-96231b3b80d8
Add new PrintingPolicy entry to trim number of newlines.  Useful for the CFG printer.

The change isn't completely comprehensive.  This can be filled in
lazily as needed.  There is one consumer right now.

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