summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Fix testcase for MSVC targets where the output ordering is different.Adrian Prantl2016-04-151-2/+3
| | | | llvm-svn: 266449
* Update testcase to new debug info metadata format.Adrian Prantl2016-04-151-4/+3
| | | | llvm-svn: 266447
* Update to match LLVM changes for PR27284.Adrian Prantl2016-04-1518-109/+105
| | | | | | | | | (Reverse the ownership between DICompileUnit and DISubprogram.) http://reviews.llvm.org/D19034 <rdar://problem/25256815> llvm-svn: 266445
* ASTMatchers.h: Fix formatting. [-Wdocumentation]NAKAMURA Takumi2016-04-151-3/+3
| | | | llvm-svn: 266444
* Revert r266415, it broke parsing SDK headers (PR27367).Nico Weber2016-04-1520-163/+48
| | | | llvm-svn: 266431
* Remove include duplicate. NFC.Alexey Bader2016-04-151-1/+0
| | | | llvm-svn: 266428
* [MSVC Compat] Implementation of __unaligned (MS extension) as a type qualifierAndrey Bokhanko2016-04-1520-48/+163
| | | | | | | | | | | 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 llvm-svn: 266415
* clang-cl: Don't check for existence of linker inputs when /link is usedHans Wennborg2016-04-152-7/+24
| | | | | | | | | 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 llvm-svn: 266402
* clang-cl: Make /link accept an optional joined argument.Hans Wennborg2016-04-152-3/+4
| | | | | | | | | | 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. llvm-svn: 266395
* Lit C++11 Compatibility Patch #8Charles Li2016-04-1424-92/+529
| | | | | | 24 tests have been updated for C++11 compatibility. llvm-svn: 266387
* AMDGPU: Add test for generic builtin behaviorMatt Arsenault2016-04-141-0/+16
| | | | llvm-svn: 266383
* In vector comparisons, handle scalar LHS just as we handle scalar RHSReid Kleckner2016-04-143-11/+38
| | | | | | | | | | | | Summary: Fixes PR27258 Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19123 llvm-svn: 266366
* Make this code less brittle. The benefits of a fixed-size array aren't worth ↵Richard Smith2016-04-141-9/+5
| | | | | | the maintenance cost. llvm-svn: 266359
* Fix off-by-one error in worst-case number of offsets needed for an AST record.Richard Smith2016-04-142-1/+7
| | | | llvm-svn: 266353
* Add typedefNameDecl() and typeAliasDecl() to the AST matchers; improves ↵Aaron Ballman2016-04-145-9/+85
| | | | | | | | hasType() to match on TypedefNameDecl nodes. Patch by Clement Courbet. llvm-svn: 266331
* Fix testcase for the LLVM_LIBDIR_SUFFIX=64 case. Fallout from r266108.Ismail Donmez2016-04-141-1/+1
| | | | llvm-svn: 266324
* clang-format: Last line in incomplete block is indented incorrectlyMarianne Mailhot-Sarrasin2016-04-142-3/+5
| | | | | | | | | | 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 llvm-svn: 266321
* clang-format: Implemented tab usage for continuation and indentationMarianne Mailhot-Sarrasin2016-04-144-0/+238
| | | | | | | | | | Use tabs to fill whitespace at the start of a line. Patch by Maxime Beaulieu Differential Revision: http://reviews.llvm.org/D19028 llvm-svn: 266320
* clang-format: Allow include of clangFormat.h in managed contextMarianne Mailhot-Sarrasin2016-04-142-1/+5
| | | | | | | | | | | 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 llvm-svn: 266319
* [analyzer] Make it possible to query the function name from a CallDescription.Gabor Horvath2016-04-141-0/+3
| | | | llvm-svn: 266293
* [ASTImporter] Implement some expression-related AST node import.Artem Dergachev2016-04-144-59/+995
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 266292
* Reapply r258505 after r266254, this time with a comment to make it more sticky.Nico Weber2016-04-141-1/+7
| | | | llvm-svn: 266290
* [MSVC] Fix check for wchar_t type in case of -fno-wcharDmitry Polukhin2016-04-142-1/+23
| | | | | | | | | | | 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 llvm-svn: 266287
* [Clang][AVX512][BUILTIN] Adding support for intrinsics of ↵Michael Zuckerman2016-04-145-0/+827
| | | | | | | | vpmov{d|q}{b|w|d}{128|256|512} instruction set Differential Revision: http://reviews.llvm.org/D19055 llvm-svn: 266280
* [Clang][AVX512][Builtin] Adding intrinsics of ↵Michael Zuckerman2016-04-145-0/+832
| | | | | | | | vpmovus{d|q}{b|w|d}{128|256|512} instruction set Differential Revision: http://reviews.llvm.org/D19050 llvm-svn: 266278
* Make sure the LLVMContext outlive the CompilerInstanceMehdi Amini2016-04-141-1/+1
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266277
* Do not use llvm:getGlobalContext() in unittestsMehdi Amini2016-04-141-1/+2
| | | | | | | Currently trying to nuke this API from LLVM. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266276
* [modules] Store the location of the lexical update record in a decl update asRichard Smith2016-04-142-3/+2
| | | | | | | an offset from the current record rather than as an absolute bit number. This gives a minor .pcm file size reduction. llvm-svn: 266269
* Reorder ASTNodeKind::AllKindInfo to match NodeKindId.Alexander Kornienko2016-04-144-15/+25
| | | | | | | | | | | | | | 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 llvm-svn: 266268
* [modules] Remove CXX_BASE_SPECIFIERS_OFFSETS table. Instead of storing an ID ofRichard Smith2016-04-1410-172/+30
| | | | | | | | 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. llvm-svn: 266266
* ObjC kindof: order the methods in global pool relative to availability.Manman Ren2016-04-133-14/+45
| | | | | | | | | | | | | | 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 llvm-svn: 266264
* [CodeGen] Avoid ctor/dtor boilerplate with some C++11Reid Kleckner2016-04-133-113/+94
| | | | | | | | | | | | | | 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 llvm-svn: 266263
* [modules] Remove CXX_CTOR_INITIALIZERS_OFFSETS table. Instead of storing an IDRichard Smith2016-04-1312-180/+50
| | | | | | | | 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. llvm-svn: 266254
* [SemaObjC] Properly handle mix between type arguments and protocols.Bruno Cardoso Lopes2016-04-134-9/+66
| | | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 266245
* Make sure CheckDestructor gets called on dllimported classes if the vtable ↵Hans Wennborg2016-04-132-7/+25
| | | | | | is used (PR27319) llvm-svn: 266242
* Lit C++11 Compatibility Patch #7Charles Li2016-04-1313-97/+527
| | | | | | | 13 tests have been updated for C++11 compatibility. Differential Revision: http://reviews.llvm.org/D19068 llvm-svn: 266239
* [CrashReproducer] Add test to run the reproducer script + modulesBruno Cardoso Lopes2016-04-131-0/+57
| | | | | | | Now that we have basic support in place, make sure the reproducer script works with modules for a simple testcase. llvm-svn: 266235
* [CrashReproducer] Setup 'use-external-names' in YAML files.Bruno Cardoso Lopes2016-04-136-7/+27
| | | | | | | | | | | | | | 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. llvm-svn: 266234
* [VFS] Move default values to in-class member initialization. NFCBruno Cardoso Lopes2016-04-131-3/+3
| | | | llvm-svn: 266233
* Remove redundant null-check; NFCHubert Tong2016-04-131-1/+1
| | | | llvm-svn: 266226
* libclang: Use early-return to reduce indentation.David Blaikie2016-04-131-104/+96
| | | | | | | & since I'll get blamed for all the lines anyway, remove some else-after-return and otherwise tidy things up. llvm-svn: 266224
* Simplify memory management of CXEvalResultKind/ExprEvalResult using ↵David Blaikie2016-04-131-39/+28
| | | | | | | | | | | 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 llvm-svn: 266222
* [analyzer] Nullability: Suppress diagnostic on bind with cast.Devin Coughlin2016-04-132-9/+70
| | | | | | | | | | | | | | 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 llvm-svn: 266219
* [OrderFiles] Don't allow lit to run dtrace multithreadedChris Bieneman2016-04-131-0/+1
| | | | | | 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. llvm-svn: 266213
* AArch64: allow 64-bit access to sysregs.Tim Northover2016-04-132-3/+3
| | | | | | | | 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. llvm-svn: 266212
* ARM: make Darwin's "-arch armv7em" default to hard-float.Tim Northover2016-04-132-8/+14
| | | | | | | | | | 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 llvm-svn: 266211
* [Clang][AVX512][Builtin] Adding support to intrinsics of ↵Michael Zuckerman2016-04-135-0/+826
| | | | | | | | pmovs{d|q}{b|w|d}{128|256|512} instruction set Differential Revision: http://reviews.llvm.org/D19023 llvm-svn: 266202
* Reverting r266199; it causes build bot failures.Aaron Ballman2016-04-136-365/+278
| | | | | | | http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/3255 http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/3517 llvm-svn: 266201
* Add functions declared in ctype.h to builtin function database. All ↵Aaron Ballman2016-04-136-278/+365
| | | | | | | | functions are annotated with nothrow and pure attribute, which enables better optimization. Patch by Taewook Oh. llvm-svn: 266199
* [OPENMP 4.0] Fixed DSA analysis for taskloop directives.Alexey Bataev2016-04-135-36/+39
| | | | | | | Patch make clang to perform analysis for task-based directives also for taskloop-based directives. llvm-svn: 266198
OpenPOWER on IntegriCloud