]> granicus.if.org Git - clang/log
clang
8 years ago[modules] Don't expose *intrin.h headers that cannot be included standalone as
Richard Smith [Sat, 16 Apr 2016 00:46:26 +0000 (00:46 +0000)]
[modules] Don't expose *intrin.h headers that cannot be included standalone as
separate modules. These cause build breakage with -fmodules-local-submodule-visibility.

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

8 years ago[CUDA] Raise an error if the CUDA install can't be found.
Justin Lebar [Sat, 16 Apr 2016 00:11:11 +0000 (00:11 +0000)]
[CUDA] Raise an error if the CUDA install can't be found.

Summary:
Without this change, we silently proceed on without including
__clang_cuda_runtime_wrapper.h.  This leads to very strange behavior --
you say you're compiling CUDA code, but e.g. __device__ is not defined!

Reviewers: tra

Subscribers: cfe-commits

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

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

8 years agoImprove diagnostic for the case when a non-defined function-like macro is used
Richard Smith [Sat, 16 Apr 2016 00:07:09 +0000 (00:07 +0000)]
Improve diagnostic for the case when a non-defined function-like macro is used
in a preprocessor constant expression.

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

8 years agoRevert 266186 as it breaks anything that includes type_traits on some platforms
Nemanja Ivanovic [Fri, 15 Apr 2016 18:04:13 +0000 (18:04 +0000)]
Revert 266186 as it breaks anything that includes type_traits on some platforms

Since this patch provided support for the __float128 type but disabled it
on all platforms by default, some platforms can't compile type_traits with
-std=gnu++11 since there is a specialization with __float128.
This reverts the patch until D19125 is approved (i.e. we know which platforms
need this support enabled).

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

8 years agoFix testcase for MSVC targets where the output ordering is different.
Adrian Prantl [Fri, 15 Apr 2016 16:21:23 +0000 (16:21 +0000)]
Fix testcase for MSVC targets where the output ordering is different.

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

8 years agoUpdate testcase to new debug info metadata format.
Adrian Prantl [Fri, 15 Apr 2016 16:05:13 +0000 (16:05 +0000)]
Update testcase to new debug info metadata format.

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

8 years agoUpdate to match LLVM changes for PR27284.
Adrian Prantl [Fri, 15 Apr 2016 15:55:45 +0000 (15:55 +0000)]
Update to match LLVM changes for PR27284.
(Reverse the ownership between DICompileUnit and DISubprogram.)

http://reviews.llvm.org/D19034
<rdar://problem/25256815>

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

8 years agoASTMatchers.h: Fix formatting. [-Wdocumentation]
NAKAMURA Takumi [Fri, 15 Apr 2016 15:42:27 +0000 (15:42 +0000)]
ASTMatchers.h: Fix formatting. [-Wdocumentation]

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

8 years agoRevert r266415, it broke parsing SDK headers (PR27367).
Nico Weber [Fri, 15 Apr 2016 14:35:06 +0000 (14:35 +0000)]
Revert r266415, it broke parsing SDK headers (PR27367).

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

8 years agoRemove include duplicate. NFC.
Alexey Bader [Fri, 15 Apr 2016 13:23:26 +0000 (13:23 +0000)]
Remove include duplicate. NFC.

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

8 years ago[MSVC Compat] Implementation of __unaligned (MS extension) as a type qualifier
Andrey Bokhanko [Fri, 15 Apr 2016 08:03:51 +0000 (08:03 +0000)]
[MSVC Compat] Implementation of __unaligned (MS extension) as a type qualifier

This patch implements __unaligned as a type qualifier; before that, it was
modeled as an attribute. Proper mangling of __unaligned is implemented as well.
Some OpenCL code/tests are tangenially affected, as they relied on existing
number and sizes of type qualifiers.

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

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

8 years agoclang-cl: Don't check for existence of linker inputs when /link is used
Hans Wennborg [Fri, 15 Apr 2016 01:12:32 +0000 (01:12 +0000)]
clang-cl: Don't check for existence of linker inputs when /link is used

There might be flags passed to the linker (e.g. /libpath), causing it
to search in paths the Clang driver doesn't know about.

PR27234

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

8 years agoclang-cl: Make /link accept an optional joined argument.
Hans Wennborg [Fri, 15 Apr 2016 00:24:15 +0000 (00:24 +0000)]
clang-cl: Make /link accept an optional joined argument.

For example, "cl.exe a.c /linkfoo bar" is a valid invocation and
forwards "foo" and "bar" to link.exe. This makes clang-cl handle
that kind of invocation.

Depends on LLVM r266394.

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

8 years agoLit C++11 Compatibility Patch #8
Charles Li [Thu, 14 Apr 2016 23:47:07 +0000 (23:47 +0000)]
Lit C++11 Compatibility Patch #8

24 tests have been updated for C++11 compatibility.

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

8 years agoAMDGPU: Add test for generic builtin behavior
Matt Arsenault [Thu, 14 Apr 2016 22:34:39 +0000 (22:34 +0000)]
AMDGPU: Add test for generic builtin behavior

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

8 years agoIn vector comparisons, handle scalar LHS just as we handle scalar RHS
Reid Kleckner [Thu, 14 Apr 2016 21:03:38 +0000 (21:03 +0000)]
In vector comparisons, handle scalar LHS just as we handle scalar RHS

Summary: Fixes PR27258

Reviewers: rsmith

Subscribers: cfe-commits

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

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

8 years agoMake this code less brittle. The benefits of a fixed-size array aren't worth the...
Richard Smith [Thu, 14 Apr 2016 19:45:19 +0000 (19:45 +0000)]
Make this code less brittle. The benefits of a fixed-size array aren't worth the maintenance cost.

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

8 years agoFix off-by-one error in worst-case number of offsets needed for an AST record.
Richard Smith [Thu, 14 Apr 2016 18:32:54 +0000 (18:32 +0000)]
Fix off-by-one error in worst-case number of offsets needed for an AST record.

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

8 years agoAdd typedefNameDecl() and typeAliasDecl() to the AST matchers; improves hasType(...
Aaron Ballman [Thu, 14 Apr 2016 16:05:45 +0000 (16:05 +0000)]
Add typedefNameDecl() and typeAliasDecl() to the AST matchers; improves hasType() to match on TypedefNameDecl nodes.

Patch by Clement Courbet.

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

8 years agoFix testcase for the LLVM_LIBDIR_SUFFIX=64 case. Fallout from r266108.
Ismail Donmez [Thu, 14 Apr 2016 15:32:24 +0000 (15:32 +0000)]
Fix testcase for the LLVM_LIBDIR_SUFFIX=64 case. Fallout from r266108.

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

8 years agoclang-format: Last line in incomplete block is indented incorrectly
Marianne Mailhot-Sarrasin [Thu, 14 Apr 2016 14:56:49 +0000 (14:56 +0000)]
clang-format: Last line in incomplete block is indented incorrectly

Indentation of the last line was reset to the initial indentation of the block when reaching EOF.

Patch by Maxime Beaulieu

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

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

8 years agoclang-format: Implemented tab usage for continuation and indentation
Marianne Mailhot-Sarrasin [Thu, 14 Apr 2016 14:52:26 +0000 (14:52 +0000)]
clang-format: Implemented tab usage for continuation and indentation

Use tabs to fill whitespace at the start of a line.

Patch by Maxime Beaulieu

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

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

8 years agoclang-format: Allow include of clangFormat.h in managed context
Marianne Mailhot-Sarrasin [Thu, 14 Apr 2016 14:47:37 +0000 (14:47 +0000)]
clang-format: Allow include of clangFormat.h in managed context

Including VirtualFileSystem.h in the clangFormat.h indirectly includes <atomic>.
This header is blocked when compiling with /clr.

Patch by Maxime Beaulieu

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

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

8 years ago[analyzer] Make it possible to query the function name from a CallDescription.
Gabor Horvath [Thu, 14 Apr 2016 11:56:28 +0000 (11:56 +0000)]
[analyzer] Make it possible to query the function name from a CallDescription.

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

8 years ago[ASTImporter] Implement some expression-related AST node import.
Artem Dergachev [Thu, 14 Apr 2016 11:51:27 +0000 (11:51 +0000)]
[ASTImporter] Implement some expression-related AST node import.

Introduce ASTImporter unit test framework.

Fix a memory leak introduced in cf8ccff5: an array is allocated
in ImportArray and never freed.

Support new node kinds:

- GCCAsmStmt

- AddrLabelExpr
- AtomicExpr
- CompoundLiteralExpr
- CXXBoolLiteralExpr
- CXXNullPtrLiteralExpr
- CXXThisExpr
- DesignatedInitExpr
- GNUNullExpr
- ImplicitValueInitExpr
- InitListExpr
- OpaqueValueExpr
- PredefinedExpr
- ParenListExpr
- StmtExpr
- VAArgExpr

- BinaryConditionalOperator
- ConditionalOperator

- FloatingLiteral
- StringLiteral

- InjectedClassNameType
- TemplateTypeParmType

- LabelDecl

Patch by Aleksei Sidorin!

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

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

8 years agoReapply r258505 after r266254, this time with a comment to make it more sticky.
Nico Weber [Thu, 14 Apr 2016 11:12:32 +0000 (11:12 +0000)]
Reapply r258505 after r266254, this time with a comment to make it more sticky.

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

8 years ago[MSVC] Fix check for wchar_t type in case of -fno-wchar
Dmitry Polukhin [Thu, 14 Apr 2016 09:52:06 +0000 (09:52 +0000)]
[MSVC] Fix check for wchar_t type in case of -fno-wchar

The example below should work identically with and without compiler native
wchar_t support.

void foo(wchar_t * t = L"");

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

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

8 years ago[Clang][AVX512][BUILTIN] Adding support for intrinsics of vpmov{d|q}{b|w|d}{128|256...
Michael Zuckerman [Thu, 14 Apr 2016 07:56:51 +0000 (07:56 +0000)]
[Clang][AVX512][BUILTIN] Adding support for intrinsics of vpmov{d|q}{b|w|d}{128|256|512} instruction set

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

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

8 years ago[Clang][AVX512][Builtin] Adding intrinsics of vpmovus{d|q}{b|w|d}{128|256|512} instru...
Michael Zuckerman [Thu, 14 Apr 2016 06:48:09 +0000 (06:48 +0000)]
[Clang][AVX512][Builtin] Adding intrinsics of vpmovus{d|q}{b|w|d}{128|256|512} instruction set

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

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

8 years agoMake sure the LLVMContext outlive the CompilerInstance
Mehdi Amini [Thu, 14 Apr 2016 05:37:41 +0000 (05:37 +0000)]
Make sure the LLVMContext outlive the CompilerInstance

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

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

8 years agoDo not use llvm:getGlobalContext() in unittests
Mehdi Amini [Thu, 14 Apr 2016 05:34:32 +0000 (05:34 +0000)]
Do not use llvm:getGlobalContext() in unittests

Currently trying to nuke this API from LLVM.

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

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

8 years ago[modules] Store the location of the lexical update record in a decl update as
Richard Smith [Thu, 14 Apr 2016 00:50:18 +0000 (00:50 +0000)]
[modules] Store the location of the lexical update record in a decl update as
an offset from the current record rather than as an absolute bit number. This
gives a minor .pcm file size reduction.

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

8 years agoReorder ASTNodeKind::AllKindInfo to match NodeKindId.
Alexander Kornienko [Thu, 14 Apr 2016 00:47:40 +0000 (00:47 +0000)]
Reorder ASTNodeKind::AllKindInfo to match NodeKindId.

Summary:
AllKindInfo is being indexed by NodeKindId, so the order must match.
Extended ASTTypeTraits tests to cover this.

Reviewers: sbenza

Subscribers: cfe-commits, klimek

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

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

8 years ago[modules] Remove CXX_BASE_SPECIFIERS_OFFSETS table. Instead of storing an ID of
Richard Smith [Thu, 14 Apr 2016 00:29:55 +0000 (00:29 +0000)]
[modules] Remove CXX_BASE_SPECIFIERS_OFFSETS table. Instead of storing an ID of
a table entry in the corresponding decl, store an offset from the current
record to the relevant CXX_BASE_SPECIFIERS record. This results in fewer
indirections and a minor .pcm file size reduction.

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

8 years agoObjC kindof: order the methods in global pool relative to availability.
Manman Ren [Wed, 13 Apr 2016 23:43:56 +0000 (23:43 +0000)]
ObjC kindof: order the methods in global pool relative to availability.

r265877 tries to put methods that are deprecated or unavailable to the
front of the global pool to emit diagnostics, but it breaks some of
our existing codes that depend on choosing a certain method for id
lookup.

This commit orders the methods with the same declaration with respect
to the availability, but do not order methods with different declaration.

rdar://25707511

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

8 years ago[CodeGen] Avoid ctor/dtor boilerplate with some C++11
Reid Kleckner [Wed, 13 Apr 2016 23:37:17 +0000 (23:37 +0000)]
[CodeGen] Avoid ctor/dtor boilerplate with some C++11

Non-owning pointers that cache LLVM types and constants can use
'nullptr' default member initializers so that we don't need to mention
them in the constructor initializer list.

Owning pointers should use std::unique_ptr so that we don't need to
manually delete them in the destructor. They also don't need to be
mentioned in the constructor at that point.

NFC

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

8 years ago[modules] Remove CXX_CTOR_INITIALIZERS_OFFSETS table. Instead of storing an ID
Richard Smith [Wed, 13 Apr 2016 21:57:08 +0000 (21:57 +0000)]
[modules] Remove CXX_CTOR_INITIALIZERS_OFFSETS table. Instead of storing an ID
of a table entry in the corresponding decl, store an offset from the current
record to the relevant CXX_CTOR_INITIALIZERS record. This results in fewer
indirections and a minor .pcm file size reduction.

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

8 years ago[SemaObjC] Properly handle mix between type arguments and protocols.
Bruno Cardoso Lopes [Wed, 13 Apr 2016 20:59:07 +0000 (20:59 +0000)]
[SemaObjC] Properly handle mix between type arguments and protocols.

Under certain conditions clang currently fails to properly diagnostic ObjectC
parameter list when type args and protocols are mixed in the same list. This
happens when the first item in the parameter list is a (1) protocol, (2)
unknown type or (3) a list of protocols/unknown types up to the first type
argument. Fix the problem to report the proper error, example:

NSArray<M, NSValue *, NSURL, NSArray <id <M>>> *foo = @[@"a"];
NSNumber *bar = foo[0];
NSLog(@"%@", bar);

$ clang ...
x.m:7:13: error: angle brackets contain both a type ('NSValue') and a protocol ('M')
        NSArray<M, NSValue *, NSURL, NSArray <id <M>>> *foo = @[@"a"];
                ~  ^

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

rdar://problem/22204367

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

8 years agoMake sure CheckDestructor gets called on dllimported classes if the vtable is used...
Hans Wennborg [Wed, 13 Apr 2016 20:21:15 +0000 (20:21 +0000)]
Make sure CheckDestructor gets called on dllimported classes if the vtable is used (PR27319)

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

8 years agoLit C++11 Compatibility Patch #7
Charles Li [Wed, 13 Apr 2016 20:00:45 +0000 (20:00 +0000)]
Lit C++11 Compatibility Patch #7

13 tests have been updated for C++11 compatibility.
Differential Revision: http://reviews.llvm.org/D19068

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

8 years ago[CrashReproducer] Add test to run the reproducer script + modules
Bruno Cardoso Lopes [Wed, 13 Apr 2016 19:28:24 +0000 (19:28 +0000)]
[CrashReproducer] Add test to run the reproducer script + modules

Now that we have basic support in place, make sure the reproducer script
works with modules for a simple testcase.

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

8 years ago[CrashReproducer] Setup 'use-external-names' in YAML files.
Bruno Cardoso Lopes [Wed, 13 Apr 2016 19:28:21 +0000 (19:28 +0000)]
[CrashReproducer] Setup 'use-external-names' in YAML files.

Hide the real paths when rebuilding from VFS by setting up the crash
reproducer to use 'use-external-names' = false. This way we avoid
module redifinition errors and consistently use the same paths against
all modules.

With this change on Darwin we are able to simulate a crash for a simple
application using "Foundation/Foundation.h" (which relies on a bunch of
different frameworks and headers) and successfully rebuild all the
modules by relying solely at the VFS overlay.

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

8 years ago[VFS] Move default values to in-class member initialization. NFC
Bruno Cardoso Lopes [Wed, 13 Apr 2016 19:28:16 +0000 (19:28 +0000)]
[VFS] Move default values to in-class member initialization. NFC

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

8 years agoRemove redundant null-check; NFC
Hubert Tong [Wed, 13 Apr 2016 18:41:03 +0000 (18:41 +0000)]
Remove redundant null-check; NFC

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

8 years agolibclang: Use early-return to reduce indentation.
David Blaikie [Wed, 13 Apr 2016 18:36:19 +0000 (18:36 +0000)]
libclang: Use early-return to reduce indentation.

& since I'll get blamed for all the lines anyway, remove some
else-after-return and otherwise tidy things up.

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

8 years agoSimplify memory management of CXEvalResultKind/ExprEvalResult using unique_ptr and...
David Blaikie [Wed, 13 Apr 2016 18:23:33 +0000 (18:23 +0000)]
Simplify memory management of CXEvalResultKind/ExprEvalResult using unique_ptr and a dtor

This doesn't seem to need to be a C type, C only handles a void*, so use
new/delete as usual to simplify allocation and cleanup.

Follow-up to r265994

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

8 years ago[analyzer] Nullability: Suppress diagnostic on bind with cast.
Devin Coughlin [Wed, 13 Apr 2016 17:59:24 +0000 (17:59 +0000)]
[analyzer] Nullability: Suppress diagnostic on bind with cast.

Update the nullability checker to allow an explicit cast to nonnull to
suppress a warning on an assignment of nil to a nonnull:

id _Nonnull x = (id _Nonnull)nil; // no-warning

This suppression as already possible for diagnostics on returns and
function/method arguments.

rdar://problem/25381178

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

8 years ago[OrderFiles] Don't allow lit to run dtrace multithreaded
Chris Bieneman [Wed, 13 Apr 2016 17:12:56 +0000 (17:12 +0000)]
[OrderFiles] Don't allow lit to run dtrace multithreaded

Dtrace is implemented to try and minimize performance impact on the process being traced. This results in dtrace dropping samples if it is taking too many CPU resources. Multi-threading dtrace increases the sample drop rate dramatically.

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

8 years agoAArch64: allow 64-bit access to sysregs.
Tim Northover [Wed, 13 Apr 2016 17:08:55 +0000 (17:08 +0000)]
AArch64: allow 64-bit access to sysregs.

Although all the registers are actually 32-bits, I think we have to assume the
high 32-bits could be RES0 (the ARM ARM is unclear). If so, reading as a 32-bit
register can require extra zero extension operations.

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

8 years agoARM: make Darwin's "-arch armv7em" default to hard-float.
Tim Northover [Wed, 13 Apr 2016 17:08:51 +0000 (17:08 +0000)]
ARM: make Darwin's "-arch armv7em" default to hard-float.

We've already paid the price for separate "armv7m" and "armv7em" slices
(support in other tools), it's silly to make them identical other than the
default CPU.

rdar://23055688

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

8 years ago[Clang][AVX512][Builtin] Adding support to intrinsics of pmovs{d|q}{b|w|d}{128|256...
Michael Zuckerman [Wed, 13 Apr 2016 15:02:04 +0000 (15:02 +0000)]
[Clang][AVX512][Builtin] Adding support to intrinsics of pmovs{d|q}{b|w|d}{128|256|512} instruction set

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

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

8 years agoReverting r266199; it causes build bot failures.
Aaron Ballman [Wed, 13 Apr 2016 14:53:52 +0000 (14:53 +0000)]
Reverting r266199; it causes build bot failures.

http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/3255
http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/3517

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

8 years agoAdd functions declared in ctype.h to builtin function database. All functions are...
Aaron Ballman [Wed, 13 Apr 2016 13:55:58 +0000 (13:55 +0000)]
Add functions declared in ctype.h to builtin function database. All functions are annotated with nothrow and pure attribute, which enables better optimization.

Patch by Taewook Oh.

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

8 years ago[OPENMP 4.0] Fixed DSA analysis for taskloop directives.
Alexey Bataev [Wed, 13 Apr 2016 13:36:48 +0000 (13:36 +0000)]
[OPENMP 4.0] Fixed DSA analysis for taskloop directives.

Patch make clang to perform analysis for task-based directives also for
taskloop-based directives.

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

8 years ago[Clang][AVX512][Builtin] Adding support for VBROADCAST and VPBROADCASTB/W/D/Q instruc...
Michael Zuckerman [Wed, 13 Apr 2016 12:58:01 +0000 (12:58 +0000)]
[Clang][AVX512][Builtin] Adding support for VBROADCAST and VPBROADCASTB/W/D/Q instruction set

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

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

8 years agoAdd AST Matchers for CXXConstructorDecl::isDelegatingConstructor and CXXMethodDecl...
Alexander Kornienko [Wed, 13 Apr 2016 11:13:08 +0000 (11:13 +0000)]
Add AST Matchers for CXXConstructorDecl::isDelegatingConstructor and CXXMethodDecl::isUserProvided.

Summary: Added two AST matchers: isDelegatingConstructor for CXXConstructorDecl::IsDelegatingConstructor; and isUserProvided corresponding to CXXMethodDecl::isUserProvided.

Reviewers: aaron.ballman, alexfh

Subscribers: klimek, cfe-commits

Patch by Michael Miller!

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

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

8 years ago[Clang][AVX512][Builtin] Adding supporting to intrinsics of cvt{b|d|q}2mask{128|256...
Michael Zuckerman [Wed, 13 Apr 2016 10:49:37 +0000 (10:49 +0000)]
[Clang][AVX512][Builtin] Adding supporting to intrinsics of cvt{b|d|q}2mask{128|256|512} and cvtmask2{b|d|q}{128|256|512} instruction set.

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

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

8 years ago[modules] Add OpenCLImageTypes.def to module map to fix the modules build.
Alexey Bader [Wed, 13 Apr 2016 09:54:47 +0000 (09:54 +0000)]
[modules] Add OpenCLImageTypes.def to module map to fix the modules build.

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

8 years agoEnable support for __float128 in Clang
Nemanja Ivanovic [Wed, 13 Apr 2016 09:49:45 +0000 (09:49 +0000)]
Enable support for __float128 in Clang

This patch corresponds to review:
http://reviews.llvm.org/D15120

It adds support for the __float128 keyword, literals and a target feature to
enable it. This support is disabled by default on all targets and any target
that has support for this type is free to add it.

Based on feedback that I've received from target maintainers, this appears to
be the right thing for most targets. I have not heard from the maintainers of
X86 which I believe supports this type. I will subsequently investigate the
impact of enabling this on X86.

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

8 years agoTry to use readability-identifier-naming check on Clang.
Alexander Kornienko [Wed, 13 Apr 2016 08:59:49 +0000 (08:59 +0000)]
Try to use readability-identifier-naming check on Clang.

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

8 years ago[clang-tidy] Disable misc-unused-parameters for clang.
Alexander Kornienko [Wed, 13 Apr 2016 08:47:42 +0000 (08:47 +0000)]
[clang-tidy] Disable misc-unused-parameters for clang.

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

8 years ago[OpenCL] Move OpenCLImageTypes.def from clangAST to clangBasic library.
Alexey Bader [Wed, 13 Apr 2016 08:33:41 +0000 (08:33 +0000)]
[OpenCL] Move OpenCLImageTypes.def from clangAST to clangBasic library.

Putting OpenCLImageTypes.def to clangAST library violates layering requirement: "It's not OK for a Basic/ header to include an AST/ header".
This fixes the modules build.

Differential revision: http://reviews.llvm.org/D18954
Reviewers: Richard Smith, Vassil Vassilev.

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

8 years agoconstexpr -> const to appease MSVC bots.
Richard Smith [Wed, 13 Apr 2016 07:47:38 +0000 (07:47 +0000)]
constexpr -> const to appease MSVC bots.

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

8 years agoASTWriterDecl.cpp: Prune a couple of \param(s), corresponding to r266160. [-Wdocument...
NAKAMURA Takumi [Wed, 13 Apr 2016 07:45:10 +0000 (07:45 +0000)]
ASTWriterDecl.cpp: Prune a couple of \param(s), corresponding to r266160. [-Wdocumentation]

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

8 years ago[modules] Add some missing blockinfo records. No functionality change except to llvm...
Richard Smith [Wed, 13 Apr 2016 07:41:35 +0000 (07:41 +0000)]
[modules] Add some missing blockinfo records. No functionality change except to llvm-bcanalyzer output.

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

8 years ago[PPC64][VSX] Add a couple of new data types for vec_vsx_ld and vec_vsx_st intrinsics...
Chuang-Yu Cheng [Wed, 13 Apr 2016 05:16:31 +0000 (05:16 +0000)]
[PPC64][VSX] Add a couple of new data types for vec_vsx_ld and vec_vsx_st intrinsics and fix incorrect testcases with minor refactoring

New added data types:
  vector double vec_vsx_ld (int, const double *);
  vector float vec_vsx_ld (int, const float *);
  vector bool short vec_vsx_ld (int, const vector bool short *);
  vector bool int vec_vsx_ld (int, const vector bool int *);
  vector signed int vec_vsx_ld (int, const signed int *);
  vector unsigned int vec_vsx_ld (int, const unsigned int *);

  void vec_vsx_st (vector double, int, double *);
  void vec_vsx_st (vector float, int, float *);
  void vec_vsx_st (vector bool short, int, vector bool short *);
  void vec_vsx_st (vector bool short, int, signed short *);
  void vec_vsx_st (vector bool short, int, unsigned short *);
  void vec_vsx_st (vector bool int, int, vector bool int *);
  void vec_vsx_st (vector bool int, int, signed int *);
  void vec_vsx_st (vector bool int, int, unsigned int *);

Also fix testcases which use non-vector argument version of vec_vsx_ld or
vec_vsx_st, but pass incorrect parameter.

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

8 years ago[modules] Refactor handling of cases where we write an offset to a prior record into...
Richard Smith [Wed, 13 Apr 2016 02:12:03 +0000 (02:12 +0000)]
[modules] Refactor handling of cases where we write an offset to a prior record into the bitstream and simplify a little, in preparation for doing this in more cases.

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

8 years ago[analyzer] Nullability: Treat nil _Nonnull ivar as invariant violation.
Devin Coughlin [Wed, 13 Apr 2016 00:41:54 +0000 (00:41 +0000)]
[analyzer] Nullability: Treat nil _Nonnull ivar as invariant violation.

Treat a _Nonnull ivar that is nil as an invariant violation in a similar
fashion to how a nil _Nonnull parameter is treated as a precondition violation.

This avoids warning on defensive returns of nil on defensive internal
checks, such as the following common idiom:

@class InternalImplementation
@interface PublicClass {
  InternalImplementation * _Nonnull _internal;
}
-(id _Nonnull)foo;
@end

@implementation PublicClass
-(id _Nonnull)foo {
  if (!_internal)
    return nil; // no-warning

  return [_internal foo];
}
@end

rdar://problem/24485171

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

8 years agoclang/test/Driver/cl-options.c: Fix an expression to recognize dos r'\\'.
NAKAMURA Takumi [Wed, 13 Apr 2016 00:22:25 +0000 (00:22 +0000)]
clang/test/Driver/cl-options.c: Fix an expression to recognize dos r'\\'.

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

8 years ago[ObjC] Pop all cleanups created in EmitObjCForCollectionStmt before
Akira Hatanaka [Tue, 12 Apr 2016 23:10:58 +0000 (23:10 +0000)]
[ObjC] Pop all cleanups created in EmitObjCForCollectionStmt before
exiting the for-in loop.

This commit fixes a bug where EmitObjCForCollectionStmt didn't pop
cleanups for captures.

For example, in the following for-in loop, a block which captures self
is passed to foo1:

for (id x in [self foo1:^{ use(self); }]) {
  use(x);
  break;
}

Previously, the code in EmitObjCForCollectionStmt wouldn't pop the
cleanup for the captured self before exiting the loop, which caused
code-gen to generate an IR in which objc_release was called twice on
the captured self.

This commit fixes the bug by entering a RunCleanupsScope before the
loop condition is evaluated and forcing its cleanup before exiting the
loop.

rdar://problem/16865751

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

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

8 years agoObjC class properties: add diagnostics for unimplemented class properties.
Manman Ren [Tue, 12 Apr 2016 23:01:55 +0000 (23:01 +0000)]
ObjC class properties: add diagnostics for unimplemented class properties.

rdar://24711047

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

8 years ago[AMDGPU] Add debugger related target options
Konstantin Zhuravlyov [Tue, 12 Apr 2016 21:42:15 +0000 (21:42 +0000)]
[AMDGPU] Add debugger related target options

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

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

8 years agoAdd a fixme for an old patch I had lying around that I'm not going to finish any...
David Blaikie [Tue, 12 Apr 2016 21:22:48 +0000 (21:22 +0000)]
Add a fixme for an old patch I had lying around that I'm not going to finish any time so n

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

8 years agoAlways use --eh-frame-hdr on FreeBSD, even for -static
Ed Maste [Tue, 12 Apr 2016 21:11:46 +0000 (21:11 +0000)]
Always use --eh-frame-hdr on FreeBSD, even for -static

FreeBSD uses LLVM's libunwind on FreeBSD/arm64 today (and is expected to
use it more widely in the future), and it requires the EH frame segment
in static binaries.

This is the same as r203742 for NetBSD.

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

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

8 years agoAdd a couple of missing vsx load and store intrinsics.
Eric Christopher [Tue, 12 Apr 2016 21:08:54 +0000 (21:08 +0000)]
Add a couple of missing vsx load and store intrinsics.

Patch by Jing Yu!

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

8 years agoPass -backend-option to LLVM when there is no target machine.
Yaxun Liu [Tue, 12 Apr 2016 20:22:32 +0000 (20:22 +0000)]
Pass -backend-option to LLVM when there is no target machine.

Clang should pass -backend-option to LLVM even though there is no target machine, since LLVM passes are used when emitting LLVM IR.

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

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

8 years ago[modules] Extend r266113 to cope with submodules.
Richard Smith [Tue, 12 Apr 2016 20:20:33 +0000 (20:20 +0000)]
[modules] Extend r266113 to cope with submodules.

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

8 years ago[modules] When an incompatible module file is explicitly provided for a module,
Richard Smith [Tue, 12 Apr 2016 19:58:30 +0000 (19:58 +0000)]
[modules] When an incompatible module file is explicitly provided for a module,
and we fall back to textual inclusion, don't require the module as a whole to
be marked available; it's OK if some other file in the same module is missing,
just as it would be if the header were explicitly marked textual.

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

8 years agoPR19957: [OpenCL] Incorrectly accepts implicit address space conversion with ternary...
Yaxun Liu [Tue, 12 Apr 2016 19:43:36 +0000 (19:43 +0000)]
PR19957: [OpenCL] Incorrectly accepts implicit address space conversion with ternary operator.

Generates addrspacecast instead of bitcast for ternary operator when necessary, and diagnose ternary operator with incompatible second and third operands.

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

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

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

8 years ago[analyzer] Nullability: Suppress return diagnostics in inlined functions.
Devin Coughlin [Tue, 12 Apr 2016 19:29:52 +0000 (19:29 +0000)]
[analyzer] Nullability: Suppress return diagnostics in inlined functions.

The nullability checker can sometimes miss detecting nullability precondition
violations in inlined functions because the binding for the parameter
that violated the precondition becomes dead before the return:

int * _Nonnull callee(int * _Nonnull p2) {
  if (!p2)
    // p2 becomes dead here, so binding removed.
    return 0; // warning here because value stored in p2 is symbolic.
  else
   return p2;
}

int *caller(int * _Nonnull p1) {
  return callee(p1);
}

The fix, which is quite blunt, is to not warn about null returns in inlined
methods/functions. This won’t lose much coverage for ObjC because the analyzer
always analyzes each ObjC method at the top level in addition to inlined. It
*will* lose coverage for C — but there aren’t that many codebases with C
nullability annotations.

rdar://problem/25615050

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

8 years agoclang-cl: Remove -isystem, add -imsvc.
Nico Weber [Tue, 12 Apr 2016 19:04:37 +0000 (19:04 +0000)]
clang-cl: Remove -isystem, add -imsvc.

r260990 exposed -isystem in clang-cl. -isystem adds a directory to the front of
the system include search path. The idea was to use this to point to a hermetic
msvc install, but as it turns out this doesn't work: -isystem then adds the
hermetic headers in front of clang's builtin headers, and clang's headers that
are supposed to wrap msvc headers (say, stdarg.h) aren't picked up at all
anymore.

So revert that, and instead expose -imsvc which works as if the passed
directory was part of %INCLUDE%: The header is treated as a system header, but
it is searched after clang's lib/Header headers.

Fixes half of PRPR26751.

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

8 years ago[OpenCL] Handle AddressSpaceConversion when target address space does not change.
Yaxun Liu [Tue, 12 Apr 2016 19:03:49 +0000 (19:03 +0000)]
[OpenCL] Handle AddressSpaceConversion when target address space does not change.

In codegen different address spaces may be mapped to the same address
space for a target, e.g. in x86/x86-64 all address spaces are mapped
to 0. Therefore AddressSpaceConversion should be translated by
CreatePointerBitCastOrAddrSpaceCast instead of CreateAddrSpaceCast.

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

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

8 years agoStricter checks in the stack-protector codegen test.
Evgeniy Stepanov [Tue, 12 Apr 2016 17:51:59 +0000 (17:51 +0000)]
Stricter checks in the stack-protector codegen test.

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

8 years agoRevert 266090, needs more testing first.
Nico Weber [Tue, 12 Apr 2016 16:52:30 +0000 (16:52 +0000)]
Revert 266090, needs more testing first.

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

8 years agoclang-cl: Expose -nostdlibinc.
Nico Weber [Tue, 12 Apr 2016 16:38:07 +0000 (16:38 +0000)]
clang-cl: Expose -nostdlibinc.

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

8 years ago[FileManager] Don't crash if reading from stdin and stat(".") fails
David Majnemer [Tue, 12 Apr 2016 16:33:53 +0000 (16:33 +0000)]
[FileManager] Don't crash if reading from stdin and stat(".") fails

addAncestorsAsVirtualDirs("<stdin>") quickly returns without doing work
because "<stdin>" has no parent_path.  This violates the expectation
that a subsequent call to getDirectoryFromFile("<stdin>") would succeed.
Instead, it fails because it uses the "." if the file has no path
component.

Fix this by keeping the behavior between addAncestorsAsVirtualDirs and
getDirectoryFromFile symmetric.

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

8 years agoVerify commit right by adding a blank line to test/CodeGenOpenCL/address-spaces-conve...
Yaxun Liu [Tue, 12 Apr 2016 15:46:24 +0000 (15:46 +0000)]
Verify commit right by adding a blank line to test/CodeGenOpenCL/address-spaces-conversions.cl.

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

8 years agoMoving clang-test-depends into the Clang tests folder and moving vtables_blacklist...
Aaron Ballman [Tue, 12 Apr 2016 15:09:17 +0000 (15:09 +0000)]
Moving clang-test-depends into the Clang tests folder and moving vtables_blacklist into the Misc folder; NFC, this simply cleans up the generated solution so that these targets don't live in the root folder of the IDE.

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

8 years agoRemove unused diagnostics. NFC.
Benjamin Kramer [Tue, 12 Apr 2016 11:49:52 +0000 (11:49 +0000)]
Remove unused diagnostics. NFC.

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

8 years ago[OPENMP 4.0] Support for 'linear' clause in 'declare simd' directive.
Alexey Bataev [Tue, 12 Apr 2016 11:02:11 +0000 (11:02 +0000)]
[OPENMP 4.0] Support for 'linear' clause in 'declare simd' directive.

The linear clause declares one or more list items to be private to a SIMD lane and to have a linear relationship with respect to the iteration space of a loop.
'linear' '(' <linear-list> [ ':' <linear-step> ] ')'
When a linear-step expression is specified in a linear clause it must be
either a constant integer expression or an integer-typed parameter that is specified in a uniform clause on the directive.
The special this pointer can be used as if was one of the arguments to the function in any of the linear, aligned, or uniform clauses.

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

8 years ago[OPENMP 4.0] Support for 'aligned' clause in 'declare simd' directive.
Alexey Bataev [Tue, 12 Apr 2016 09:35:56 +0000 (09:35 +0000)]
[OPENMP 4.0] Support for 'aligned' clause in 'declare simd' directive.

The aligned clause declares that the object to which each list item points is aligned to the number of bytes expressed in the optional parameter of the aligned clause.
'aligned' '(' <argument-list> [ ':' <alignment> ] ')'
The optional parameter of the aligned clause, alignment, must be a constant positive integer expression. If no optional parameter is specified, implementation-defined default alignments for SIMD instructions on the target platforms are assumed.
The special this pointer can be used as if was one of the arguments to the function in any of the linear, aligned, or uniform clauses.

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

8 years ago[Clang][BuiltIn][avx512] Adding avx512 (shuf,sqrt{ss|sd},rsqrt ) builtin to clang
Michael Zuckerman [Tue, 12 Apr 2016 07:59:39 +0000 (07:59 +0000)]
[Clang][BuiltIn][avx512] Adding avx512 (shuf,sqrt{ss|sd},rsqrt ) builtin to clang

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

8 years ago[ASTMatchers]: fix crash in hasReturnValue
Matthias Gehre [Tue, 12 Apr 2016 05:43:18 +0000 (05:43 +0000)]
[ASTMatchers]: fix crash in hasReturnValue

Summary:
The crash was reproduced by the included test case. It was initially
found through a crash of clang-tidy's misc-misplaced-widening-cast
check.

Reviewers: klimek, alexfh

Subscribers: cfe-commits, klimek

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

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

8 years ago[OPENMP 4.0] Support for 'uniform' clause in 'declare simd' directive.
Alexey Bataev [Tue, 12 Apr 2016 05:28:34 +0000 (05:28 +0000)]
[OPENMP 4.0] Support for 'uniform' clause in 'declare simd' directive.

OpenMP 4.0 defines clause 'uniform' in 'declare simd' directive:
'uniform' '(' <argument-list> ')'
The uniform clause declares one or more arguments to have an invariant value for all concurrent invocations of the function in the execution of a single SIMD loop.
The special this pointer can be used as if was one of the arguments to the function in any of the linear, aligned, or uniform clauses.

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

8 years agoBasic: fix profiling with GNU EABI
Saleem Abdulrasool [Tue, 12 Apr 2016 03:05:03 +0000 (03:05 +0000)]
Basic: fix profiling with GNU EABI

The GNU profiling support indicates that the interface is `_mcount` rather than
`mcount`.  Conditionalise the behaviour according to the `-meabi gnu` flag.

Resolves PR27311

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

8 years ago[analyzer] Fix assertion in ReturnVisitor for body-farm synthesized getters
Devin Coughlin [Tue, 12 Apr 2016 00:53:26 +0000 (00:53 +0000)]
[analyzer] Fix assertion in ReturnVisitor for body-farm synthesized getters
Don't emit a path note marking the return site if the return statement does not
have a valid location. This fixes an assertion failure I introduced in r265839.

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

8 years agoAllow simultaneous safestack and stackprotector attributes.
Evgeniy Stepanov [Mon, 11 Apr 2016 22:27:55 +0000 (22:27 +0000)]
Allow simultaneous safestack and stackprotector attributes.

This is the clang part of http://reviews.llvm.org/D18846.
SafeStack instrumentation pass adds stack protector canaries if both
attributes are present on a function. StackProtector pass will step
back if the function has a safestack attribute.

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

8 years agolibclang: fix two memory leaks (PR26292)
Hans Wennborg [Mon, 11 Apr 2016 20:53:59 +0000 (20:53 +0000)]
libclang: fix two memory leaks (PR26292)

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

8 years agoAdjust tests to have consistent integer sizes.
Richard Trieu [Mon, 11 Apr 2016 20:37:04 +0000 (20:37 +0000)]
Adjust tests to have consistent integer sizes.

Add a triple to the run lines so that integers will the same sizes across runs.
Also add a compile time check to ensure the assumptions about sizes are met.

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

8 years agoLit C++11 Compatibility Patch #6
Charles Li [Mon, 11 Apr 2016 19:30:25 +0000 (19:30 +0000)]
Lit C++11 Compatibility Patch #6

Updated the expected diagnostics of 17 OpenMP tests.
The changes to each test are identical.

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