]> granicus.if.org Git - clang/log
clang
8 years agoClang support for __is_assignable intrinsic
David Majnemer [Mon, 23 May 2016 17:21:55 +0000 (17:21 +0000)]
Clang support for __is_assignable intrinsic

MSVC now supports the __is_assignable type trait intrinsic,
to enable easier and more efficient implementation of the
Standard Library's is_assignable trait.
As of Visual Studio 2015 Update 3, the VC Standard Library
implementation uses the new intrinsic unconditionally.

The implementation is pretty straightforward due to the previously
existing is_nothrow_assignable and is_trivially_assignable.
We handle __is_assignable via the same code as the other two except
that we skip the extra checks for nothrow or triviality.

Patch by Dave Bartolomeo!

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

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

8 years ago[MS ABI] Implement __declspec(empty_bases) and __declspec(layout_version)
David Majnemer [Mon, 23 May 2016 17:16:12 +0000 (17:16 +0000)]
[MS ABI] Implement __declspec(empty_bases) and __declspec(layout_version)

The layout_version attribute is pretty straightforward: use the layout
rules from version XYZ of MSVC when used like
struct __declspec(layout_version(XYZ)) S {};

The empty_bases attribute is more interesting.  It tries to get the C++
empty base optimization to fire more often by tweaking the MSVC ABI
rules in subtle ways:
1. Disable the leading and trailing zero-sized object flags if a class
   is marked __declspec(empty_bases) and is empty.

   This means that given:
   struct __declspec(empty_bases) A {};
   struct __declspec(empty_bases) B {};
   struct C : A, B {};

   'C' will have size 1 and nvsize 0 despite not being annotated
   __declspec(empty_bases).

2. When laying out virtual or non-virtual bases, disable the injection
   of padding between classes if the most derived class is marked
   __declspec(empty_bases).

   This means that given:
   struct A {};
   struct B {};
   struct __declspec(empty_bases) C : A, B {};

   'C' will have size 1 and nvsize 0.

3. When calculating the offset of a non-virtual base, choose offset zero
   if the most derived class is marked __declspec(empty_bases) and the
   base is empty _and_ has an nvsize of 0.

   Because of the ABI rules, this does not mean that empty bases
   reliably get placed at offset 0!

   For example:
   struct A {};
   struct B {};
   struct __declspec(empty_bases) C : A, B { virtual ~C(); };

   'C' will be pointer sized to account for the vfptr at offset 0.
   'A' and 'B' will _not_ be at offset 0 despite being empty!
   Instead, they will be located right after the vfptr.

   This occurs due to the interaction betweeen non-virtual base layout
   and virtual function pointer injection: injection occurs after the
   nv-bases and shifts them down by the size of a pointer.

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

8 years ago[clang][AVX512][Builtin] adding missing intrinsics for vpmultishiftqb{128|256|512...
Michael Zuckerman [Mon, 23 May 2016 15:04:39 +0000 (15:04 +0000)]
[clang][AVX512][Builtin] adding missing intrinsics for vpmultishiftqb{128|256|512} instruction set .

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

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

8 years agoTest commit
Jacob Baungard Hansen [Mon, 23 May 2016 13:12:29 +0000 (13:12 +0000)]
Test commit

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

8 years ago[Clang][AVX512][BUILTIN]adding missing intrinsics for movdaq instruction set
Michael Zuckerman [Mon, 23 May 2016 08:01:48 +0000 (08:01 +0000)]
[Clang][AVX512][BUILTIN]adding missing intrinsics for movdaq instruction set

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

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

8 years agoDriver: support exherbo's multiarch support
Saleem Abdulrasool [Mon, 23 May 2016 02:17:28 +0000 (02:17 +0000)]
Driver: support exherbo's multiarch support

Exherbo has an alternative file system layout to accommodate multiarch.  The
loader is located at /usr/${triple}/lib/${loader}.  Adjust the Linux toolchain
to support that on exherbo.

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

8 years agoFix typo in documentation comment.
Bob Wilson [Mon, 23 May 2016 01:52:50 +0000 (01:52 +0000)]
Fix typo in documentation comment.

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

8 years ago[driver][mips] Follow-up to r270373. Add missed folder.
Simon Atanasyan [Sun, 22 May 2016 22:06:19 +0000 (22:06 +0000)]
[driver][mips] Follow-up to r270373. Add missed folder.

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

8 years ago[driver][mips] clang-format the code. NFC
Simon Atanasyan [Sun, 22 May 2016 18:18:41 +0000 (18:18 +0000)]
[driver][mips] clang-format the code. NFC

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

8 years ago[driver][mips] Support new versions of MIPS CodeScape toolchains
Simon Atanasyan [Sun, 22 May 2016 18:18:07 +0000 (18:18 +0000)]
[driver][mips] Support new versions of MIPS CodeScape toolchains

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

8 years ago[driver][mips] Use target triple mips-mti-linux-gnu for toolchain detection
Simon Atanasyan [Sun, 22 May 2016 15:28:34 +0000 (15:28 +0000)]
[driver][mips] Use target triple mips-mti-linux-gnu for toolchain detection

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

8 years ago[driver][mips] Rename some variables to better reflect their purpose. NFC
Simon Atanasyan [Sun, 22 May 2016 15:27:58 +0000 (15:27 +0000)]
[driver][mips] Rename some variables to better reflect their purpose. NFC

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

8 years ago[driver][mips] Drop support for outdated version of CodeSourcery MIPS toolchain
Simon Atanasyan [Sun, 22 May 2016 15:27:36 +0000 (15:27 +0000)]
[driver][mips] Drop support for outdated version of CodeSourcery MIPS toolchain

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

8 years ago[AST] Cleanup comments regarding CXXRecordDecl::isEmpty
David Majnemer [Sun, 22 May 2016 05:34:26 +0000 (05:34 +0000)]
[AST] Cleanup comments regarding CXXRecordDecl::isEmpty

We were missing references to the standard, some of our home-grown
verbiage didn't make any sense.

No functional change is intended.

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

8 years agoDriver: sink getLinuxDynamicLoader into the Toolchain
Saleem Abdulrasool [Sun, 22 May 2016 03:12:19 +0000 (03:12 +0000)]
Driver: sink getLinuxDynamicLoader into the Toolchain

The parameter already requires the toolchain, sink the method into the class.
This also enables the use of the distro detection logic which will be needed to
support Exherbo's multiarch approach.

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

8 years agoDriver: simplify getDynameLinker
Saleem Abdulrasool [Sun, 22 May 2016 01:37:36 +0000 (01:37 +0000)]
Driver: simplify getDynameLinker

Convert the cascading if/else to a switch.  This makes it easier to follow the
logic.  Minor difference is that we no longer default to x86_64 but rather to
the architecture specified by the architecture.

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

8 years ago[X86][AVX] Ensure zero-extension of _mm256_extract_epi8 and _mm256_extract_epi16
Simon Pilgrim [Sat, 21 May 2016 21:14:35 +0000 (21:14 +0000)]
[X86][AVX] Ensure zero-extension of _mm256_extract_epi8 and _mm256_extract_epi16

Ensure _mm256_extract_epi8 and _mm256_extract_epi16 zero extend their i8/i16 result to i32. This matches _mm_extract_epi8 and _mm_extract_epi16.

Fix for PR27594

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

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

8 years agoUpdate -ffast-math documentation to match reality.
Justin Lebar [Fri, 20 May 2016 21:33:01 +0000 (21:33 +0000)]
Update -ffast-math documentation to match reality.

Reviewers: rsmith

Subscribers: cfe-commits

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

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

8 years ago[OpenCL] Add to_{global|local|private} builtin functions.
Yaxun Liu [Fri, 20 May 2016 19:54:38 +0000 (19:54 +0000)]
[OpenCL] Add to_{global|local|private} builtin functions.

OpenCL builtin functions to_{global|local|private} accepts argument of pointer type to arbitrary pointee type, and return a pointer to the same pointee type in different addr space, i.e.

global gentype *to_global(gentype *p);
It is not desirable to declare it as

global void *to_global(void *);
in opencl header file since it misses diagnostics.

This patch implements these builtin functions as Clang builtin functions. In the builtin def file they are defined to have signature void*(void*). When handling call expressions, their declarations are re-written to have correct parameter type and return type corresponding to the call argument.

In codegen call to addr void *to_addr(void*) is generated with addrcasts or bitcasts to facilitate implementation in builtin library.

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

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

8 years agoObjectiveC: canonicalize "kindof id" to "id".
Manman Ren [Fri, 20 May 2016 17:29:43 +0000 (17:29 +0000)]
ObjectiveC: canonicalize "kindof id" to "id".

There is no need to apply kindof on an unqualified id type.

rdar://24753825

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

8 years agoMake __FreeBSD_cc_version predefined macro configurable at build time
Dimitry Andric [Fri, 20 May 2016 17:27:22 +0000 (17:27 +0000)]
Make __FreeBSD_cc_version predefined macro configurable at build time

The `FreeBSDTargetInfo` class has always set the `__FreeBSD_cc_version`
predefined macro to a rather static value, calculated from the major OS
version.

In the FreeBSD base system, we will start incrementing the value of this
macro whenever we make any signifant change to clang, so we need a way
to configure the macro's value at build time.

Use `FREEBSD_CC_VERSION` for this, which we can define in the FreeBSD
build system using either the `-D` command line option, or an include
file.  Stock builds will keep the earlier value.

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

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

8 years ago[OpenCL] Allow explicit cast of 0 to event_t.
Yaxun Liu [Fri, 20 May 2016 17:18:16 +0000 (17:18 +0000)]
[OpenCL] Allow explicit cast of 0 to event_t.

Patch by Aaron Enye Shi.

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

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

8 years ago[X86][AVX] Added _mm256_testc_si256/_mm256_testnzc_si256/_mm256_testz_si256 tests
Simon Pilgrim [Fri, 20 May 2016 15:49:17 +0000 (15:49 +0000)]
[X86][AVX] Added _mm256_testc_si256/_mm256_testnzc_si256/_mm256_testz_si256 tests

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

8 years agoEliminate unnecessary file access checks in Clang driver on Windows
Adrian McCarthy [Fri, 20 May 2016 15:46:23 +0000 (15:46 +0000)]
Eliminate unnecessary file access checks in Clang driver on Windows

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

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

8 years agoAdd all the avx512 flavors to __builtin_cpu_supports's list.
Benjamin Kramer [Fri, 20 May 2016 15:21:08 +0000 (15:21 +0000)]
Add all the avx512 flavors to __builtin_cpu_supports's list.

This is matching what trunk gcc is accepting. Also adds a missing ssse3
case. PR27779. The amount of duplication here is annoying, maybe it
should be factored into a separate .def file?

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

8 years ago[Hexagon] Recognize "s" constraint in inline-asm
Krzysztof Parzyszek [Fri, 20 May 2016 13:50:32 +0000 (13:50 +0000)]
[Hexagon] Recognize "s" constraint in inline-asm

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

8 years ago[X86][AVX] Added _mm256_extract_epi64 test
Simon Pilgrim [Fri, 20 May 2016 12:57:21 +0000 (12:57 +0000)]
[X86][AVX] Added _mm256_extract_epi64 test

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

8 years ago[X86][AVX] Full set of AVX intrinsics tests
Simon Pilgrim [Fri, 20 May 2016 12:41:02 +0000 (12:41 +0000)]
[X86][AVX] Full set of AVX intrinsics tests

llvm/test/CodeGen/X86/avx-intrinsics-fast-isel.ll will be synced to this

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

8 years agoclang-format: [JS] sort ES6 imports.
Martin Probst [Fri, 20 May 2016 11:24:24 +0000 (11:24 +0000)]
clang-format: [JS] sort ES6 imports.

Summary:
This change automatically sorts ES6 imports and exports into four groups:
absolute imports, parent imports, relative imports, and then exports. Exports
are sorted in the same order, but not grouped further.

To keep JS import sorting out of Format.cpp, this required extracting the
TokenAnalyzer infrastructure to separate header and implementation files.

Reviewers: djasper

Subscribers: cfe-commits, klimek

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

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

8 years agoclang-format: [JS] Treat "for" as a reserved word after a ".".
Daniel Jasper [Fri, 20 May 2016 06:16:01 +0000 (06:16 +0000)]
clang-format: [JS] Treat "for" as a reserved word after a ".".

Otherwise, clang-format can get confused with statements like:

  x.for = 1;

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

8 years agoCodeGen: address -Wcast-qual warning
Saleem Abdulrasool [Fri, 20 May 2016 03:58:12 +0000 (03:58 +0000)]
CodeGen: address -Wcast-qual warning

Add a const_cast rather than the C-style cast.  NFC.

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

8 years agoRe-alphabetize this file list.
Richard Smith [Fri, 20 May 2016 01:07:10 +0000 (01:07 +0000)]
Re-alphabetize this file list.

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

8 years agoRevert incorrect module map changes in r269907 and replace them with the
Richard Smith [Fri, 20 May 2016 01:06:47 +0000 (01:06 +0000)]
Revert incorrect module map changes in r269907 and replace them with the
appropriate changes.

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

8 years agoAvoid depending on test inputes that aren't in Inputs
Reid Kleckner [Fri, 20 May 2016 00:38:25 +0000 (00:38 +0000)]
Avoid depending on test inputes that aren't in Inputs

Some people have weird CI systems that run each test subdirectory
independently without access to other parallel trees.

Unfortunately, this means we have to suffer some duplication until Art
can sort out how to share these types.

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

8 years ago[Lexer] Don't merge macro args from different macro files
Vedant Kumar [Thu, 19 May 2016 23:44:02 +0000 (23:44 +0000)]
[Lexer] Don't merge macro args from different macro files

The lexer sets the end location of macro arguments incorrectly *if*,
while merging consecutive args to fit into a single SLocEntry, it finds
args which come from different macro files.

Fix the issue by using separate SLocEntries in this situation.

This fixes a code coverage crasher (rdar://problem/26181005). Because
the lexer reported end locations for certain macro args incorrectly, we
would generate bogus coverage mappings with negative line offsets.

Reviewed-by: akyrtzi
Differential Revision: http://reviews.llvm.org/D20401

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

8 years ago[analyzer] Fix for PR23790 : constrain return value of strcmp() rather than returning...
Anton Yartsev [Thu, 19 May 2016 23:03:49 +0000 (23:03 +0000)]
[analyzer] Fix for PR23790 : constrain return value of strcmp() rather than returning a concrete value.

The function strcmp() can return any value, not just {-1,0,1} : "The strcmp(const char *s1, const char *s2) function returns an integer greater than, equal to, or less than zero, accordingly as the string pointed to by s1 is greater than, equal to, or less than the string pointed to by s2." [C11 7.24.4.2p3]
https://llvm.org/bugs/show_bug.cgi?id=23790
http://reviews.llvm.org/D16317

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

8 years ago[CUDA] Implement __ldg using intrinsics.
Justin Lebar [Thu, 19 May 2016 22:49:13 +0000 (22:49 +0000)]
[CUDA] Implement __ldg using intrinsics.

Summary:
Previously it was implemented as inline asm in the CUDA headers.

This change allows us to use the [addr+imm] addressing mode when
executing ld.global.nc instructions.  This translates into a 1.3x
speedup on some benchmarks that call this instruction from within an
unrolled loop.

Reviewers: tra, rsmith

Subscribers: jhen, cfe-commits, jholewinski

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

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

8 years ago[Sema] Fix use after move. Found by ubsan.
Benjamin Kramer [Thu, 19 May 2016 21:53:33 +0000 (21:53 +0000)]
[Sema] Fix use after move. Found by ubsan.

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

8 years ago[CUDA] Do not allow non-empty destructors for global device-side variables.
Artem Belevich [Thu, 19 May 2016 20:13:53 +0000 (20:13 +0000)]
[CUDA] Do not allow non-empty destructors for global device-side variables.

According to Cuda Programming guide (v7.5, E2.3.1):
> __device__, __constant__ and __shared__ variables defined in namespace
> scope, that are of class type, cannot have a non-empty constructor or a
> non-empty destructor.

Clang already deals with device-side constructors (see D15305).
This patch enforces similar rules for destructors.

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

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

8 years ago[CUDA] Split device-var-init.cu tests into separate Sema and CodeGen parts.
Artem Belevich [Thu, 19 May 2016 20:13:39 +0000 (20:13 +0000)]
[CUDA] Split device-var-init.cu tests into separate Sema and CodeGen parts.

Codegen tests for device-side variable initialization are subset of test
cases used to verify Sema's part of the job.
Including CodeGenCUDA/device-var-init.cu from SemaCUDA makes it easier to
keep both sides in sync.

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

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

8 years ago[CUDA] Enable fusing FP ops (-ffp-contract=fast) for CUDA by default.
Artem Belevich [Thu, 19 May 2016 18:44:45 +0000 (18:44 +0000)]
[CUDA] Enable fusing FP ops (-ffp-contract=fast) for CUDA by default.

This matches default nvcc behavior and gives substantial
performance boost on GPU where fmad is much cheaper compared to add+mul.

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

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

8 years ago[MS ABI] Ignore transparent contexts when determining the effective context
David Majnemer [Thu, 19 May 2016 18:15:53 +0000 (18:15 +0000)]
[MS ABI] Ignore transparent contexts when determining the effective context

We didn't skip over extern "C++" contexts, causing us to mangle things
which don't need to be mangled.

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

8 years agoCheck for nullptr argument.
Artem Belevich [Thu, 19 May 2016 18:00:18 +0000 (18:00 +0000)]
Check for nullptr argument.

Addresses static analysis report in PR15492.

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

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

8 years agoDon't rely on value numbers in test, those are fragile and change in Release (no...
Benjamin Kramer [Thu, 19 May 2016 17:57:35 +0000 (17:57 +0000)]
Don't rely on value numbers in test, those are fragile and change in Release (no asserts) builds.

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

8 years ago[CUDA] Allow sm_50,52,53 GPUs
Artem Belevich [Thu, 19 May 2016 17:47:47 +0000 (17:47 +0000)]
[CUDA] Allow sm_50,52,53 GPUs

LLVM accepts them since r233575.

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

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

8 years ago[X86][SSE] Sync with llvm/test/CodeGen/X86/sse-intrinsics-fast-isel.ll
Simon Pilgrim [Thu, 19 May 2016 17:11:31 +0000 (17:11 +0000)]
[X86][SSE] Sync with llvm/test/CodeGen/X86/sse-intrinsics-fast-isel.ll

sse-builtins.c now just covers SSE1 intrinsics

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

8 years ago[X86][SSE2] Fixed shuffle of results in _mm_cmpnge_sd/_mm_cmpngt_sd tests
Simon Pilgrim [Thu, 19 May 2016 16:48:59 +0000 (16:48 +0000)]
[X86][SSE2] Fixed shuffle of results in _mm_cmpnge_sd/_mm_cmpngt_sd tests

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

8 years ago[driver] Do not pass install dir to the MultilibSet include dirs callback
Simon Atanasyan [Thu, 19 May 2016 15:07:21 +0000 (15:07 +0000)]
[driver] Do not pass install dir to the MultilibSet include dirs callback

All additional include directories are relative to the toolchain install
folder. So let's do not pass this folder to each callback to simplify
and slightly reduce the code.

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

8 years ago[driver] Do not pass target triple to the MultilibSet include dirs callback
Simon Atanasyan [Thu, 19 May 2016 15:07:00 +0000 (15:07 +0000)]
[driver] Do not pass target triple to the MultilibSet include dirs callback

No one callback uses target triple so we can escape passing the unused
argument.

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

8 years ago[driver][mips] Hardcode triple name in case of CodeSourcery toolchain. NFC
Simon Atanasyan [Thu, 19 May 2016 15:05:22 +0000 (15:05 +0000)]
[driver][mips] Hardcode triple name in case of CodeSourcery toolchain. NFC

CodeSourcery toolchain is a standalone toolchain which always uses
the same triple name in its paths. It is independent from target
triple used by the driver.

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

8 years ago[ARM] Fix cdp intrinsic
Ranjeet Singh [Thu, 19 May 2016 13:04:34 +0000 (13:04 +0000)]
[ARM] Fix cdp intrinsic

- Fixed cdp intrinsic to only accept compile time
  constant values previously you could pass in a
  variable to the builtin which would result in
  illegal llvm assembly output

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

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

8 years ago[Clang][AVX512][intrinsics] continue completing missing set intrinsics
Michael Zuckerman [Thu, 19 May 2016 12:07:49 +0000 (12:07 +0000)]
[Clang][AVX512][intrinsics] continue completing missing set intrinsics

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

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

8 years ago[X86][SSE2] Added _mm_move_* tests
Simon Pilgrim [Thu, 19 May 2016 11:18:49 +0000 (11:18 +0000)]
[X86][SSE2] Added _mm_move_* tests

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

8 years ago[X86][SSE2] Added _mm_cast* and _mm_set* tests
Simon Pilgrim [Thu, 19 May 2016 11:03:48 +0000 (11:03 +0000)]
[X86][SSE2] Added _mm_cast* and _mm_set* tests

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

8 years ago[Sema] Allow an external sema source to handle delayed typo corrections.
Benjamin Kramer [Thu, 19 May 2016 10:46:10 +0000 (10:46 +0000)]
[Sema] Allow an external sema source to handle delayed typo corrections.

This probably isn't perfectly perfect but allows correcting function calls
again.

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

8 years ago[X86][SSE2] Sync with llvm/test/CodeGen/X86/sse2-intrinsics-fast-isel.ll
Simon Pilgrim [Thu, 19 May 2016 09:52:59 +0000 (09:52 +0000)]
[X86][SSE2] Sync with llvm/test/CodeGen/X86/sse2-intrinsics-fast-isel.ll

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

8 years agoclang-format: [JS] Fix spacing in destructuring assignments.
Daniel Jasper [Thu, 19 May 2016 07:18:07 +0000 (07:18 +0000)]
clang-format: [JS] Fix spacing in destructuring assignments.

Before:
  const[a, b, c] = [1, 2, 3];

After:
  const [a, b, c] = [1, 2, 3];

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

8 years agoclang-format: Fix incorrect indentation in last line of macro definition
Daniel Jasper [Thu, 19 May 2016 06:30:48 +0000 (06:30 +0000)]
clang-format: Fix incorrect indentation in last line of macro definition

Before:
  #define MACRO(a) \
    if (a) {       \
      f();         \
    } else         \
    g()

After:
  #define MACRO(a) \
    if (a) {       \
      f();         \
    } else         \
      g()

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

8 years agoclang-format: Fix enumerator case ranges.
Daniel Jasper [Thu, 19 May 2016 06:19:17 +0000 (06:19 +0000)]
clang-format: Fix enumerator case ranges.

Before:
  case a... b: break;

After:
  case a ... b: break;

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

8 years agoReapply^3 "[ProfileData] (clang) Use Error in InstrProf and Coverage, NFC"
Vedant Kumar [Thu, 19 May 2016 03:54:54 +0000 (03:54 +0000)]
Reapply^3 "[ProfileData] (clang) Use Error in InstrProf and Coverage, NFC"

Sync up with "(llvm) Use Error in InstrProf and Coverage".

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

8 years agoFix PR27601 by reverting [r267453] - Refactor traversal of bases in deduction of...
Faisal Vali [Thu, 19 May 2016 02:28:21 +0000 (02:28 +0000)]
Fix PR27601 by reverting [r267453] - Refactor traversal of bases in deduction of template parameters from base

This reversal is being done with r267453's author's (i.e. Richard Smith's) permission.

This fixes https://llvm.org/bugs/show_bug.cgi?id=27601

Also, per Richard's request the examples from the bug report have been added to our test suite.

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

8 years agoRevert accidentally-committed test for PR27558 (which currently fails...)
Richard Smith [Thu, 19 May 2016 01:41:52 +0000 (01:41 +0000)]
Revert accidentally-committed test for PR27558 (which currently fails...)

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

8 years agoMake Sema::getPrintingPolicy less ridiculously expensive. This used to perform
Richard Smith [Thu, 19 May 2016 01:39:10 +0000 (01:39 +0000)]
Make Sema::getPrintingPolicy less ridiculously expensive. This used to perform
an identifier table lookup, *and* copy the LangOptions (including various
std::vector<std::string>s). Twice. We call this function once each time we start
parsing a declaration specifier sequence, and once for each call to Sema::Diag.

This reduces the compile time for a sample .c file from the linux kernel by 20%.

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

8 years agoFix a funny Dvorak typo.
Rafael Espindola [Thu, 19 May 2016 00:16:09 +0000 (00:16 +0000)]
Fix a funny Dvorak typo.

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

8 years agoUpdate for llvm change.
Rafael Espindola [Wed, 18 May 2016 22:04:57 +0000 (22:04 +0000)]
Update for llvm change.

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

8 years agoRevert r269967 (SSE2 builtin checks) due to failed buildbots
Simon Pilgrim [Wed, 18 May 2016 18:22:20 +0000 (18:22 +0000)]
Revert r269967 (SSE2 builtin checks) due to failed buildbots

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

8 years agoObjectiveC Class Properties: warn if a class property accessor is mistakenly an
Manman Ren [Wed, 18 May 2016 18:12:34 +0000 (18:12 +0000)]
ObjectiveC Class Properties: warn if a class property accessor is mistakenly an
instance method.

When diagnosing unimplemented class property, make sure we emit
a warning when we only see an instance method with the right selector.

Also warn when we only see a class method for an instance property.

rdar://26141719

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

8 years ago[X86][SSE2] Sync with llvm/test/CodeGen/X86/sse2-intrinsics-fast-isel.ll
Simon Pilgrim [Wed, 18 May 2016 18:12:34 +0000 (18:12 +0000)]
[X86][SSE2] Sync with llvm/test/CodeGen/X86/sse2-intrinsics-fast-isel.ll

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

8 years ago[Driver] Fix the case when use -fembed-bitcode and -flto= together
Steven Wu [Wed, 18 May 2016 17:04:52 +0000 (17:04 +0000)]
[Driver] Fix the case when use -fembed-bitcode and -flto= together

Summary:
-fembed-bitcode was only checking for old style LTO flag (-flto) but not
considering the new -flto= style option. That makes clang output bitcode
embedded in bitcode object when using -flto= and -fembed-bitcode= together.
Now clang should output normal bitcode file when using LTO and ignores
-fembed-bitcode option.

Reviewers: joker.eph

Subscribers: joker.eph, cfe-commits

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

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

8 years ago[ASTMacther] A follow-up on unresolvedLookupExpr test fixing.
Haojian Wu [Wed, 18 May 2016 16:48:44 +0000 (16:48 +0000)]
[ASTMacther] A follow-up on unresolvedLookupExpr test fixing.

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

8 years ago[PS4] Clean up some test commentary. NFC
Paul Robinson [Wed, 18 May 2016 15:35:58 +0000 (15:35 +0000)]
[PS4] Clean up some test commentary. NFC

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

8 years ago[Clang][AVX512] completing missing intrinsics [pandnd].
Michael Zuckerman [Wed, 18 May 2016 15:25:53 +0000 (15:25 +0000)]
[Clang][AVX512] completing missing intrinsics [pandnd].

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

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

8 years ago[ASTMatcher] Fix a ASTMatcher test failure on Windows.
Haojian Wu [Wed, 18 May 2016 15:15:12 +0000 (15:15 +0000)]
[ASTMatcher] Fix a ASTMatcher test failure on Windows.

Reviewers: alexfh, aaron.ballman

Subscribers: thakis, cfe-commits, klimek

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

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

8 years agoTeach Sema::MergeFunctionDecl to properly check for an out-of-line definition of...
Vassil Vassilev [Wed, 18 May 2016 15:14:46 +0000 (15:14 +0000)]
Teach Sema::MergeFunctionDecl to properly check for an out-of-line definition of a function that is declared as =default in its class definition.

First part of PR27699.

Patch by Cristina Cristescu!

Reviewed by Richard Smith and me.

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

8 years ago[Hexagon] Recognize "q" and "v" in inline-asm as register constraints
Krzysztof Parzyszek [Wed, 18 May 2016 14:56:14 +0000 (14:56 +0000)]
[Hexagon] Recognize "q" and "v" in inline-asm as register constraints

Clang follow-up to r269933.

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

8 years agoRemoved duplicate SSE42 builtin tests from avx-builtins.c
Simon Pilgrim [Wed, 18 May 2016 14:32:16 +0000 (14:32 +0000)]
Removed duplicate SSE42 builtin tests from avx-builtins.c

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

8 years ago[X86][SSE42] Sync with llvm/test/CodeGen/X86/sse42-intrinsics-fast-isel.ll
Simon Pilgrim [Wed, 18 May 2016 14:29:55 +0000 (14:29 +0000)]
[X86][SSE42] Sync with llvm/test/CodeGen/X86/sse42-intrinsics-fast-isel.ll

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

8 years ago[X86][SSE41] Sync with llvm/test/CodeGen/X86/sse41-intrinsics-fast-isel.ll
Simon Pilgrim [Wed, 18 May 2016 13:47:16 +0000 (13:47 +0000)]
[X86][SSE41] Sync with llvm/test/CodeGen/X86/sse41-intrinsics-fast-isel.ll

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

8 years ago[clang-format] Make formatReplacements() also sort #includes.
Eric Liu [Wed, 18 May 2016 13:43:48 +0000 (13:43 +0000)]
[clang-format] Make formatReplacements() also sort #includes.

Summary: [clang-format] Make formatReplacements() also sort #includes.

Reviewers: bkramer, djasper

Subscribers: klimek, cfe-commits

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

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

8 years ago[X86][SSE3] Sync with llvm/test/CodeGen/X86/sse3-intrinsics-fast-isel.ll
Simon Pilgrim [Wed, 18 May 2016 13:17:39 +0000 (13:17 +0000)]
[X86][SSE3] Sync with llvm/test/CodeGen/X86/sse3-intrinsics-fast-isel.ll

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

8 years ago[ASTMatcher] Add a node matcher for UnresolvedLookupExpr.
Haojian Wu [Wed, 18 May 2016 12:53:59 +0000 (12:53 +0000)]
[ASTMatcher] Add a node matcher for UnresolvedLookupExpr.

Reviewers: alexfh, aaron.ballman

Subscribers: aaron.ballman, klimek, cfe-commits

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

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

8 years ago[Mips] Finetuning MIPS32 Android default variants
Petar Jovanovic [Wed, 18 May 2016 12:46:06 +0000 (12:46 +0000)]
[Mips] Finetuning MIPS32 Android default variants

MIPS32 Android defaults to FPXX ("-fpxx").
MIPS32R6 Android defaults to FP64A ("-mfp64 -mno-odd-spreg").

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

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

8 years agoUpdate for llvm change.
Rafael Espindola [Wed, 18 May 2016 11:58:56 +0000 (11:58 +0000)]
Update for llvm change.

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

8 years agoAdd new intrinsic support for MONITORX and MWAITX instructions
Ashutosh Nema [Wed, 18 May 2016 11:56:23 +0000 (11:56 +0000)]
Add new intrinsic support for MONITORX and MWAITX instructions

Summary:
MONITORX/MWAITX instructions provide similar capability to the MONITOR/MWAIT
pair while adding a timer function, such that another termination of the MWAITX
instruction occurs when the timer expires. The presence of the MONITORX and
MWAITX instructions is indicated by CPUID 8000_0001, ECX, bit 29.

The MONITORX and MWAITX instructions are intercepted by the same bits that
intercept MONITOR and MWAIT. MONITORX instruction establishes a range to be
monitored. MWAITX instruction causes the processor to stop instruction
execution and enter an implementation-dependent optimized state until
occurrence of a class of events.

Opcode of MONITORX instruction is "0F 01 FA". Opcode of MWAITX instruction is
"0F 01 FB". These opcode information is used in adding tests for the
disassembler.

These instructions are enabled for AMD's bdver4 architecture.

Patch by Ganesh Gopalasubramanian!

Reviewers: echristo, craig.topper

Subscribers: RKSimon, joker.eph, llvm-commits, cfe-commits

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

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

8 years agoSupport for MSVS default calling convention options (/Gd, /Gz, /Gv,
Alexey Bataev [Wed, 18 May 2016 09:06:38 +0000 (09:06 +0000)]
Support for MSVS default calling convention options (/Gd, /Gz, /Gv,
/Gr), by Alexander Makarov

Patch for bug #27711
Differential Revision: http://reviews.llvm.org/D20171

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

8 years ago[clang-format] Make FormatTokenLess::operator() const.
Eric Liu [Wed, 18 May 2016 08:14:49 +0000 (08:14 +0000)]
[clang-format] Make FormatTokenLess::operator() const.

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

8 years agoMake clang-format cleaner remove redundant commas in list and redundant colon in...
Eric Liu [Wed, 18 May 2016 08:02:56 +0000 (08:02 +0000)]
Make clang-format cleaner remove redundant commas in list and redundant colon in constructor initializer.

Summary: Make clang-format cleaner remove redundant commas/colons in constructor initializer list.

Reviewers: klimek, djasper

Subscribers: cfe-commits, klimek

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

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

8 years agoVarious improvements to the public IRGen interface.
John McCall [Wed, 18 May 2016 05:21:18 +0000 (05:21 +0000)]
Various improvements to the public IRGen interface.

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

8 years ago[Sema,CodeGen] Remove comment from SemaChecking about a builtin_shufflevector form...
Craig Topper [Wed, 18 May 2016 04:11:25 +0000 (04:11 +0000)]
[Sema,CodeGen] Remove comment from SemaChecking about a builtin_shufflevector form that it doesn't support. Remove CodeGen support for the same form since it could never have been used due to the missing support in Sema.

I couldn't find any documentation that this form existed either. Nor is there documentation for one of the remaining two forms, but there is a testcase that uses it.

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

8 years ago[X86] Add immediate range checks for many of the builtins.
Craig Topper [Wed, 18 May 2016 03:18:12 +0000 (03:18 +0000)]
[X86] Add immediate range checks for many of the builtins.

This time allow -128 to 255 for builtins that use a char type immediate."

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

8 years agoFix use-after-free ASan failures for modules / PCH files that deserialize abi_tag...
Richard Smith [Wed, 18 May 2016 00:16:51 +0000 (00:16 +0000)]
Fix use-after-free ASan failures for modules / PCH files that deserialize abi_tag or no_sanitize attributes.

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

8 years agoPR27754: CXXRecordDecl::data() needs to perform an update even if it's called
Richard Smith [Tue, 17 May 2016 22:44:15 +0000 (22:44 +0000)]
PR27754: CXXRecordDecl::data() needs to perform an update even if it's called
on a declaration that already knows the location of the DefinitionData object.

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

8 years ago[X86][SSE] Tidied up MMX/SSE/SSE2 builtin tests to the correct test file
Simon Pilgrim [Tue, 17 May 2016 22:03:31 +0000 (22:03 +0000)]
[X86][SSE] Tidied up MMX/SSE/SSE2 builtin tests to the correct test file

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

8 years agoRevert r269717. That change alone did not provide the intended benefit (which
Richard Smith [Tue, 17 May 2016 21:48:41 +0000 (21:48 +0000)]
Revert r269717. That change alone did not provide the intended benefit (which
would come from changing the type of ASTContext::DeclAttrs from
DenseMap<Decl*,AttrVec*> to DenseMap<Decl*,AttrVec>), and it turns out to be
impractical to avoid the allocation there, because we expose the address of the
attribute vector in ways that are hard to fix.

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

8 years agoDividied ASTMatcherTests into 4 files
Piotr Padlewski [Tue, 17 May 2016 19:22:57 +0000 (19:22 +0000)]
Dividied ASTMatcherTests into 4 files

fix for long compilation [20061]
http://reviews.llvm.org/D20210

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

8 years agoTeach clang to look for libcxx in /usr/local/include/c++ on Linux
Yaron Keren [Tue, 17 May 2016 19:01:16 +0000 (19:01 +0000)]
Teach clang to look for libcxx in /usr/local/include/c++ on Linux

As The default CMAKE install prefix is /usr/local ( https://cmake.org/cmake/help/v3.0/variable/CMAKE_INSTALL_PREFIX.html ),
sudo ninja install ends up installing clang, LLVM and libcxx under /usr/local.
In development scenario, when clang is run from the build location it will not
find libcxx at neither (build location)/../include/c++ nor /usr/include/c++.
This patch lets development clang find system installed libcxx without adding
-isystem /usr/local/include/c++. Also addresses the FIXME by explaining the
use-case for these include paths.

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

8 years agoNFC: simplify logic.
Manman Ren [Tue, 17 May 2016 18:04:38 +0000 (18:04 +0000)]
NFC: simplify logic.

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

8 years agoFix line numbers in calling convention test
Reid Kleckner [Tue, 17 May 2016 17:33:31 +0000 (17:33 +0000)]
Fix line numbers in calling convention test

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

8 years agoFix calling convention test
Reid Kleckner [Tue, 17 May 2016 16:54:40 +0000 (16:54 +0000)]
Fix calling convention test

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

8 years agoTentatively enable -Wcast-calling-convention by default
Reid Kleckner [Tue, 17 May 2016 16:50:45 +0000 (16:50 +0000)]
Tentatively enable -Wcast-calling-convention by default

In Chrome, this would have found two true positives around CreateThread
if we hadn't already fixed them while rolling out ASan. We didn't get
any other hits in Chrome. I'm curious to hear if this warning finds
anything in other projects.

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