Граф коммитов

60145 Коммитов

Автор SHA1 Сообщение Дата
Chris Bieneman 2b01bc711b [CMake] Removing an unnecessary layer of variable indirection
This prevents passthrough variables from having values.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254642 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 19:47:25 +00:00
Devin Coughlin a2892f0167 [analyzer] Suppress stack address escape on CK_CopyAndAutoreleaseBlockObject.
Don't warn about addresses of stack-allocated blocks escaping if the block
region was cast with CK_CopyAndAutoreleaseBlockObject. These casts, which
are introduced in the implicit conversion operator for lambda-to-block
conversions, cause the block to be copied to the heap -- so the warning is
spurious.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254639 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 19:41:24 +00:00
George Burgess IV 13ef8dfe58 Add tests for pass_object_size.
These additions were meant to go in as a part of r254554; while it's
certainly nice to have new functionality, it's nicer if we have tests to
go with it. :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254632 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 19:19:09 +00:00
Nico Weber 795ba448be Fix Objective-C metadata for properties from class extensions after r251874
After, properties from class extensions no longer show up in
ObjCInterfaceDecl::properties().  Make ObjCCommonMac::EmitPropertyList()
explicitly look for properties in class extensions before looking at
direct properties.

Also add a test that passes both with clang before r251874 and after this
patch (but fails with r251874 and without this patch).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254622 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 17:44:51 +00:00
NAKAMURA Takumi 7c826426a6 Fix clang/test/Sema/struct-packed-align.c. "Windows" is not MS compiler.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254614 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 16:03:34 +00:00
Nico Weber 0f07251293 Make check-clang depend on LTO.
r249143 added test/Driver/darwin-ld-lto.c which requires libLTO.dylib
to pass, but when running `ninja check-clang` in a fresh build directory
nothing caused libLTO.dylib to be built and the test would fail.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254612 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 15:40:23 +00:00
Krzysztof Parzyszek 0d5853e96c Unxfail passing test: test/CodeGenCXX/crash.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254606 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 12:03:56 +00:00
Alexander Kornienko 769d8f4822 Revert "Fix for merging decls in pragma weak Calling CheckFunctionDeclaration so that 2 decls for the 'weak' are merged. Differential Revision: http://reviews.llvm.org/D13048"
This reverts commit r254143 which introduces a crash on the following input:
  f(char *);
  g(char *);
  #pragma weak f = g
  int g(char *p) {}


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254605 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 11:37:28 +00:00
Manuel Klimek 0267370b16 Add fall-back mode for clang tools.
Run without flags if we cannot load a compilation database. This matches
the behavior of clang itself when simply called with a source file.

Based on a patch by Russell Wallace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254599 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 10:38:53 +00:00
Alexey Bataev d50b8b580d [OPENMP 4.5] Parsing/sema support for 'omp taskloop simd' directive.
OpenMP 4.5 adds directive 'taskloop simd'. Patch adds parsing/sema analysis for 'taskloop simd' directive and its clauses.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254597 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 09:40:15 +00:00
Alexey Bataev 1f64d37106 PR25575: Make GCC 4.4+ comatible layout for packed bit-fileds of char type, patch by D. Polukhin
This CL is for discussion how to better fix bit-filed layout compatibility issue with GCC (see PR25575 for test case and more details). Current clang behavior is compatible with GCC 4.1-4.3 series but it was fixed in 4.4+. Ignoring packed attribute looks very odd and because it was also fixed in GCC 4.4+, it makes sense also fix it in clang.
Differential Revision: http://reviews.llvm.org/D14872


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254596 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 09:34:49 +00:00
Simon Pilgrim fafcf339e8 [X86] Stripped backend codegen tests
As discussed on the ml, backend tests need to be put in llvm/test/CodeGen/X86 as fast-isel tests using IR that is as close to what is generated here as possible.

The llvm tests will (re)added in a future commit

I will update PR24580 on this new plan

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254594 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 08:45:21 +00:00
Nico Weber 08e3bfe1f5 Fix a comment typo from r251874.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254579 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 02:25:26 +00:00
Sanjay Patel f8ea33a4e5 generalize CHECK lines to make buildbot happy
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254576 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 01:51:39 +00:00
Richard Smith 550a066d6e PR17381: Treat undefined behavior during expression evaluation as an unmodeled
side-effect, so that we don't allow speculative evaluation of such expressions
during code generation.

This caused a diagnostic quality regression, so fix constant expression
diagnostics to prefer either the first "can't be constant folded" diagnostic or
the first "not a constant expression" diagnostic depending on the kind of
evaluation we're doing. This was always the intent, but didn't quite work
correctly before.

This results in certain initializers that used to be constant initializers to
no longer be; in particular, things like:

  float f = 1e100;

are no longer accepted in C. This seems appropriate, as such constructs would
lead to code being executed if sanitizers are enabled.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254574 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 01:36:22 +00:00
Sanjay Patel a50dd2aa4c change an assert when generating fmuladd to an ordinary 'if' check (PR25719)
We don't want to generate fmuladd if there's a use of the fmul expression, but this shouldn't be an assert.

The test case is derived from the commit message for r253337:
http://reviews.llvm.org/rL253337

That commit reverted r253269:
http://reviews.llvm.org/rL253269

...but the bug exists independently of the default fp-contract setting. It just became easier to hit with that change.

PR25719:
https://llvm.org/bugs/show_bug.cgi?id=25719

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254573 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 01:25:12 +00:00
Sanjay Patel 82c87a4b94 fix typos; NFC
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254561 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 23:06:17 +00:00
George Burgess IV 7727f3dca1 Add the `pass_object_size` attribute to clang.
`pass_object_size` is our way of enabling `__builtin_object_size` to
produce high quality results without requiring inlining to happen
everywhere.

A link to the design doc for this attribute is available at the
Differential review link below.

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254554 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 21:58:08 +00:00
Sumanth Gundapaneni b08c74ee24 Fix the clang driver when "-nostdlib" is present
This patch is a fix to r252901 which changed the behavior of 
clang driver. In the presence of "-nostdlib" none of the standard
libraries should be passed to link line.

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254535 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 19:12:41 +00:00
Paul Robinson b5b6825778 Move _mm256_cvtps_ph and _mm256_cvtph_ps to immintrin.h.
This more closely matches their locations as described by Intel
documentation, and lets us remove a pair of redundant typedefs.

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254528 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 18:41:52 +00:00
Samuel Antao 29e517e070 [OpenMP] Update target directive codegen to use 4.5 implicit data mappings.
Summary:
This patch implements the 4.5 specification for the implicit data maps. OpenMP 4.5 specification changes the default way data is captured into a target region. All the non-aggregate kinds are passed by value by default. This required activating the capturing by value during SEMA for the target region. All the non-aggregate values that can be encoded in the size of a pointer are properly casted and forwarded to the runtime library. On top of fixing the previous weird behavior for mapping pointers in nested data regions (an explicit map was always required), this also improves performance as the number of allocations/transactions to the device per non-aggregate map are reduced from two to only one - instead of passing a reference and the value, only the value passed.

Explicit maps will be added later on once firstprivate, private, and map clauses' SEMA and parsing are available.

Reviewers: hfinkel, rjmccall, ABataev

Subscribers: cfe-commits, carlo.bertolli

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254521 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 17:44:43 +00:00
Aaron Ballman 294aa79c01 Making the deleted copy constructor parameter const; NFC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254520 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 17:07:30 +00:00
Aaron Ballman b5478a7e86 Add a narrowing AST matcher that matches on a FunctionDecl with a non-throwing exception specification.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254516 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 15:23:59 +00:00
Aaron Ballman c6a102dd24 Amending r254423 by deleting the copy constructor and adding a move constructor instead; NFC as neither of these constructors are currently called, but this is a safer design.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254515 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 15:05:47 +00:00
Daniel Jasper aae4b36509 Traverse the NestedNameSpecifier(Loc) of NamespaceAliasDecls.
Review: http://reviews.llvm.org/D15149

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254510 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 13:57:46 +00:00
Christof Douma 08458da4c9 Teaches clang about Cortex-A35.
Adds support for the new Cortex-A35 ARMv8-A core.

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254505 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 12:03:42 +00:00
NAKAMURA Takumi 0c05b8e2e5 clang/test/Driver/crash-report-modules.m: Avoid using /tmp/.
Temporary directories should be controlled with $LIT_PRESERVES_TMP.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254485 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 03:13:50 +00:00
Kostya Serebryany 9799057883 [sanitizer coverage] document -fsanitize-coverage=trace-bb
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254481 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 02:08:26 +00:00
Peter Collingbourne 2f3ff4374a docs: Add design documentation for forward-edge CFI for indirect calls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254464 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-01 21:58:54 +00:00
Adrian Prantl 2906aff3c8 Clang-format an 80-column violation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254455 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-01 20:19:44 +00:00
Adrian Prantl f27b57e998 Add an accessor to Decl::LoadedFieldsFromExternalStorage for LLDB.
Patch by Greg Clayton
Reviewed by Doug Gregor

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254451 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-01 19:54:07 +00:00
Rafael Espindola 2c1df8830d Update for llvm api change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254450 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-01 19:51:03 +00:00
Benjamin Kramer e69c871190 Avoid picking up system headers in unittest by providing a fake libstdc++ with a ridiculously high version number.
The host libstdc++ may be horribly broken and we want the fake one to be
picked up. This workaround is lame but I don't see a better way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254446 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-01 19:42:07 +00:00
David Majnemer 7ac6ada603 [MS ABI] Correctly mangle nullptr member pointers for variable templates
Variable templates behave the same as class templates with regard to
nullptr memeber pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254439 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-01 19:13:51 +00:00
Aaron Ballman 0d9cbd7a17 It appears that this horrible mutating copy constructor is unused. Kill it with fire.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254423 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-01 17:15:13 +00:00
Daniel Jasper c5e6fe85ed clang-format: Make it possible to turn off comment reflowing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254414 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-01 13:28:53 +00:00
Daniel Jasper b65b352ab0 clang-format: treat Q_SIGNALS as an access modifier
Patch by Alexander Richardson, thank you!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254407 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-01 12:05:04 +00:00
Daniel Jasper 7a775e201b This fixes https://llvm.org/bugs/show_bug.cgi?id=25329, as well as
misalignments like the following:

  int a, b = 2;
  int c    = 3;

Patch by Beren Minor, thanks!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254406 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-01 12:00:43 +00:00
Alexey Bataev fb742cf95e [OPENMP 4.5] Parsing/sema analysis for 'priority' clause.
OpenMP 4.5 defines new clause 'priority' for 'task', 'taskloop' and 'taskloop simd' directives. Added parsing and sema analysis for 'priority' clause in 'task' and 'taskloop' directives.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254398 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-01 10:17:31 +00:00
Gabor Horvath d69b791aec [analyzer] Fix IssueHash generation.
Differential Revision: http://reviews.llvm.org/D14919 

Original patch by: Gyorgy Orban!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254394 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-01 09:00:41 +00:00
Yaron Keren 7b3978365d Remove superfluous StringRef casts, NFC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254392 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-01 08:14:39 +00:00
Craig Topper b30ac9df8f [X86] Improve codegen for AVX2 gather with an all 1s mask.
Use undefined instead of setzero as the pass through input since its going to be fully overwritten. Use cmpeq of two zero vectors to produce the all 1s vector. Casting -1 to a double and vectorizing causes a constant load of a -1.0 floating point value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254389 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-01 07:12:59 +00:00
Alexey Bataev 3cddbb56a1 [OPENMP 4.5] Parsing/sema analysis for 'taskloop' directive.
Adds initial parsing and semantic analysis for 'taskloop' directive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254367 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-01 04:18:41 +00:00
Richard Smith 8ad3521b88 [modules] Don't reject multiple modules providing contents for the same embedded file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254365 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-01 03:32:49 +00:00
Richard Smith 8c57950603 Fix use-after-free when a C++ thread_local variable gets replaced (because its
type changes when the initializer is attached). Don't hold onto the
GlobalVariable*; recompute it from the VarDecl* instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254359 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-01 01:10:48 +00:00
NAKAMURA Takumi b1960e2b9c [PR25661] Revert part of r217213 according to r254323.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254346 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-30 23:46:32 +00:00
Kostya Serebryany bda2590b9a [libFuzzer] clarify the limitation of fsanitize-coverage=trace-cmp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254337 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-30 22:17:19 +00:00
David Majnemer e63176229a [MS Compat] Adjust thiscall to cdecl when deducing template arguments
Function types can be extracted from member pointer types.
However, the type is not appropriate without first adjusting the calling
convention.

This fixes PR25661.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254323 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-30 20:34:28 +00:00
Samuel Antao 34c87211f9 Add --gcc-toolchain= to one of the libclang unitests to fix issue related to
the gcc libraries clang picks for when it was configures with a user defined 
path.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254306 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-30 17:26:28 +00:00
Aaron Ballman f1e212a7a9 Do not crash when dumping the objc_bridge_related attribute when its optional arguments are not supplied.
Patch thanks to Joe Ranieri!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254303 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-30 15:25:34 +00:00