]> granicus.if.org Git - clang/log
clang
9 years agoMS ABI: Generate default constructor closures
David Majnemer [Fri, 13 Mar 2015 22:36:55 +0000 (22:36 +0000)]
MS ABI: Generate default constructor closures

The MS ABI utilizes a compiler generated function called the "vector
constructor iterator" to construct arrays of objects with
non-trivial constructors/destructors.  For this to work, the constructor
must follow a specific calling convention.  A thunk must be created if
the default constructor has default arguments, is variadic or is
otherwise incompatible.  This thunk is called the default constructor
closure.

N.B.  Default constructor closures are only generated if the default
constructor is exported because clang itself does not utilize vector
constructor iterators.  Failing to export the default constructor
closure will result in link/load failure if a translation unit compiled
with MSVC is on the import side.

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

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

9 years agoMake tests more robust. No functional change.
Robert Lougher [Fri, 13 Mar 2015 20:35:45 +0000 (20:35 +0000)]
Make tests more robust. No functional change.

In preparation for recommit of revision 232190, change tests so that they
are resilient to operands being commuted by the reassociate pass.

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

9 years agoMS ABI: Implement __GetExceptionInfo for std::make_exception_ptr
David Majnemer [Fri, 13 Mar 2015 18:26:17 +0000 (18:26 +0000)]
MS ABI: Implement __GetExceptionInfo for std::make_exception_ptr

std::make_exception_ptr calls std::__GetExceptionInfo in order to figure
out how to properly copy the exception object.

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

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

9 years agoTest case updates for explicit type parameter to the gep operator
David Blaikie [Fri, 13 Mar 2015 18:21:46 +0000 (18:21 +0000)]
Test case updates for explicit type parameter to the gep operator

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

9 years agoUpdate test case to make it easier to automatically port to typeless pointer gep...
David Blaikie [Fri, 13 Mar 2015 18:21:11 +0000 (18:21 +0000)]
Update test case to make it easier to automatically port to typeless pointer gep operator changes coming soon

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

9 years agoSema: Replace the SetVector/DenseMap/std::sort combination with a simple std::map
Benjamin Kramer [Fri, 13 Mar 2015 16:10:42 +0000 (16:10 +0000)]
Sema: Replace the SetVector/DenseMap/std::sort combination with a simple std::map

This guarantees the order and doesn't increase malloc counts a lot as there are
typically very few elements int the map. Provide a little iterator adapter to
keep the same interface as we had with the flat sorted list.

No functional change intended.

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

9 years agoWhen building a module, all headers of submodules can be used.
Daniel Jasper [Fri, 13 Mar 2015 14:29:39 +0000 (14:29 +0000)]
When building a module, all headers of submodules can be used.

This extends r232159.

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

9 years agoclang-format: Don't corrupt macros with open braces.
Daniel Jasper [Fri, 13 Mar 2015 13:32:11 +0000 (13:32 +0000)]
clang-format: Don't corrupt macros with open braces.

Formatting:
  #define A { {
  #define B } }

Before:
  #define A               \
    {                     \
      { #define B }       \
    }

After:
  #define A               \
    {                     \
      {
  #define B               \
    }                     \
    }

This fixes llvm.org/PR22884.

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

9 years ago[OPENMP] Additional sema analysis for 'omp atomic[ update]'.
Alexey Bataev [Fri, 13 Mar 2015 12:27:31 +0000 (12:27 +0000)]
[OPENMP] Additional sema analysis for 'omp atomic[ update]'.
Adds additional semantic analysis + generation of helper expressions for proper codegen.

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

9 years agoMake a module "use" also count as use of all its submodules
Daniel Jasper [Fri, 13 Mar 2015 11:26:16 +0000 (11:26 +0000)]
Make a module "use" also count as use of all its submodules

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

9 years ago[OPENMP] Re-factor __kmpc_for_static_init_* routine generation.
Alexander Musman [Fri, 13 Mar 2015 10:38:23 +0000 (10:38 +0000)]
[OPENMP] Re-factor __kmpc_for_static_init_* routine generation.

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

9 years ago[Modules] Teach Clang to survive ambiguous macros which come from system
Chandler Carruth [Fri, 13 Mar 2015 08:29:54 +0000 (08:29 +0000)]
[Modules] Teach Clang to survive ambiguous macros which come from system
headers even if they arrived when merging non-system modules.

The idea of this code is that we don't want to warn the user about
macros defined multiple times by their system headers with slightly
different definitions. We should have this behavior if either the
macro comes from a system module, or the definition within the module
comes from a system header. Previously, we would warn on ambiguous
macros being merged when they came from a users modules even though they
only showed up via system headers.

By surviving this we can handle common system header macro differences
like differing 'const' qualification of pointers due to some headers
predating 'const' being valid in C code, even when those systems headers
are pre-built into a system module.

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

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

9 years ago[libclang] Fix crash when code-completing inside constructor initializer for a builti...
Argyrios Kyrtzidis [Fri, 13 Mar 2015 07:39:30 +0000 (07:39 +0000)]
[libclang] Fix crash when code-completing inside constructor initializer for a builtin type.

rdar://20149746

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

9 years ago[libclang] During member ref expression visitation, ignore base anonymous struct...
Argyrios Kyrtzidis [Fri, 13 Mar 2015 04:40:07 +0000 (04:40 +0000)]
[libclang] During member ref expression visitation, ignore base anonymous struct/union fields.

Otherwise they will shadow the real field that that we are interested in.

rdar://19783938

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

9 years agoDeduplicate #undef directives imported from multiple modules.
Richard Smith [Fri, 13 Mar 2015 04:05:01 +0000 (04:05 +0000)]
Deduplicate #undef directives imported from multiple modules.

No functionality change, but deeply-importing module files are smaller and
faster now.

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

9 years agoSimplify.
Joerg Sonnenberger [Fri, 13 Mar 2015 00:54:30 +0000 (00:54 +0000)]
Simplify.

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

9 years ago[CMake] Add clangBasic in ASTMatchersTests, according to r232051.
NAKAMURA Takumi [Thu, 12 Mar 2015 23:49:06 +0000 (23:49 +0000)]
[CMake] Add clangBasic in ASTMatchersTests, according to r232051.

Jan Vesely noticed it. See also r232055.

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

9 years agoDisambiguate call for GCC.
Benjamin Kramer [Thu, 12 Mar 2015 23:46:55 +0000 (23:46 +0000)]
Disambiguate call for GCC.

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

9 years agoCodeGen: Base the conditional cleanup machinery on variadic templates
Benjamin Kramer [Thu, 12 Mar 2015 23:41:40 +0000 (23:41 +0000)]
CodeGen: Base the conditional cleanup machinery on variadic templates

This is complicated by the fact that we can't simply use side-effecting
calls in an argument list without losing all guarantees about the order
they're emitted. To keep things deterministic we use tuples and brace
initialization, which thankfully guarantees evaluation order.

No functionality change intended.

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

9 years agoclang-format: [OBJC] Don't indent 8 spaces in method declarations.
Daniel Jasper [Thu, 12 Mar 2015 22:13:45 +0000 (22:13 +0000)]
clang-format: [OBJC] Don't indent 8 spaces in method declarations.

Before:
  - (void)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:
          (SoooooooooooooooooooooomeType *)bbbbbbbbbb;

After:
  - (void)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:
      (SoooooooooooooooooooooomeType *)bbbbbbbbbb;

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

9 years ago[X86, AVX2] Replace inserti128 and extracti128 intrinsics with generic shuffles
Sanjay Patel [Thu, 12 Mar 2015 21:54:24 +0000 (21:54 +0000)]
[X86, AVX2] Replace inserti128 and extracti128 intrinsics with generic shuffles

This is nearly identical to the v*f128_si256 parts of r231792 and r232052.

AVX2 introduced proper integer variants of the hacked integer insert/extract
C intrinsics that were created for this same functionality with AVX1.

This should complete the front end fixes for insert/extract128 intrinsics.
Corresponding LLVM patch to follow.

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

9 years agoSema: Make BoundTypeDiagnoser a variadic template
Benjamin Kramer [Thu, 12 Mar 2015 20:58:06 +0000 (20:58 +0000)]
Sema: Make BoundTypeDiagnoser a variadic template

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

9 years agoFix grammar in a comment, wrap to 80 columns. No behavior change.
Nico Weber [Thu, 12 Mar 2015 19:37:10 +0000 (19:37 +0000)]
Fix grammar in a comment, wrap to 80 columns. No behavior change.

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

9 years agoRemove duplicate "the". N+1 redundancy is not useful here.
Nico Weber [Thu, 12 Mar 2015 19:35:34 +0000 (19:35 +0000)]
Remove duplicate "the". N+1 redundancy is not useful here.

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

9 years agoMS ABI: Allow a nullptr_t exception to be caught by void * catch handler
David Majnemer [Thu, 12 Mar 2015 17:44:49 +0000 (17:44 +0000)]
MS ABI: Allow a nullptr_t exception to be caught by void * catch handler

A nullptr exception object can be caught by any pointer type catch
handler.  However, it is not possible to express this in the exception
info for the MS ABI.  As a middle ground, allow such exception objects
to be caught with pointer-to-void catch handlers.

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

9 years ago[docs] Update the doxygen configuration file.
Logan Chien [Thu, 12 Mar 2015 17:27:53 +0000 (17:27 +0000)]
[docs] Update the doxygen configuration file.

Update the doxygen configuration file and the Makefile build rules
to provide better output (simply use the default stylesheet and template
from the Doxygen distribution.)

This CL has upgrade doxygen.cfg.in to Doxygen 1.8.6.

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

9 years ago[docs] Replace the doxygen qch option properly.
Logan Chien [Thu, 12 Mar 2015 17:27:19 +0000 (17:27 +0000)]
[docs] Replace the doxygen qch option properly.

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

9 years agoReplace second (hopefully unused) access of macro input argument with zero vector...
Sanjay Patel [Thu, 12 Mar 2015 17:23:46 +0000 (17:23 +0000)]
Replace second (hopefully unused) access of macro input argument with zero vector to be safer.

Suggested by Craig Topper in D8275.

This is a follow-on to r232052.

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

9 years agoASTMatchers: Add an explicit dependency on libclangBasic.
Benjamin Kramer [Thu, 12 Mar 2015 16:25:19 +0000 (16:25 +0000)]
ASTMatchers: Add an explicit dependency on libclangBasic.

In a static build the dependency is picked up implictly, but not in a shared
library build. This is needed for the new ObjC matchers that reference Selector.

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

9 years ago[X86, AVX] replace vextractf128 intrinsics with generic shuffles
Sanjay Patel [Thu, 12 Mar 2015 15:50:36 +0000 (15:50 +0000)]
[X86, AVX] replace vextractf128 intrinsics with generic shuffles

This is very much like D8088 (checked in at r231792).

Now that we've replaced the vinsertf128 intrinsics,
do the same for their extract twins.

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

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

9 years agoAdd support for a few Objective-C matchers.
Manuel Klimek [Thu, 12 Mar 2015 15:48:15 +0000 (15:48 +0000)]
Add support for a few Objective-C matchers.

Add some matchers for Objective-C selectors and messages to
ASTMatchers.h. Minor mods to ASTMatchersTest.h to allow test files with
".m" extension in addition to ".cpp".  New tests added to
ASTMatchersTest.c.

Patch by Dean Sutherland.

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

9 years agoclang-format: When putting */& next to types, also wrap before them.
Daniel Jasper [Thu, 12 Mar 2015 15:04:53 +0000 (15:04 +0000)]
clang-format: When putting */& next to types, also wrap before them.

Before:
  LoooooooooooongType *
      loooooooooooongVariable;

After:
  LoooooooooooongType
      *loooooooooooongVariable;

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

9 years agoclang-format: [Java] Support anonymous classes after = and return.
Daniel Jasper [Thu, 12 Mar 2015 14:44:29 +0000 (14:44 +0000)]
clang-format: [Java] Support anonymous classes after = and return.

Before:
  A a = new A(){public String toString(){return "NotReallyA";
  }
  }
  ;

After:
  A a = return new A() {
    public String toString() {
      return "NotReallyA";
    }
  };

This fixes llvm.org/PR22878.

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

9 years agoSema: Don't emit a missing prototype warning for deleted functions.
Benjamin Kramer [Thu, 12 Mar 2015 14:28:47 +0000 (14:28 +0000)]
Sema: Don't emit a missing prototype warning for deleted functions.

This is a bit more involved than I anticipated, so here's a breakdown
of the changes:
  1. Call ActOnFinishFunctionBody _after_ we parsed =default and
     =delete specifiers. Saying that we finished the body before parsing
     =default is just wrong. Changing this allows us to use isDefaulted
     and isDeleted on a decl in ActOnFinishFunctionBody.
  2. Check for -Wmissing-prototypes after we parsed the function body.
  3. Disable -Wmissing-prototypes when the Decl isDeleted.

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

9 years agoUse Sema's PrintingPolicy when diagnosing DeclSpecs.
Benjamin Kramer [Thu, 12 Mar 2015 14:28:38 +0000 (14:28 +0000)]
Use Sema's PrintingPolicy when diagnosing DeclSpecs.

Sema overrides ASTContext's policy on the first emitted diagnostic
(doesn't matter if it's ignored or not). This means changing the order
of diagnostic emission in Sema suddenly changes the text of diagnostic
emitted from the parser.

In the test case -Wmissing-prototypes (ignored) was the culprit, use
'int main' to suppress that warning so we see when this regresses.
Also move it into Sema/ as it's not testing any C++.

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

9 years agoReverting r232034, as it broke one of the bots with link errors. Details at: http...
Aaron Ballman [Thu, 12 Mar 2015 14:14:48 +0000 (14:14 +0000)]
Reverting r232034, as it broke one of the bots with link errors. Details at: http://bb.pgr.jp/builders/ninja-clang-x64-mingw64-RA/builds/6352/steps/build/logs/stdio

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

9 years agoInstead of dereferencing std::vector::end() (which is UB and causes failed assertions...
Aaron Ballman [Thu, 12 Mar 2015 13:49:45 +0000 (13:49 +0000)]
Instead of dereferencing std::vector::end() (which is UB and causes failed assertions in debug builds with Visual Studio), use data() + size() to calculate the end iterator. Amends r231952.

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

9 years ago[OPENMP] CodeGen - 'omp for' with dynamic schedule kinds.
Alexander Musman [Thu, 12 Mar 2015 13:37:50 +0000 (13:37 +0000)]
[OPENMP] CodeGen - 'omp for' with dynamic schedule kinds.
Differential Revision: http://reviews.llvm.org/D7138

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

9 years agoAdded some matchers for objective c selectors and messages to ASTMatchers.h. Minor...
Aaron Ballman [Thu, 12 Mar 2015 13:21:19 +0000 (13:21 +0000)]
Added some matchers for objective c selectors and messages to ASTMatchers.h. Minor mods to ASTMatchersTest.h to allow test files with ".m" extension in addition to ".cpp". New tests added to ASTMatchersTest.c.

Patch by Dean Sutherland, reviewed by Manuel Klimek. From http://reviews.llvm.org/D7710

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

9 years ago[OPENMP] Initial codegen for 'omp sections' and 'omp section' directives.
Alexey Bataev [Thu, 12 Mar 2015 08:53:29 +0000 (08:53 +0000)]
[OPENMP] Initial codegen for 'omp sections' and 'omp section' directives.
If only one section is found in the sections region, it is emitted just like single region.
Otherwise it is emitted as a static non-chunked loop.

#pragma omp sections
{
#pragma omp section
  {1}
  ...
  #pragma omp section
  {n}
}
is translated to something like

i32 <iter_var>
i32 <last_iter> = 0
i32 <lower_bound> = 0
i32 <upper_bound> = n-1
i32 <stride> = 1
call void @__kmpc_for_static_init_4(<loc>, i32 <gtid>, i32 34/*static non-chunked*/, i32* <last_iter>, i32* <lower_bound>, i32* <upper_bound>, i32* <stride>, i32 1/*increment always 1*/, i32 1/*chunk always 1*/)
<upper_bound> = min(<upper_bound>, n-1)
<iter_var> = <lb>
check:
br <iter_var> <= <upper_bound>, label cont, label exit
continue:
switch (IV) {
  case 0:
  {1};
  break;
  ...
  case <NumSection> - 1:
  {n};
  break;
  }
  ++<iter_var>
  br label check
  exit:
  call void @__kmpc_for_static_fini(<loc>, i32 <gtid>)
Differential Revision: http://reviews.llvm.org/D8244

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

9 years agoUpdate copyright year to 2015.
Tanya Lattner [Thu, 12 Mar 2015 01:36:10 +0000 (01:36 +0000)]
Update copyright year to 2015.

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

9 years agoDriver: Keep -isysroot flags in crash scripts if we're dumping a VFS
Justin Bogner [Thu, 12 Mar 2015 00:52:56 +0000 (00:52 +0000)]
Driver: Keep -isysroot flags in crash scripts if we're dumping a VFS

For crashes with a VFS (ie, with modules), the -isysroot flag is often
necessary to reproduce the crash. This is especially true if some
modules need to be rebuilt, since without the sysroot they'll try to
read headers that are outside of the VFS.

I find it likely that we should keep some of the other -i flags in
this case as well, but I haven't seen that come up in practice yet so
it seems better to be conservative.

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

9 years agodocs: Document byte arrays.
Peter Collingbourne [Thu, 12 Mar 2015 00:30:41 +0000 (00:30 +0000)]
docs: Document byte arrays.

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

9 years agoDriver: Print the clang version and original command in crash scripts
Justin Bogner [Thu, 12 Mar 2015 00:14:35 +0000 (00:14 +0000)]
Driver: Print the clang version and original command in crash scripts

When a crash report script doesn't work for a reproduction on your
machine for one reason or another, it can be really tricky to figure
out why not. The compiler version that crashed and the original
command line before stripping flags are very helpful when this comes
up.

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

9 years agoUnder duress, move check for target support of __builtin_setjmp/
Joerg Sonnenberger [Wed, 11 Mar 2015 23:46:32 +0000 (23:46 +0000)]
Under duress, move check for target support of __builtin_setjmp/
__builtin_longjmp to Sema as requested by John McCall.

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

9 years agoAdd deprecation notice for -f(no-)sanitize-recover flags.
Alexey Samsonov [Wed, 11 Mar 2015 23:34:25 +0000 (23:34 +0000)]
Add deprecation notice for -f(no-)sanitize-recover flags.

These flags should be replaced with corresponding
-f(no-)sanitize-recover=<list> flags.

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

9 years ago[analyzer] www: +progress for undefbehavior.ZeroAllocDereference
Anton Yartsev [Wed, 11 Mar 2015 22:29:32 +0000 (22:29 +0000)]
[analyzer] www: +progress for undefbehavior.ZeroAllocDereference

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

9 years agoDon't overconstrain a FileCheck pattern
David Majnemer [Wed, 11 Mar 2015 21:50:09 +0000 (21:50 +0000)]
Don't overconstrain a FileCheck pattern

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

9 years ago[PowerPC] ABI support for the QPX vector instruction set
Hal Finkel [Wed, 11 Mar 2015 19:14:15 +0000 (19:14 +0000)]
[PowerPC] ABI support for the QPX vector instruction set

Support for the QPX vector instruction set, used on the IBM BG/Q supercomputer,
has recently been added to the LLVM PowerPC backend. This vector instruction
set requires some ABI modifications because the ABI on the BG/Q expects
<4 x double> vectors to be provided with 32-byte stack alignment, and to be
handled as native vector types (similar to how Altivec vectors are handled on
mainline PPC systems). I've named this ABI variant elfv1-qpx, have made this
the default ABI when QPX is supported, and have updated the ABI handling code
to provide QPX vectors with the correct stack alignment and associated
register-assignment logic.

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

9 years agoMS ABI: Mark 'throw' as implemented in the compatibility doc
David Majnemer [Wed, 11 Mar 2015 18:38:51 +0000 (18:38 +0000)]
MS ABI: Mark 'throw' as implemented in the compatibility doc

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

9 years agoMS ABI: Implement copy-ctor closures, finish implementing throw
David Majnemer [Wed, 11 Mar 2015 18:36:39 +0000 (18:36 +0000)]
MS ABI: Implement copy-ctor closures, finish implementing throw

This adds support for copy-constructor closures.  These are generated
when the C++ runtime has to call a copy-constructor with a particular
calling convention or with default arguments substituted in to the call.

Because the runtime has no mechanism to call the function with a
different calling convention or know-how to evaluate the default
arguments at run-time, we create a thunk which will do all the
appropriate work and package it in a way the runtime can use.

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

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

9 years ago[modules] When merging the pattern of a class template definition into a prior
Richard Smith [Wed, 11 Mar 2015 18:21:02 +0000 (18:21 +0000)]
[modules] When merging the pattern of a class template definition into a prior
definition, be sure to update the definition data on all declarations, not just
the canonical one, since the pattern might not be in the list of pending
definitions (if it used to be canonical itself).

One-line fix by me; reduced testcase by Daniel Jasper!

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

9 years agoReverted OpenCL2.0 atomic type commits r231932, r231935
Anastasia Stulova [Wed, 11 Mar 2015 17:26:37 +0000 (17:26 +0000)]
Reverted OpenCL2.0 atomic type commits r231932, r231935
(caused undesirable update of -std flag to use _Atomic)

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

9 years agorevert r231700 (designated initializer patch) which broke
Fariborz Jahanian [Wed, 11 Mar 2015 16:59:48 +0000 (16:59 +0000)]
revert r231700 (designated initializer patch) which broke
several projects. rdar://20120666.

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

9 years agoOpenCL: CL2.0 atomic type diagnostics
Anastasia Stulova [Wed, 11 Mar 2015 16:23:10 +0000 (16:23 +0000)]
OpenCL: CL2.0 atomic type diagnostics

Added restictions for atomic type usage from OpenCL C Spec Section 6.13.11.8

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

9 years agoOpenCL: CL2.0 atomic types
Anastasia Stulova [Wed, 11 Mar 2015 15:57:53 +0000 (15:57 +0000)]
OpenCL: CL2.0 atomic types

OpenCL C Spec v2.0 Section 6.13.11

- Made c11 _Atomic being accepted only for c11 compilations

- Implemented CL2.0 atomics by aliasing them to the corresponding c11 atomic types using implicit typedef

- Added diagnostics for atomics Khronos extension enabling

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

9 years agoAdd builtins for the 64-bit vector integer arithmetic instructions added in POWER8.
Kit Barton [Wed, 11 Mar 2015 15:57:19 +0000 (15:57 +0000)]
Add builtins for the 64-bit vector integer arithmetic instructions added in POWER8.

These are the Clang-related changes for the instructions added to LLVM in http://reviews.llvm.org/D7959.

Phabricator review: http://reviews.llvm.org/D8041

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

9 years agoclang-format: Recognize the .ts (TypeScript) extension as JavaScript.
Daniel Jasper [Wed, 11 Mar 2015 14:58:38 +0000 (14:58 +0000)]
clang-format: Recognize the .ts (TypeScript) extension as JavaScript.

Patch by Martin Probst. Thank you.

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

9 years agoclang-format: Fix incorrect && recognition.
Daniel Jasper [Wed, 11 Mar 2015 12:59:49 +0000 (12:59 +0000)]
clang-format: Fix incorrect && recognition.

Before:
  if (a &&(b = c)) ..

After:
  if (a && (b = c)) ..

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

9 years agoEnable security checks for arc4random() on CloudABI as well.
Ed Schouten [Wed, 11 Mar 2015 08:48:55 +0000 (08:48 +0000)]
Enable security checks for arc4random() on CloudABI as well.

CloudABI also supports the arc4random() function. We can enable compiler
warnings for rand(), random() and *rand48() on this system as well.

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

9 years agoFix up default header paths for CloudABI.
Ed Schouten [Wed, 11 Mar 2015 08:46:01 +0000 (08:46 +0000)]
Fix up default header paths for CloudABI.

CloudABI is a pure cross compilation target. This means that we should
not add /usr/include and /usr/local/include. Instead, headers are stored
in $sysroot/$triple/include.

The method of going back to the sysroot (by using "../../..") is also
used in this function for some of the other environments (e.g., MinGW).

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

9 years agoAdd target information for CloudABI on x86-64.
Ed Schouten [Wed, 11 Mar 2015 08:42:46 +0000 (08:42 +0000)]
Add target information for CloudABI on x86-64.

CloudABI can be identified by the __CloudABI__ preprocessor definition. The
system uses ELF executables.

CloudABI uses Unicode 7.0.0 for the encoding of wchar_t. As Unicode 7.0.0 is
synchronized with ISO/IEC 10646:2012 (released on 2012-06-01),
__STDC_ISO_10646__ is defined as 201206L.

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

9 years agoSema: Properly track mangling number/name for linkage for using decls
David Majnemer [Wed, 11 Mar 2015 06:45:39 +0000 (06:45 +0000)]
Sema: Properly track mangling number/name for linkage for using decls

Using declarations which are aliases to struct types have their name
used as the struct type's name for linkage purposes.  Otherwise, make
sure to give an anonymous struct defined inside a using declaration a
mangling number to disambiguate it from other anonymous structs in the
same context.

This fixes PR22809.

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

9 years agoPrevent test from accessing files.
Daniel Jasper [Wed, 11 Mar 2015 06:01:01 +0000 (06:01 +0000)]
Prevent test from accessing files.

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

9 years ago[OPENMP] Fix for ExprWithCleanups in 'omp atomic' constructs.
Alexey Bataev [Wed, 11 Mar 2015 04:48:56 +0000 (04:48 +0000)]
[OPENMP] Fix for ExprWithCleanups in 'omp atomic' constructs.
This patch allows using of ExprWithCleanups expressions and other complex expressions in 'omp atomic' construct
Differential Revision: http://reviews.llvm.org/D8200

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

9 years agoCGOpenMPRuntime.h: Fix an incorrect \param on emitTaskOutlinedFunction(). [-Wdocument...
NAKAMURA Takumi [Wed, 11 Mar 2015 03:51:40 +0000 (03:51 +0000)]
CGOpenMPRuntime.h: Fix an incorrect \param on emitTaskOutlinedFunction(). [-Wdocumentation]

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

9 years ago[modules] Avoid accidentally completing the redeclaration chain when updating
Richard Smith [Wed, 11 Mar 2015 01:44:51 +0000 (01:44 +0000)]
[modules] Avoid accidentally completing the redeclaration chain when updating
all the existing declarations of a record-like entity with a pointer to its
definition.

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

9 years agoFix test to specify an Itanium triple.
Richard Smith [Wed, 11 Mar 2015 01:09:01 +0000 (01:09 +0000)]
Fix test to specify an Itanium triple.

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

9 years agoRemove a bugus test.
Rafael Espindola [Wed, 11 Mar 2015 00:28:59 +0000 (00:28 +0000)]
Remove a bugus test.

This was using the driver to test LLVM.

I checked that disabling the code path that the test was testing causes
llvm tests to fail.

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

9 years agoFor PR22870: produce an error rather than asserting if a designated initializer appea...
Richard Smith [Wed, 11 Mar 2015 00:12:17 +0000 (00:12 +0000)]
For PR22870: produce an error rather than asserting if a designated initializer appears in a signature.

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

9 years agoGender-neutralize a comment.
Nico Weber [Wed, 11 Mar 2015 00:05:26 +0000 (00:05 +0000)]
Gender-neutralize a comment.

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

9 years ago[modules] Fix iterator invalidation issue with names being added to a module
Richard Smith [Wed, 11 Mar 2015 00:00:51 +0000 (00:00 +0000)]
[modules] Fix iterator invalidation issue with names being added to a module
while we're writing out the identifier table.

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

9 years ago[analyzer] Make getCheckIfTracked() return either leak or regular checker.
Anton Yartsev [Tue, 10 Mar 2015 22:24:21 +0000 (22:24 +0000)]
[analyzer] Make getCheckIfTracked() return either leak or regular checker.

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

9 years agoUpdate clang for llvm r231861.
Eric Christopher [Tue, 10 Mar 2015 22:03:27 +0000 (22:03 +0000)]
Update clang for llvm r231861.

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

9 years ago[Objective-C Sema]. Remove -Wreceiver-is-weak warning.
Fariborz Jahanian [Tue, 10 Mar 2015 21:28:33 +0000 (21:28 +0000)]
[Objective-C Sema]. Remove -Wreceiver-is-weak warning.
It is incorrect and better warning is issued under
-Warc-repeated-use-of-weak. rdar://16316934.

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

9 years agoMS ABI: Mangle the location of the catchable type into it's name
David Majnemer [Tue, 10 Mar 2015 19:01:51 +0000 (19:01 +0000)]
MS ABI: Mangle the location of the catchable type into it's name

Because the catchable type has a reference to its name, mangle the
location to ensure that two catchable types with different locations are
distinct.

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

9 years agoRecognize objc_bridge(id) on bridged casts to CF types.
John McCall [Tue, 10 Mar 2015 18:41:23 +0000 (18:41 +0000)]
Recognize objc_bridge(id) on bridged casts to CF types.

Fixes <rdar://20107345>.

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

9 years agoMake helper functions static. NFC.
Benjamin Kramer [Tue, 10 Mar 2015 18:24:01 +0000 (18:24 +0000)]
Make helper functions static. NFC.

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

9 years agoThe semantic spelling enumeration should retain values to the spelling list indexes...
Aaron Ballman [Tue, 10 Mar 2015 17:19:18 +0000 (17:19 +0000)]
The semantic spelling enumeration should retain values to the spelling list indexes used by the attribute. The only attribute affected by this in practice is the OpenCLImageAccessAttr, which has duplicate semantic spellings that are automatically stripped.

We do not implicitly create an OpenCLImageAccessAttr, so this change only affects out of tree users. There is no way to test this behavior specifically that I can see, since this only affects implicit creation of attributes.

Fixes PR22403.

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

9 years ago[X86, AVX] Replace vinsertf128 intrinsics with generic shuffles.
Sanjay Patel [Tue, 10 Mar 2015 15:19:26 +0000 (15:19 +0000)]
[X86, AVX] Replace vinsertf128 intrinsics with generic shuffles.

We want to replace as much custom x86 shuffling via intrinsics
as possible because pushing the code down the generic shuffle
optimization path allows for better codegen and less complexity
in LLVM.

This is the sibling patch for the LLVM half of this change:
http://reviews.llvm.org/D8086

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

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

9 years agoDocument __has_feature(modules) in LanguageExtensions
Ben Langmuir [Tue, 10 Mar 2015 14:39:26 +0000 (14:39 +0000)]
Document __has_feature(modules) in LanguageExtensions

Fixes PR18985

Patch by Vassil Vassilev!

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

9 years agoAllow -target= and --target options
Renato Golin [Tue, 10 Mar 2015 13:58:33 +0000 (13:58 +0000)]
Allow -target= and --target options

Using clang as a cross-compiler with the 'target' option could be confusing
for those inexperienced in the realm of cross compiling.

This patch would allow the use of all these four variants of the target option:
-target <triple>
--target <triple>
-target=<triple>
--target=<triple>

Patch by Gabor Ballabas.

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

9 years agoTeach raw_ostream to accept SmallString.
Yaron Keren [Tue, 10 Mar 2015 07:33:23 +0000 (07:33 +0000)]
Teach raw_ostream to accept SmallString.

Saves adding .str() call to any raw_ostream << SmallString usage
and a small step towards making .str() consistent in the ADTs by
removing one of the SmallString::str() use cases, discussion at

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20141013/240026.html

I'll update the Phabricator patch http://reviews.llvm.org/D6372
for review of the Twine SmallString support, it's more complex
than this one.

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

9 years ago[OPENMP] Initial codegen for 'omp task' directive.
Alexey Bataev [Tue, 10 Mar 2015 07:28:44 +0000 (07:28 +0000)]
[OPENMP] Initial codegen for 'omp task' directive.
The task region is emmitted in several steps:

Emit a call to kmp_task_t *__kmpc_omp_task_alloc(ident_t *, kmp_int32 gtid, kmp_int32 flags, size_t sizeof_kmp_task_t, size_t sizeof_shareds, kmp_routine_entry_t *task_entry).
Here task_entry is a pointer to the function:
kmp_int32 .omp_task_entry.(kmp_int32 gtid, kmp_task_t *tt) {
    TaskFunction(gtid, tt->part_id, tt->shareds);
      return 0;
}
Copy a list of shared variables to field shareds of the resulting structure kmp_task_t returned by the previous call (if any).
Copy a pointer to destructions function to field destructions of the resulting structure kmp_task_t.
Emit a call to kmp_int32 __kmpc_omp_task(ident_t *, kmp_int32 gtid, kmp_task_t *new_task), where new_task is a resulting structure from previous items.
Differential Revision: http://reviews.llvm.org/D7560

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

9 years ago[OPENMP] Fixed tests for non-debug builds. NFC.
Alexey Bataev [Tue, 10 Mar 2015 05:28:46 +0000 (05:28 +0000)]
[OPENMP] Fixed tests for non-debug builds. NFC.

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

9 years ago[OPENMP] Improved code for generating debug info + generation of all OpenMP regions...
Alexey Bataev [Tue, 10 Mar 2015 05:15:26 +0000 (05:15 +0000)]
[OPENMP] Improved code for generating debug info + generation of all OpenMP regions in termination scope
Patch adds proper generation of debug info for all OpenMP regions. Also, all OpenMP regions are generated in a termination scope, because standard does not allow to throw exceptions out of structured blocks, associated with the OpenMP regions
Differential Revision: http://reviews.llvm.org/D7935

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

9 years agoRevert "[OPENMP] Improved code for generating debug info + generation of all OpenMP...
Rafael Espindola [Tue, 10 Mar 2015 04:40:21 +0000 (04:40 +0000)]
Revert "[OPENMP] Improved code for generating debug info + generation of all OpenMP regions in termination scope Patch adds proper generation of debug info for all OpenMP regions. Also, all OpenMP regions are generated in a termination scope, because standard does not allow to throw exceptions out of structured blocks, associated with the OpenMP regions Differential Revision: http://reviews.llvm.org/D7935"

This reverts commit r231752.

It was failing to link with cmake:

lib64/libclangCodeGen.a(CGOpenMPRuntime.cpp.o):/home/espindola/llvm/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:function clang::CodeGen::InlinedOpenMPRegionRAII::~InlinedOpenMPRegionRAII(): error: undefined reference to 'clang::CodeGen::EHScopeStack::popTerminate()'
clang-3.7: error: linker command failed with exit code 1 (use -v to see invocation)

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

9 years ago[OPENMP] Improved code for generating debug info + generation of all OpenMP regions...
Alexey Bataev [Tue, 10 Mar 2015 04:22:11 +0000 (04:22 +0000)]
[OPENMP] Improved code for generating debug info + generation of all OpenMP regions in termination scope
Patch adds proper generation of debug info for all OpenMP regions. Also, all OpenMP regions are generated in a termination scope, because standard does not allow to throw exceptions out of structured blocks, associated with the OpenMP regions
Differential Revision: http://reviews.llvm.org/D7935

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

9 years ago[modules] Don't bother looking up a declaration to merge into if we're not
Richard Smith [Tue, 10 Mar 2015 02:57:50 +0000 (02:57 +0000)]
[modules] Don't bother looking up a declaration to merge into if we're not
actually loading a formerly-canonical declaration.

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

9 years agoUpdate for LLVM API change: getOrEnforceKnownAlignment() requires a DataLayout
Mehdi Amini [Tue, 10 Mar 2015 02:36:43 +0000 (02:36 +0000)]
Update for LLVM API change: getOrEnforceKnownAlignment() requires a DataLayout

From: Mehdi Amini <mehdi.amini@apple.com>

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

9 years agoPR21687: when adding a redeclaration of a function with an implicit exception
Richard Smith [Tue, 10 Mar 2015 02:00:53 +0000 (02:00 +0000)]
PR21687: when adding a redeclaration of a function with an implicit exception
specification, update all prior declarations if the new one has an explicit
exception specification and the prior ones don't.

Patch by Vassil Vassilev! Some minor tweaking and test case by me.

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

9 years ago[modules] Don't clobber a destructor's operator delete when adding another one;
Richard Smith [Tue, 10 Mar 2015 01:41:22 +0000 (01:41 +0000)]
[modules] Don't clobber a destructor's operator delete when adding another one;
move the operator delete updating into a separate update record so we can cope
with updating another module's destructor's operator delete.

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

9 years ago[modules] This check is run before we resolve the header, not after, so just
Richard Smith [Tue, 10 Mar 2015 00:19:04 +0000 (00:19 +0000)]
[modules] This check is run before we resolve the header, not after, so just
check that private headers are in a list matching the role. (We can't perform
the opposite checks for non-private headers because we infer those.)

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

9 years ago[modules] Don't assert if the same header is named as both a public and a
Richard Smith [Mon, 9 Mar 2015 23:46:50 +0000 (23:46 +0000)]
[modules] Don't assert if the same header is named as both a public and a
private header within the same module.

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

9 years agoSuppress a couple of tests, clang/test/CodeGen/catch-undef-behavior.c and one, for...
NAKAMURA Takumi [Mon, 9 Mar 2015 22:32:03 +0000 (22:32 +0000)]
Suppress a couple of tests, clang/test/CodeGen/catch-undef-behavior.c and one, for -Asserts for now. They were introduced in r231711.

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

9 years ago[UBSan] Split -fsanitize=shift into -fsanitize=shift-base and -fsanitize=shift-exponent.
Alexey Samsonov [Mon, 9 Mar 2015 21:50:19 +0000 (21:50 +0000)]
[UBSan] Split -fsanitize=shift into -fsanitize=shift-base and -fsanitize=shift-exponent.

This is a recommit of r231150, reverted in r231409. Turns out
that -fsanitize=shift-base check implementation only works if the
shift exponent is valid, otherwise it contains undefined behavior
itself.

Make sure we check that exponent is valid before we proceed to
check the base. Make sure that we actually report invalid values
of base or exponent if -fsanitize=shift-base or
-fsanitize=shift-exponent is specified, respectively.

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

9 years agoARM: use ABI-specified alignment for byval parameters.
Tim Northover [Mon, 9 Mar 2015 21:40:42 +0000 (21:40 +0000)]
ARM: use ABI-specified alignment for byval parameters.

When passing a type with large alignment byval, we were specifying the type's
alignment rather than the alignment that the backend is actually capable of
producing (ABIAlign).

This would be OK (if odd) assuming the backend dealt with it prooperly,
unfortunately it doesn't and trying to pass types with "byval align 16" can
cause it to set fp incorrectly and trash the stack during the prologue. I'll be
fixing that in a separate patch, but Clang should still be emitting IR that's
as close to its intent as possible.

rdar://20059039

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

9 years ago[PATCH Sema Objective-C]. Patch to warn on missing designated initializer
Fariborz Jahanian [Mon, 9 Mar 2015 20:39:51 +0000 (20:39 +0000)]
[PATCH Sema Objective-C]. Patch to warn on missing designated initializer
override where at least a declaration of a designated initializer is in a super
class and not necessarily in the current class. rdar://19653785.

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

9 years agoRoll functions back into namespaces, msvc has problems with name lookup outside of it.
Benjamin Kramer [Mon, 9 Mar 2015 17:00:48 +0000 (17:00 +0000)]
Roll functions back into namespaces, msvc has problems with name lookup outside of it.

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

9 years agoCorrect doxygen for matcher macros that require a body. NFC.
Alexander Kornienko [Mon, 9 Mar 2015 16:57:49 +0000 (16:57 +0000)]
Correct doxygen for matcher macros that require a body. NFC.

http://reviews.llvm.org/D8146

Patch by Richard Thomson!

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