]> granicus.if.org Git - clang/log
clang
8 years ago[AST] ArrayRef-ize CompoundStmt::setStmts.
Craig Topper [Fri, 4 Dec 2015 05:01:44 +0000 (05:01 +0000)]
[AST] ArrayRef-ize CompoundStmt::setStmts.

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

8 years ago[analyzer] Support inlining lambda-converted blocks.
Devin Coughlin [Fri, 4 Dec 2015 05:00:36 +0000 (05:00 +0000)]
[analyzer] Support inlining lambda-converted blocks.

clang converts C++ lambdas to blocks with an implicit user-defined conversion
operator method on the lambda record. This method returns a block that captures a copy
of the lambda. To inline a lambda-converted block, the analyzer now calls the lambda
records's call operator method on the lambda captured by the block.

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

8 years agoDon't assert if evaluation of an expression that we're syntactically required
Richard Smith [Fri, 4 Dec 2015 03:00:44 +0000 (03:00 +0000)]
Don't assert if evaluation of an expression that we're syntactically required
to treat as an ICE results in undefined behavior. Instead, return the "natural"
result of the operation (signed wraparound / inf / nan).

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

8 years agoLLDB JIT needs android vector passing rules.
Stephen Hines [Fri, 4 Dec 2015 01:39:30 +0000 (01:39 +0000)]
LLDB JIT needs android vector passing rules.

Summary:
Looking into some recent issues with LLDBs expression parser highlighted that upstream clang passes vectors types differently to Android Open Source Project's clang for Arm Android targets.
This patch reflects the changes present in the AOSP and allows LLDB's JIT expression evaluation to work correctly for Arm Android targets when passing vectors.

This is submitted with consent of the original author Stephen Hines.

Reviewers: asl, rsmith, ADodds, rnk

Subscribers: rnk, aemerson, tberghammer, danalbert, srhines, cfe-commits, pirama

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

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

8 years ago[Docs] Sanitizer docs migrated from code.google.com to github.com.
Alexey Samsonov [Fri, 4 Dec 2015 00:38:13 +0000 (00:38 +0000)]
[Docs] Sanitizer docs migrated from code.google.com to github.com.

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

8 years ago[PowerPC] Fix calculating address of arguments on stack for variadic func
Petar Jovanovic [Fri, 4 Dec 2015 00:26:47 +0000 (00:26 +0000)]
[PowerPC] Fix calculating address of arguments on stack for variadic func

Fix calculating address of arguments larger than 32 bit on stack for
variadic functions (rounding up address to alignment) on ppc32 architecture.

Patch by Strahinja Petrovic.

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

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

8 years agoPR25731: namespace alias declarations can appear at block scope; ensure that we
Richard Smith [Thu, 3 Dec 2015 23:24:04 +0000 (23:24 +0000)]
PR25731: namespace alias declarations can appear at block scope; ensure that we
do scope-based lookup when looking for redeclarations of them. Add some related
missing checks for the scope-based redeclaration lookup: properly filter the
list of found declarations to match the scope, and diagnose shadowing of a
template parameter name.

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

8 years agoFix pass_object_size test on Windows.
George Burgess IV [Thu, 3 Dec 2015 21:15:22 +0000 (21:15 +0000)]
Fix pass_object_size test on Windows.

The tests were failing because the types of some member functions, when
printed, unexpectedly had "__attribute__((thiscall))" at the end. The
types in question were relatively unimportant to begin with, so they
were removed/replaced with regexes.

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

8 years agoAdd tests for `&enable_if_function` diagnostics.
George Burgess IV [Thu, 3 Dec 2015 20:54:58 +0000 (20:54 +0000)]
Add tests for `&enable_if_function` diagnostics.

The introduction of pass_object_size fixed a few bugs related to taking
the address of a function with enable_if attributes. This patch adds
tests for the cases that were fixed.

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

8 years ago[CMake] Removing an unnecessary layer of variable indirection
Chris Bieneman [Thu, 3 Dec 2015 19:47:25 +0000 (19:47 +0000)]
[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

8 years ago[analyzer] Suppress stack address escape on CK_CopyAndAutoreleaseBlockObject.
Devin Coughlin [Thu, 3 Dec 2015 19:41:24 +0000 (19:41 +0000)]
[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

8 years agoAdd tests for pass_object_size.
George Burgess IV [Thu, 3 Dec 2015 19:19:09 +0000 (19:19 +0000)]
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

8 years agoFix Objective-C metadata for properties from class extensions after r251874
Nico Weber [Thu, 3 Dec 2015 17:44:51 +0000 (17:44 +0000)]
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

8 years agoFix clang/test/Sema/struct-packed-align.c. "Windows" is not MS compiler.
NAKAMURA Takumi [Thu, 3 Dec 2015 16:03:34 +0000 (16:03 +0000)]
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

8 years agoMake check-clang depend on LTO.
Nico Weber [Thu, 3 Dec 2015 15:40:23 +0000 (15:40 +0000)]
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

8 years agoUnxfail passing test: test/CodeGenCXX/crash.cpp
Krzysztof Parzyszek [Thu, 3 Dec 2015 12:03:56 +0000 (12:03 +0000)]
Unxfail passing test: test/CodeGenCXX/crash.cpp

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

8 years agoRevert "Fix for merging decls in pragma weak Calling CheckFunctionDeclaration so...
Alexander Kornienko [Thu, 3 Dec 2015 11:37:28 +0000 (11:37 +0000)]
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

8 years agoAdd fall-back mode for clang tools.
Manuel Klimek [Thu, 3 Dec 2015 10:38:53 +0000 (10:38 +0000)]
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

8 years ago[OPENMP 4.5] Parsing/sema support for 'omp taskloop simd' directive.
Alexey Bataev [Thu, 3 Dec 2015 09:40:15 +0000 (09:40 +0000)]
[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

8 years agoPR25575: Make GCC 4.4+ comatible layout for packed bit-fileds of char type, patch...
Alexey Bataev [Thu, 3 Dec 2015 09:34:49 +0000 (09:34 +0000)]
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

8 years ago[X86] Stripped backend codegen tests
Simon Pilgrim [Thu, 3 Dec 2015 08:45:21 +0000 (08:45 +0000)]
[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

8 years agoFix a comment typo from r251874.
Nico Weber [Thu, 3 Dec 2015 02:25:26 +0000 (02:25 +0000)]
Fix a comment typo from r251874.

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

8 years agogeneralize CHECK lines to make buildbot happy
Sanjay Patel [Thu, 3 Dec 2015 01:51:39 +0000 (01:51 +0000)]
generalize CHECK lines to make buildbot happy

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

8 years agoPR17381: Treat undefined behavior during expression evaluation as an unmodeled
Richard Smith [Thu, 3 Dec 2015 01:36:22 +0000 (01:36 +0000)]
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

8 years agochange an assert when generating fmuladd to an ordinary 'if' check (PR25719)
Sanjay Patel [Thu, 3 Dec 2015 01:25:12 +0000 (01:25 +0000)]
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

8 years agofix typos; NFC
Sanjay Patel [Wed, 2 Dec 2015 23:06:17 +0000 (23:06 +0000)]
fix typos; NFC

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

8 years agoAdd the `pass_object_size` attribute to clang.
George Burgess IV [Wed, 2 Dec 2015 21:58:08 +0000 (21:58 +0000)]
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

8 years agoFix the clang driver when "-nostdlib" is present
Sumanth Gundapaneni [Wed, 2 Dec 2015 19:12:41 +0000 (19:12 +0000)]
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

8 years agoMove _mm256_cvtps_ph and _mm256_cvtph_ps to immintrin.h.
Paul Robinson [Wed, 2 Dec 2015 18:41:52 +0000 (18:41 +0000)]
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

8 years ago[OpenMP] Update target directive codegen to use 4.5 implicit data mappings.
Samuel Antao [Wed, 2 Dec 2015 17:44:43 +0000 (17:44 +0000)]
[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

8 years agoMaking the deleted copy constructor parameter const; NFC.
Aaron Ballman [Wed, 2 Dec 2015 17:07:30 +0000 (17:07 +0000)]
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

8 years agoAdd a narrowing AST matcher that matches on a FunctionDecl with a non-throwing except...
Aaron Ballman [Wed, 2 Dec 2015 15:23:59 +0000 (15:23 +0000)]
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

8 years agoAmending r254423 by deleting the copy constructor and adding a move constructor inste...
Aaron Ballman [Wed, 2 Dec 2015 15:05:47 +0000 (15:05 +0000)]
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

8 years agoTraverse the NestedNameSpecifier(Loc) of NamespaceAliasDecls.
Daniel Jasper [Wed, 2 Dec 2015 13:57:46 +0000 (13:57 +0000)]
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

8 years agoTeaches clang about Cortex-A35.
Christof Douma [Wed, 2 Dec 2015 12:03:42 +0000 (12:03 +0000)]
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

8 years agoclang/test/Driver/crash-report-modules.m: Avoid using /tmp/.
NAKAMURA Takumi [Wed, 2 Dec 2015 03:13:50 +0000 (03:13 +0000)]
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

8 years ago[sanitizer coverage] document -fsanitize-coverage=trace-bb
Kostya Serebryany [Wed, 2 Dec 2015 02:08:26 +0000 (02:08 +0000)]
[sanitizer coverage] document -fsanitize-coverage=trace-bb

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

8 years agodocs: Add design documentation for forward-edge CFI for indirect calls.
Peter Collingbourne [Tue, 1 Dec 2015 21:58:54 +0000 (21:58 +0000)]
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

8 years agoClang-format an 80-column violation.
Adrian Prantl [Tue, 1 Dec 2015 20:19:44 +0000 (20:19 +0000)]
Clang-format an 80-column violation.

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

8 years agoAdd an accessor to Decl::LoadedFieldsFromExternalStorage for LLDB.
Adrian Prantl [Tue, 1 Dec 2015 19:54:07 +0000 (19:54 +0000)]
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

8 years agoUpdate for llvm api change.
Rafael Espindola [Tue, 1 Dec 2015 19:51:03 +0000 (19:51 +0000)]
Update for llvm api change.

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

8 years agoAvoid picking up system headers in unittest by providing a fake libstdc++ with a...
Benjamin Kramer [Tue, 1 Dec 2015 19:42:07 +0000 (19:42 +0000)]
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

8 years ago[MS ABI] Correctly mangle nullptr member pointers for variable templates
David Majnemer [Tue, 1 Dec 2015 19:13:51 +0000 (19:13 +0000)]
[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

8 years agoIt appears that this horrible mutating copy constructor is unused. Kill it with fire.
Aaron Ballman [Tue, 1 Dec 2015 17:15:13 +0000 (17:15 +0000)]
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

8 years agoclang-format: Make it possible to turn off comment reflowing.
Daniel Jasper [Tue, 1 Dec 2015 13:28:53 +0000 (13:28 +0000)]
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

8 years agoclang-format: treat Q_SIGNALS as an access modifier
Daniel Jasper [Tue, 1 Dec 2015 12:05:04 +0000 (12:05 +0000)]
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

8 years agoThis fixes https://llvm.org/bugs/show_bug.cgi?id=25329, as well as
Daniel Jasper [Tue, 1 Dec 2015 12:00:43 +0000 (12:00 +0000)]
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

8 years ago[OPENMP 4.5] Parsing/sema analysis for 'priority' clause.
Alexey Bataev [Tue, 1 Dec 2015 10:17:31 +0000 (10:17 +0000)]
[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

8 years ago[analyzer] Fix IssueHash generation.
Gabor Horvath [Tue, 1 Dec 2015 09:00:41 +0000 (09:00 +0000)]
[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

8 years agoRemove superfluous StringRef casts, NFC.
Yaron Keren [Tue, 1 Dec 2015 08:14:39 +0000 (08:14 +0000)]
Remove superfluous StringRef casts, NFC.

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

8 years ago[X86] Improve codegen for AVX2 gather with an all 1s mask.
Craig Topper [Tue, 1 Dec 2015 07:12:59 +0000 (07:12 +0000)]
[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

8 years ago[OPENMP 4.5] Parsing/sema analysis for 'taskloop' directive.
Alexey Bataev [Tue, 1 Dec 2015 04:18:41 +0000 (04:18 +0000)]
[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

8 years ago[modules] Don't reject multiple modules providing contents for the same embedded...
Richard Smith [Tue, 1 Dec 2015 03:32:49 +0000 (03:32 +0000)]
[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

8 years agoFix use-after-free when a C++ thread_local variable gets replaced (because its
Richard Smith [Tue, 1 Dec 2015 01:10:48 +0000 (01:10 +0000)]
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

8 years ago[PR25661] Revert part of r217213 according to r254323.
NAKAMURA Takumi [Mon, 30 Nov 2015 23:46:32 +0000 (23:46 +0000)]
[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

8 years ago[libFuzzer] clarify the limitation of fsanitize-coverage=trace-cmp
Kostya Serebryany [Mon, 30 Nov 2015 22:17:19 +0000 (22:17 +0000)]
[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

8 years ago[MS Compat] Adjust thiscall to cdecl when deducing template arguments
David Majnemer [Mon, 30 Nov 2015 20:34:28 +0000 (20:34 +0000)]
[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

8 years agoAdd --gcc-toolchain= to one of the libclang unitests to fix issue related to
Samuel Antao [Mon, 30 Nov 2015 17:26:28 +0000 (17:26 +0000)]
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

8 years agoDo not crash when dumping the objc_bridge_related attribute when its optional argumen...
Aaron Ballman [Mon, 30 Nov 2015 15:25:34 +0000 (15:25 +0000)]
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

8 years agoUse range-based for loop to avoid the need for calculating an array size. NFC
Craig Topper [Mon, 30 Nov 2015 03:11:12 +0000 (03:11 +0000)]
Use range-based for loop to avoid the need for calculating an array size. NFC

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

8 years agoUse std::begin() and std::end() instead of doing the same manually. NFC
Craig Topper [Mon, 30 Nov 2015 03:11:10 +0000 (03:11 +0000)]
Use std::begin() and std::end() instead of doing the same manually. NFC

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

8 years ago[X86] _mm256_permutevar8x32_ps should take an integer vector for its shuffle index...
Craig Topper [Sun, 29 Nov 2015 22:53:32 +0000 (22:53 +0000)]
[X86] _mm256_permutevar8x32_ps should take an integer vector for its shuffle index input.

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

8 years ago[X86][SSE2] Added SSE2 IR + assembly codegen builtin tests
Simon Pilgrim [Sun, 29 Nov 2015 20:23:00 +0000 (20:23 +0000)]
[X86][SSE2] Added SSE2 IR + assembly codegen builtin tests

Improved tests as discussed in PR24580

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

8 years agoclang/test/CodeGen/arm-v8.1a-neon-intrinsics.c REQUIRES both arm and aarch64.
NAKAMURA Takumi [Sun, 29 Nov 2015 13:43:05 +0000 (13:43 +0000)]
clang/test/CodeGen/arm-v8.1a-neon-intrinsics.c REQUIRES both arm and aarch64.

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

8 years agoARM v8.1a adds Advanced SIMD instructions for Rounding Double Multiply
Alexandros Lamprineas [Sun, 29 Nov 2015 10:53:28 +0000 (10:53 +0000)]
ARM v8.1a adds Advanced SIMD instructions for Rounding Double Multiply
Add/Subtract.

Add missing tests that accidentally were not committed in rL254250.

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

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

8 years agoARM v8.1a adds Advanced SIMD instructions for Rounding Double Multiply
Alexandros Lamprineas [Sun, 29 Nov 2015 10:43:59 +0000 (10:43 +0000)]
ARM v8.1a adds Advanced SIMD instructions for Rounding Double Multiply
Add/Subtract.

The following instructions are added to AArch32 instruction set:

- VQRDMLAH: Vector Saturating Rounding Doubling Multiply Accumulate
            Returning High Half
- VQRDMLSH: Vector Saturating Rounding Doubling Multiply Subtract
            Returning High Half

The following instructions are added to AArch64 instruction set:

- SQRDMLAH: Signed Saturating Rounding Doubling Multiply Accumulate
            Returning High Half
- SQRDMLSH: Signed Saturating Rounding Doubling Multiply Subtract
            Returning High Half

This patch adds intrinsic and ACLE macro support for these instructions,
as well as corresponding tests.

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

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

8 years ago[X86] Remove temporary variables from intrinsic macros. NFC
Craig Topper [Sun, 29 Nov 2015 06:50:33 +0000 (06:50 +0000)]
[X86] Remove temporary variables from intrinsic macros. NFC

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

8 years agoFixed default label in fully covered switch warning that was introduced in r254203.
Daniel Sanders [Fri, 27 Nov 2015 19:49:24 +0000 (19:49 +0000)]
Fixed default label in fully covered switch warning that was introduced in r254203.

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

8 years ago[OpenMP] Parsing and sema support for thread_limit clause.
Kelvin Li [Fri, 27 Nov 2015 18:47:36 +0000 (18:47 +0000)]
[OpenMP] Parsing and sema support for thread_limit clause.

http://reviews.llvm.org/D15029

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

8 years agoint function without a return statement is invalid C++.
Artyom Skrobov [Fri, 27 Nov 2015 18:10:49 +0000 (18:10 +0000)]
int function without a return statement is invalid C++.

Changing the return type to void.

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

8 years ago[mips] Interrupt attribute support.
Daniel Sanders [Fri, 27 Nov 2015 18:03:44 +0000 (18:03 +0000)]
[mips] Interrupt attribute support.

Summary: This patch adds support for the interrupt attribute for mips32r2+.

Patch by Simon Dardis.

Reviewers: dsanders, aaron.ballman

Subscribers: aaron.ballman, cfe-commits

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

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

8 years agoRevert r254203: [mips] Interrupt attribute support.
Daniel Sanders [Fri, 27 Nov 2015 18:00:36 +0000 (18:00 +0000)]
Revert r254203: [mips] Interrupt attribute support.

I forgot to credit the author.

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

8 years ago[mips] Interrupt attribute support.
Daniel Sanders [Fri, 27 Nov 2015 17:39:20 +0000 (17:39 +0000)]
[mips] Interrupt attribute support.

Summary: This patch adds support for the interrupt attribute for mips32r2+.

Reviewers: dsanders, aaron.ballman

Subscribers: aaron.ballman, cfe-commits

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

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

8 years agoRevert Sparc and SparcV9 to external assembler. Now that the CPU
Joerg Sonnenberger [Fri, 27 Nov 2015 13:16:33 +0000 (13:16 +0000)]
Revert Sparc and SparcV9 to external assembler. Now that the CPU
handling is corrected, the primary reason for forcing IAS as default is
gone and the remaining issues are still somewhat problematic in common
situations.

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

8 years ago[x86] Exclusion of incorrect include headers paths for MCU target
Andrey Bokhanko [Fri, 27 Nov 2015 12:18:22 +0000 (12:18 +0000)]
[x86] Exclusion of incorrect include headers paths for MCU target

Exclusion of /usr/include and /usr/local/include headers paths for MCU target.

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

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

8 years agoTest commit
Pierre Gousseau [Thu, 26 Nov 2015 22:08:58 +0000 (22:08 +0000)]
Test commit
Remove tabs.

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

8 years agodocs: Remove references to the long-defunct LLVM_USED_LIBS
Justin Bogner [Thu, 26 Nov 2015 19:52:24 +0000 (19:52 +0000)]
docs: Remove references to the long-defunct LLVM_USED_LIBS

LLVM_USED_LIBS hasn't done anything since 2012, stop telling people to
set it in the docs.

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

8 years ago[AArch64] Add command-line options for Statistical Profiling Extension
Oliver Stannard [Thu, 26 Nov 2015 15:38:54 +0000 (15:38 +0000)]
[AArch64] Add command-line options for Statistical Profiling Extension

This adds the "+profile" and +noprofile" suffixes for the -march and
-mcpu options, to allow enabling or disabling the options Statistical
Profiling Extension to ARMv8.2-A.

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

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

8 years ago[AArch64] Add command-line options for ARMv8.2-A
Oliver Stannard [Thu, 26 Nov 2015 15:36:42 +0000 (15:36 +0000)]
[AArch64] Add command-line options for ARMv8.2-A

This adds new values for the -march option (armv8.2a and armv8.2-a,
which are aliases of each other), and new suffixes for the -march and
-mcpu options (+fp16 and +nofp16), to allow targeting the ARMv8.2-A
architecture and it's optional half-precision floating-point extension.

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

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

8 years agoFix for merging decls in pragma weak
Alexander Musman [Thu, 26 Nov 2015 09:34:30 +0000 (09:34 +0000)]
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

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

8 years ago[OPENMP 4.5] Fixed rules for 'ordered' clause.
Alexey Bataev [Thu, 26 Nov 2015 07:50:39 +0000 (07:50 +0000)]
[OPENMP 4.5] Fixed rules for 'ordered' clause.
According to OpenMP 4.5 the parameter of 'ordered' clause must be greater than or equal to the parameter of 'collapse' clause. Patch adds this rule.

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

8 years ago[Diagnostics] Call setMapping on the correct diagnostic states in a few places. GetCu...
Craig Topper [Thu, 26 Nov 2015 05:51:54 +0000 (05:51 +0000)]
[Diagnostics] Call setMapping on the correct diagnostic states in a few places. GetCurDiagState() was being used when it shouldn't be.

I spotted this by inspection in the for loop that wasn't using its iterator and was just acting on the current state repeatedly.

This appears to have been introduced as a copy and paste bug in r140763 over 4 years ago.

I have no idea how to test this. I just went back to the original commit and tried to use the variables it was using before that.

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

8 years agoUse range-based for loops. NFC
Craig Topper [Thu, 26 Nov 2015 05:10:07 +0000 (05:10 +0000)]
Use range-based for loops. NFC

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

8 years agoUpdate reference to final TM TS spec.
Richard Smith [Thu, 26 Nov 2015 02:23:21 +0000 (02:23 +0000)]
Update reference to final TM TS spec.

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

8 years agoP0002R1: increment on expressions of type bool is no longer allowed in C++1z.
Richard Smith [Thu, 26 Nov 2015 02:16:37 +0000 (02:16 +0000)]
P0002R1: increment on expressions of type bool is no longer allowed in C++1z.

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

8 years ago[modules] Refactor handling of -fmodules-embed-*. Track this properly rather
Richard Smith [Thu, 26 Nov 2015 02:04:16 +0000 (02:04 +0000)]
[modules] Refactor handling of -fmodules-embed-*. Track this properly rather
than reusing the "overridden buffer" mechanism. This will allow us to make
embedded files and overridden files behave differently in future.

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

8 years agoDriver: protect from empty -L args
Martell Malone [Thu, 26 Nov 2015 01:02:07 +0000 (01:02 +0000)]
Driver: protect from empty -L args

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

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

8 years ago[analyzer] Add tests for generalized lambda capture (C++14). NFC.
Devin Coughlin [Thu, 26 Nov 2015 00:11:23 +0000 (00:11 +0000)]
[analyzer] Add tests for generalized lambda capture (C++14). NFC.

Add tests demonstrating that the analyzer supports generalized lambda capture. This
support falls out naturally from the work Gábor Horváth did adding C++11 lambdas to
the analyzer.

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

8 years ago[analyzer] Include block capture copy expressions in the CFG.
Devin Coughlin [Wed, 25 Nov 2015 22:35:37 +0000 (22:35 +0000)]
[analyzer] Include block capture copy expressions in the CFG.

This prevents spurious dead store warnings when a C++ lambda is casted to a block.

I've also added several tests documenting our still-incomplete support for lambda-to-block
casts.

rdar://problem/22236293

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

8 years agoP0001R1: 'register' storage class specifier is no longer permitted in C++1z.
Richard Smith [Wed, 25 Nov 2015 21:34:21 +0000 (21:34 +0000)]
P0001R1: 'register' storage class specifier is no longer permitted in C++1z.

We will still allow it in system headers, in macros from system headers, when
combined with an 'asm' label, and under the flag -Wno-register.

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

8 years agoStop using SFINAE to detect whether a derived-class override of Traverse* can
Richard Smith [Wed, 25 Nov 2015 19:33:20 +0000 (19:33 +0000)]
Stop using SFINAE to detect whether a derived-class override of Traverse* can
take a queue; some supported versions of GCC believe that this substitution
failure is an error. Instead, use a partial specialization to detect the type
of a pointer to the corresponding member. This is less general, but good enough
for our uses.

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

8 years ago[MSVC] 'property' with an empty array in array subscript expression.
Alexey Bataev [Wed, 25 Nov 2015 12:01:00 +0000 (12:01 +0000)]
[MSVC] 'property' with an empty array in array subscript expression.
MSVC supports 'property' attribute and allows to apply it to the declaration of an empty array in a class or structure definition.
For example:
```
__declspec(property(get=GetX, put=PutX)) int x[];
```
The above statement indicates that x[] can be used with one or more array indices. In this case, i=p->x[a][b] will be turned into i=p->GetX(a, b), and p->x[a][b] = i will be turned into p->PutX(a, b, i);
Differential Revision: http://reviews.llvm.org/D13336

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

8 years ago[X86] Support for C calling convention only for MCU target.
Alexey Bataev [Wed, 25 Nov 2015 09:24:26 +0000 (09:24 +0000)]
[X86] Support for C calling convention only for MCU target.
For MCU only C calling convention is allowed, all other calling conventions are not supported.
Differential Revision: http://reviews.llvm.org/D14864

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

8 years agoFix typo that was being SFINAE'd away (and apparently GCC 4.7.2 rejects-valid on...
Richard Smith [Wed, 25 Nov 2015 02:41:42 +0000 (02:41 +0000)]
Fix typo that was being SFINAE'd away (and apparently GCC 4.7.2 rejects-valid on this).

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

8 years agoTeach RAV to pass its DataRecursionQueue to derived classes if they ask for it,
Richard Smith [Tue, 24 Nov 2015 23:50:47 +0000 (23:50 +0000)]
Teach RAV to pass its DataRecursionQueue to derived classes if they ask for it,
to allow them to explicitly opt into data recursion despite having overridden
Traverse*Stmt or Traverse*Expr. Use this to reintroduce data recursion to the
one place that lost it when DataRecursiveASTVisitor was removed.

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

8 years ago[OpenMP] Parsing and sema support for num_teams clause
Kelvin Li [Tue, 24 Nov 2015 20:50:12 +0000 (20:50 +0000)]
[OpenMP] Parsing and sema support for num_teams clause

http://reviews.llvm.org/D14802

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

8 years agoReplace [=] lambda capture with [&] per David Blaikieþ suggestion.
Yaron Keren [Tue, 24 Nov 2015 20:18:24 +0000 (20:18 +0000)]
Replace [=] lambda capture with [&] per David Blaikieþ suggestion.

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

8 years ago[analyzer] Pass value expression for inlined defensive checks when binding null to...
Devin Coughlin [Tue, 24 Nov 2015 19:15:11 +0000 (19:15 +0000)]
[analyzer] Pass value expression for inlined defensive checks when binding null to nonnull.

The nullability checker was not suppressing false positives resulting from
inlined defensive checks when null was bound to a nonnull variable because it
was passing the entire bind statement rather than the value expression to
trackNullOrUndefValue().

This commit changes that checker to synactically match on the bind statement to
extract the value expression so it can be passed to trackNullOrUndefValue().

rdar://problem/23575439

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

8 years agoFix rewrite of reserved library name in case of -nodefaultlibs
Nirav Dave [Tue, 24 Nov 2015 16:07:21 +0000 (16:07 +0000)]
Fix rewrite of reserved library name in case of -nodefaultlibs

The Driver only checked if nostdlib was set when deciding to add
reserved_lib_stdcxx, but as nostdlib is always exactly nodefaultlibs and
nostartfiles we should be checking one (clearly nodefaultlibs in the
case) as well. This appears to be the only such instance of this in the
codebase.

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

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

8 years ago[OPENMP] Fix crash on codegen for 'task' directive with no shared variables.
Alexey Bataev [Tue, 24 Nov 2015 13:01:44 +0000 (13:01 +0000)]
[OPENMP] Fix crash on codegen for 'task' directive with no shared variables.
If 'task' region does not have shared variables codegen could crash on calculation of size of list of shared variables.

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