summaryrefslogtreecommitdiffstats
path: root/clang/test/PCH
Commit message (Collapse)AuthorAgeFilesLines
...
* Handle Objective-C type arguments.Douglas Gregor2015-07-071-0/+4
| | | | | | | | | | | | | | | | | | | | | Objective-C type arguments can be provided in angle brackets following an Objective-C interface type. Syntactically, this is the same position as one would provide protocol qualifiers (e.g., id<NSCopying>), so parse both together and let Sema sort out the ambiguous cases. This applies both when parsing types and when parsing the superclass of an Objective-C class, which can now be a specialized type (e.g., NSMutableArray<T> inherits from NSArray<T>). Check Objective-C type arguments against the type parameters of the corresponding class. Verify the length of the type argument list and that each type argument satisfies the corresponding bound. Specializations of parameterized Objective-C classes are represented in the type system as distinct types. Both specialized types (e.g., NSArray<NSString *> *) and unspecialized types (NSArray *) are represented, separately. llvm-svn: 241542
* Parsing, semantic analysis, and AST for Objective-C type parameters.Douglas Gregor2015-07-071-0/+30
| | | | | | | | | | | | | | | | | | | | Produce type parameter declarations for Objective-C type parameters, and attach lists of type parameters to Objective-C classes, categories, forward declarations, and extensions as appropriate. Perform semantic analysis of type bounds for type parameters, both in isolation and across classes/categories/extensions to ensure consistency. Also handle (de-)serialization of Objective-C type parameter lists, along with sundry other things one must do to add a new declaration to Clang. Note that Objective-C type parameters are typedef name declarations, like typedefs and C++11 type aliases, in support of type erasure. Part of rdar://problem/6294649. llvm-svn: 241541
* Account for calling convention specifiers in function definitions in IR test ↵David Blaikie2015-06-294-6/+6
| | | | | | | | | | | | | cases Several tests wouldn't pass when executed on an armv7a_pc_linux triple due to the non-default arm_aapcs calling convention produced on the function definitions in the IR output. Account for this with the application of a little regex. Patch by Ying Yi. llvm-svn: 240971
* [ObjC] Add NSValue support for objc_boxed_expressionsAlex Denisov2015-06-261-0/+13
| | | | | | | | | | | | | Patch extends ObjCBoxedExpr to accept records (structs and unions): typedef struct __attribute__((objc_boxable)) _Color { int r, g, b; } Color; Color color; NSValue *boxedColor = @(color); // [NSValue valueWithBytes:&color objCType:@encode(Color)]; llvm-svn: 240761
* Commit some test changes somehow missed in r239789.Richard Smith2015-06-162-4/+4
| | | | llvm-svn: 239791
* Implementing C99 partial re-initialization behavior (DR-253)Yunzhong Gao2015-06-101-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | Based on previous discussion on the mailing list, clang currently lacks support for C99 partial re-initialization behavior: Reference: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-April/029188.html Reference: http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_253.htm This patch attempts to fix this problem. Given the following code snippet, struct P1 { char x[6]; }; struct LP1 { struct P1 p1; }; struct LP1 l = { .p1 = { "foo" }, .p1.x[2] = 'x' }; // this example is adapted from the example for "struct fred x[]" in DR-253; // currently clang produces in l: { "\0\0x" }, // whereas gcc 4.8 produces { "fox" }; // with this fix, clang will also produce: { "fox" }; Differential Review: http://reviews.llvm.org/D5789 llvm-svn: 239446
* [OPENMP] -fopenmp enables OpenMP support (fix for http://llvm.org/PR23492)Alexey Bataev2015-05-201-2/+2
| | | | | | | -fopenmp turns on OpenMP support and links libiomp5 as OpenMP library. Also there is -fopenmp={libiomp5|libgomp} option that allows to override effect of -fopenmp and link libgomp library (if -fopenmp=libgomp is specified). Differential Revision: http://reviews.llvm.org/D9736 llvm-svn: 237769
* Add the test case from PR 14044 to ensure it doesn't regress.Kaelyn Takata2015-05-081-0/+12
| | | | | | | The test started working at some point, presumably fixed through the delayed typo correction work. llvm-svn: 236883
* DebugInfo: Metadata constructs now start with DI*Duncan P. N. Exon Smith2015-04-291-1/+1
| | | | | | | | | | LLVM r236120 renamed debug info IR constructs to use a `DI` prefix, now that the `DIDescriptor` hierarchy has been gone for about a week. This commit was generated using the rename-md-di-nodes.sh upgrade script attached to PR23080, followed by running clang-format-diff.py on the `lib/` portion of the patch. llvm-svn: 236121
* Use raw_pwrite_stream in clang.Rafael Espindola2015-04-141-2/+2
| | | | | | This is a small improvement to -emit-pth and allows llvm to start requiring it. llvm-svn: 234897
* Bring r234620 back now that llvm is fixed.Rafael Espindola2015-04-131-0/+7
| | | | | | | | | | LLVM can now detect if a fd is seekable on windows. Original commit message: Actually check if lseek works instead of using a filename based heuristic. llvm-svn: 234738
* Revert r234620 and others, "Actually check if lseek works instead of using a ↵NAKAMURA Takumi2015-04-131-10/+0
| | | | | | | | | | filename based heuristic." It was affected by r234615, which was reverted in r234721. r234620, "Actually check if lseek works instead of using a filename based heuristic." r234621, "Testcase for the previous commit." r234718, "Suppress clang/test/PCH/emit-pth.c on win32, for now while investigating." llvm-svn: 234730
* Suppress clang/test/PCH/emit-pth.c on win32, for now while investigating.NAKAMURA Takumi2015-04-131-0/+3
| | | | | | MSVCRT's _lseek(SEEK_CUR) doesn't return -1 for raw_ostream::SupportSeeking. llvm-svn: 234718
* Testcase for the previous commit.Rafael Espindola2015-04-101-0/+7
| | | | | | Sorry, fogot to "git add" the previous time. llvm-svn: 234621
* Run dos2unix on test/PCH/cxx1y-lambdas.mmReid Kleckner2015-04-011-58/+58
| | | | llvm-svn: 233834
* Try to unbreak the Windows buildbots.Filipe Cabecinhas2015-03-031-1/+1
| | | | llvm-svn: 231170
* DebugInfo: Move new hierarchy into place (clang)Duncan P. N. Exon Smith2015-03-031-1/+3
| | | | | | | Update testcases for LLVM change in r231082 to use the new debug info hierarchy. llvm-svn: 231083
* Remove shell requirements from tests that use 'cd'Reid Kleckner2015-03-021-1/+0
| | | | | | | | Modules and Tooling tests in particular tend to want to change the cwd, so we were missing test coverage in this area on Windows. It should now be easier to write such portable tests. llvm-svn: 231029
* Use Itanium triple in test using -WpaddingReid Kleckner2015-02-251-4/+7
| | | | | | | | | -Wpadding is not implemented in the Microsoft record layout builder. This test only passes on Windows because PCH forces us to use the Itanium record layout builder. I'm about to fix that, so change the test to not rely on that ridiculous behavior. llvm-svn: 230524
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-2517-17/+1
| | | | llvm-svn: 230454
* Fix bots failing on an explicit tripleReid Kleckner2015-02-251-0/+3
| | | | | | Why do we need a registered target for this? llvm-svn: 230450
* MS ABI: Add triple to test relying on key functionsReid Kleckner2015-02-251-3/+3
| | | | llvm-svn: 230447
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-2517-1/+17
| | | | | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. This reapplies r230044 with a fixed configure+make build and updated dependencies and testcase requirements. Over the last iteration this version adds - missing target requirements for testcases that specify an x86 triple, - a missing clangCodeGen.a dependency to libClang.a in the make build. rdar://problem/19104245 llvm-svn: 230423
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-241-1/+0
| | | | | | | This reverts commit r230305. Off to fix another round of missing dependencies on various platforms. llvm-svn: 230309
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-241-0/+1
| | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 This reapplies r230044 with a fixed configure+make build and updated dependencies. Take 3. llvm-svn: 230305
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-211-1/+0
| | | | | | | | This reverts commit 230099. The Linux configure+make build variant still needs some work. llvm-svn: 230103
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-201-0/+1
| | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 This reapplies r230044 with a fixed configure+make build and updated dependencies. Take 2. llvm-svn: 230089
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-201-1/+0
| | | | | | | | This reverts commit r230067. Investigating another batch of problems found by the bots. llvm-svn: 230073
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-201-0/+1
| | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 This reapplies r230044 with a fixed configure+make build and updated dependencies. llvm-svn: 230067
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-201-1/+0
| | | | | | | | | This reverts commit r230044 while dealing with buildbot breakage. Conflicts: test/Modules/module_container.m llvm-svn: 230052
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-201-0/+1
| | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 llvm-svn: 230044
* [PCH/Modules] Check that the specific module cache path the PCH was built ↵Argyrios Kyrtzidis2015-02-194-1/+13
| | | | | | | | | | | | with, is the same as the one in the current compiler invocation. If they differ reject the PCH. This protects against the badness occurring from getting modules loaded from different module caches (see crashes). rdar://19889860 llvm-svn: 229909
* PR22405: don't lose implicit-deleted-ness across AST write / read.Richard Smith2015-02-061-0/+18
| | | | llvm-svn: 228464
* Teach AST printing to not print whitespace inside {} and () for initialization,Richard Smith2015-01-302-2/+2
| | | | | | to match LLVM's preferred style. llvm-svn: 227545
* Don't invent a '$auto-x-y' name for auto types in generic lambdas. This is noRichard Smith2015-01-091-1/+1
| | | | | | | | | better than the 'template-parameter-x-y' name that we'd get in AST printing, and is worse in several ways (it's harder to distinguish it from a user-supplied name, it's wrong after substituting some number of outer levels, it wastes time and space constructing an IdentifierInfo, ...). llvm-svn: 225489
* Do not warn on keyword undefSerge Pavlov2014-12-121-2/+0
| | | | | | | #undef a keyword is generally harmless but used often in configuration scripts. Also added tests that I forgot to include to commit in r223114. llvm-svn: 224100
* Emit warning if define or undef reserved identifier or keyword.Serge Pavlov2014-12-111-0/+2
| | | | | | Recommit of r223114, reverted in r223120. llvm-svn: 224012
* Reverted r223114, it caused failure on on clang-native-arm-cortex-a9.Serge Pavlov2014-12-021-2/+0
| | | | llvm-svn: 223120
* Emit warning if define or undef reserved identifier or keyword.Serge Pavlov2014-12-021-0/+2
| | | | | | | | | | | | | | | | | | | | | Summary: This change implements warnings if macro name is identical to a keyword or reserved identifier. The warnings are different depending on the "danger" of the operation. Defining macro that replaces a keyword is on by default. Other cases produce warning that is off by default but can be turned on using option -Wreserved-id-macro. This change fixes PR11488. Reviewers: rnk Reviewed By: rnk Subscribers: rnk, cfe-commits Differential Revision: http://reviews.llvm.org/D6194 llvm-svn: 223114
* [OPENMP] Codegen for threadprivate variablesAlexey Bataev2014-11-111-0/+26
| | | | | | | | | For all threadprivate variables which have constructor/destructor emit call to void __kmpc_threadprivate_register(ident_t * <Current Location>, void *<Original Global Addr>, kmpc_ctor <Constructor>, kmpc_cctor NULL, kmpc_dtor <Destructor>); In expressions all references to such variables are replaced by calls to void *__kmpc_threadprivate_cached(ident_t *<Current Location>, kmp_int32 <Current Thread Id>, void *<Original Global Addr>, size_t <Size of Data>, void ***<Pointer to autogenerated cache – array of private copies of threadprivate variable>); Test test/OpenMP/threadprivate_codegen.cpp checks that codegen is correct. Also it checks that codegen is correct after serialization/deserialization and one of passes verifies debug info. Differential Revision: http://reviews.llvm.org/D4002 llvm-svn: 221663
* Prune CRLF.NAKAMURA Takumi2014-10-271-24/+24
| | | | llvm-svn: 220678
* Allow constant expressions in pragma loop hints.Tyler Nowicki2014-10-121-0/+12
| | | | | | | | Previously loop hints such as #pragma loop vectorize_width(#) required a constant. This patch allows a constant expression to be used as well. Such as a non-type template parameter or an expression (2 * c + 1). Reviewed by Richard Smith llvm-svn: 219589
* test: Disable standard system includes in %clang_cc1Justin Bogner2014-10-031-7/+7
| | | | | | | | | | | | | | This adds -nostdsysteminc to the %clang_cc1 expansion, which should make it harder to accidentally write tests that depend on headers in /usr/include. It also updates a few tests that use -isysroot <x> and a darwin triple to omit the triple and use -isystem <x>/usr/include instead, making them a little bit more general. Incidentally, this fixes a test failure I'm seeing on darwin in Modules/stddef.c, that happens because my system finds a stddef.h in /usr/include. llvm-svn: 219030
* Follow-up to r218292: Add more REVERTIBLE_TYPE_TRAITs.Nico Weber2014-09-242-4/+100
| | | | | | | | | r218292 reverted r197496 because it broke things. In addition to breaking things, r197496 also made all traits starting with __is_ revertible. Reinstantiate that part of r197496 because code out there (e.g. libc++) depends on this behavior. Fixes PR21045. llvm-svn: 218365
* Revert r197496, as it broke REVERTIBLE_TYPE_TRAITs from PCH files.Nico Weber2014-09-232-4/+12
| | | | | | Also add a test to make sure that this doesn't break again. Fixes PR21036. llvm-svn: 218292
* Modify behavior of -ast-dump-lookups: if -ast-dump is not also provided, dumpRichard Smith2014-08-111-2/+2
| | | | | | | | anyway. If -ast-dump *is* also provided, then dump the AST declarations as well as the lookup results. This is invaluable for cross-correlating the lookup information with the declarations actually found. llvm-svn: 215393
* [TEST] Improve tests for #pragma clang optimize off/onDario Domizioli2014-07-281-0/+6
| | | | | | | | Added coverage for: * More than one "off region" in the same file * An "off region" falling off the end of an included file llvm-svn: 214086
* Add support for #pragma nounroll.Mark Heffernan2014-07-241-1/+11
| | | | llvm-svn: 213885
* In unroll pragma syntax and loop hint metadata, change "enable" forms to a ↵Mark Heffernan2014-07-231-2/+2
| | | | | | new form using the string "full". llvm-svn: 213771
* Add support for '#pragma unroll'.Mark Heffernan2014-07-211-0/+22
| | | | llvm-svn: 213574
OpenPOWER on IntegriCloud