summaryrefslogtreecommitdiffstats
path: root/clang/test/PCH
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix an iterator invalidation issue: deserializing a key function can write toRichard Smith2014-07-071-0/+97
| | | | | | | the key functions table. Don't hold references to anything within that table across such an access. llvm-svn: 212437
* Add loop unroll pragma supportEli Bendersky2014-06-111-0/+6
| | | | | | | | http://reviews.llvm.org/D4089 Patch by Mark Heffernan. llvm-svn: 210667
* *Really* fix DOS newlines introduced in r210330Reid Kleckner2014-06-101-62/+62
| | | | | | r210369 didn't quite catch all of them. llvm-svn: 210593
* Adding a new #pragma for the vectorize and interleave optimization hints.Aaron Ballman2014-06-061-0/+62
| | | | | | Patch thanks to Tyler Nowicki! llvm-svn: 210330
* Implemented support for "pragma clang optimize on/off", based on attribute ↵Dario Domizioli2014-05-231-0/+27
| | | | | | | | | | | | | | | | 'optnone'. This patch implements support for selectively disabling optimizations on a range of function definitions through a pragma. The implementation is that all function definitions in the range are decorated with attribute 'optnone'. #pragma clang optimize off // All function definitions in here are decorated with 'optnone'. #pragma clang optimize on // Compilation resumes as normal. llvm-svn: 209510
* Removing an XFAIL which shouldn't apply. We no longer care about MSVC 9, and ↵Aaron Ballman2014-05-191-6/+0
| | | | | | this test probably should not have been XFAILed everywhere regardless. The test passes on Windows with MSVC 12. llvm-svn: 209148
* Fix the AST printer for attributed statements so that it does not print ↵Aaron Ballman2014-05-131-3/+3
| | | | | | duplicate attribute introducers. Eg) [[clang::fallthrough]] instead of [[[[clang::fallthrough]]]] llvm-svn: 208706
* Updated the test case to show that no diagnostics are expected, and not ↵Aaron Ballman2014-05-131-1/+2
| | | | | | require emitting the AST until after the AST printing for statement attributes is updated. llvm-svn: 208703
* No longer triggering a checked iterator assert on Windows when using ↵Aaron Ballman2014-05-131-0/+23
| | | | | | std::copy while deserializing attributed statements with more than one attribute. llvm-svn: 208702
* Objective-C. Reduce false positive warnings with -Wselector by issuing warning Fariborz Jahanian2014-05-091-0/+2
| | | | | | | only when named selector is declared in TU and it is not declared in a system header. rdar://16600230 llvm-svn: 208443
* Split out header integration testsAlp Toker2014-05-041-7/+0
| | | | | | | | | | | | These are somewhat arbitrary tests that check if "thing goes fine" when processing various platform-specific headers. Also move warn-sysheader.cpp to Misc where the other diagnostics infrastructure tests live. File moves only. llvm-svn: 207936
* [PCH/Modules] Don't tie TargetOptions::LinkerVersion to a module/PCH, it's a ↵Argyrios Kyrtzidis2014-04-291-0/+17
| | | | | | | | driver only thing and doesn't affect any language/preprocessor/etc. semantics. rdar://16714526 llvm-svn: 207570
* Move all CUDA testing inputs to Inputs/ subdirectory inside the tests.Eli Bendersky2014-04-282-1/+21
| | | | llvm-svn: 207453
* Update clang/test/PCH/single-token-macro.c corresponding to r206791.NAKAMURA Takumi2014-04-221-0/+5
| | | | | | __stdcall is defined as __attribute__((__stdcall__)) for targeting mingw32. llvm-svn: 206870
* Allow multiple modules with the same name to coexist in the module cacheBen Langmuir2014-04-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To differentiate between two modules with the same name, we will consider the path the module map file that they are defined by* part of the ‘key’ for looking up the precompiled module (pcm file). Specifically, this patch renames the precompiled module (pcm) files from cache-path/<module hash>/Foo.pcm to cache-path/<module hash>/Foo-<hash of module map path>.pcm In addition, I’ve taught the ASTReader to re-resolve the names of imported modules during module loading so that if the header search context changes between when a module was originally built and when it is loaded we can rebuild it if necessary. For example, if module A imports module B first time: clang -I /path/to/A -I /path/to/B ... second time: clang -I /path/to/A -I /different/path/to/B ... will now rebuild A as expected. * in the case of inferred modules, we use the module map file that allowed the inference, not the __inferred_module.map file, since the inferred file path is the same for every inferred module. llvm-svn: 206201
* Updating the capability attribute diagnostics to be more capability-neutral. ↵Aaron Ballman2014-04-011-16/+16
| | | | | | Instead of using terminology such as "lock", "unlock" and "locked", the new terminology is "acquire", "release" and "held". Additionally, the capability attribute's name argument is now reported as part of the diagnostic, instead of hard coding as "mutex." llvm-svn: 205359
* Fix PR18307: Properly (de)serialize inherited constructors and their using ↵Stephan Tolksdorf2014-03-271-0/+39
| | | | | | | | declarations Reviewed in http://llvm-reviews.chandlerc.com/D3102 llvm-svn: 204951
* Serialize and deserialize mangling numbers.Richard Smith2014-03-211-0/+28
| | | | llvm-svn: 204423
* When the exception specification for a function in an imported PCH or module isRichard Smith2014-03-201-9/+38
| | | | | | resolved, emit an update record. llvm-svn: 204403
* Fix PR18806: Canonicalize the replacement type when deserializing a ↵Stephan Tolksdorf2014-03-151-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | SubstTemplateTypeParmType What's going on in the test case (without the patch applied) is this: When the header is parsed, decltype(B()) is canonicalized to decltype(Y()), because that was the first parsed equivalent decltype expression. Hence, the TemplateSpecializationType for Id<decltype(B())> ends up with SubstTemplateTypeParmType(T, decltype(Y())) as the AliasedType member. When the PCH file is included and the AST reader reads Id<decltype(B())>, it sees decltype(B()) before decltype(Y()). So, this time decltype(B()) ends up being the canonical type for both decltypes, which leads to an assert violation when the reader calls getSubstTemplateTypeParmType with the non-canonical decltype(Y()) as the replacement type. Reviewers: rsmith Reviewed By: rsmith CC: cfe-commits, aemerson Differential Revision: http://llvm-reviews.chandlerc.com/D3073 llvm-svn: 204005
* If a module A exports a macro M, and a module B imports that macro and #undef'sRichard Smith2014-03-011-0/+36
| | | | | | | | | | | | | | it, importers of B should not see the macro. This is complicated by the fact that A's macro could also be visible through a different path. The rules (as hashed out on cfe-commits) are included as a documentation update in this change. With this, the number of regressions in libc++'s testsuite when modules are enabled drops from 47 to 7. Those remaining 7 are also macro-related, and are due to remaining bugs in this change (in particular, the handling of submodules is imperfect). llvm-svn: 202560
* Fix broken CHECK linesNico Rieck2014-02-161-2/+2
| | | | llvm-svn: 201477
* Fix PCH deserialization bug with local static symbols being treated as local ↵Ted Kremenek2014-02-112-0/+27
| | | | | | | | | | | | | extern. This triggered a miscompilation of code using Boost's function_template.hpp when it was included inside a PCH file. A local static within that header would be treated as local extern, resulting in the wrong mangling. This only occurred during PCH deserialization. Fixes <rdar://problem/15975816> and <rdar://problem/15926311>. llvm-svn: 201130
* Fix test from r200979 on WindowsBen Langmuir2014-02-071-1/+1
| | | | | | | | | Hopefully the last tweak needed to get this test working everywhere. Remove matching of the prefix of sys_header.h, which was never the point of the test anyway. This avoids dealing with path separators. llvm-svn: 200987
* Fix test from r200979 on non-Darwin systemsBen Langmuir2014-02-071-7/+7
| | | | | | | Add a darwin triple to get the behaviour from isysroot that the test expects. llvm-svn: 200982
* Stat system dependencies when using -verify-pchBen Langmuir2014-02-071-5/+20
| | | | | | | | We don't stat the system headers to check for stalenes during regular PCH loading for performance reasons. When explicitly saying -verify-pch, we want to check all the dependencies - user or system. llvm-svn: 200979
* Revert r194097: "With this patch -Wwrite-strings is still implemented with ↵Argyrios Kyrtzidis2014-02-071-0/+17
| | | | | | | | | | | | | the terrible hack of passing -fconst-strings to -cc1" Passing or not a language option based on diagnostic settings is a bad idea, it breaks using a PCH that was compiled with different diagnostic settings. Also add a test case to make sure we don't regress. llvm-svn: 200964
* Add a CC1 option -verify-pchBen Langmuir2014-02-051-0/+15
| | | | | | | | | This option will: - load the given pch file - verify it is not out of date by stat'ing dependencies, and - return 0 on success and non-zero on error llvm-svn: 200884
* Tweak clang/test/PCH/modified-module-dependency.m for win32 hosts.NAKAMURA Takumi2014-01-171-4/+4
| | | | llvm-svn: 199469
* Improve the error message when a PCH dependency is modifiedBen Langmuir2014-01-172-0/+24
| | | | | | | | | | Show the top-level pch file as the culprit, rather than the immediate dependency when a pch file imports a pcm from a module. To clarify the relationship, the pch import stack is printed as notes. The old behaviour was misleading when a pch imported a pcm (from a module), since removing the pcm would not fix the problem, whereas rebuilding the pch would. llvm-svn: 199446
* ObjectiveC. Improve on diagnostics per Jordan's feedback.Fariborz Jahanian2014-01-151-3/+3
| | | | llvm-svn: 199278
* ObjectiveC. produce more expressive warning whenFariborz Jahanian2014-01-141-3/+3
| | | | | | | -Wselector detects an unimplemented method used in an @selector expression. // rdar://15781538 llvm-svn: 199255
* Remove the -cxx-abi command-line flag.Hans Wennborg2014-01-146-26/+26
| | | | | | | | | | | | | | | This makes the C++ ABI depend entirely on the target: MS ABI for -win32 triples, Itanium otherwise. It's no longer possible to do weird combinations. To be able to run a test with a specific ABI without constraining it to a specific triple, new substitutions are added to lit: %itanium_abi_triple and %ms_abi_triple can be used to get the current target triple adjusted to the desired ABI. For example, if the test suite is running with the i686-pc-win32 target, %itanium_abi_triple will expand to i686-pc-mingw32. Differential Revision: http://llvm-reviews.chandlerc.com/D2545 llvm-svn: 199250
* Update tests in preparation for using the MS ABI for Win32 targetsHans Wennborg2014-01-136-26/+26
| | | | | | | | | | In preparation for making the Win32 triple imply MS ABI mode, make all tests pass in this mode, or make them use the Itanium mode explicitly. Differential Revision: http://llvm-reviews.chandlerc.com/D2401 llvm-svn: 199130
* PCH: fix a crash caused by a circular deserialization dependencyDmitri Gribenko2013-12-191-0/+47
| | | | | | | | | We started by trying to deserialize decltype(func-param) in a trailing return type, which causes the function parameter decl to be deserialized, which pulls in the function decl, which pulls the function type, which pulls the same decltype() in the return type, and then we crashed. llvm-svn: 197644
* Make this test pass on Release builds.Rafael Espindola2013-12-121-1/+1
| | | | | | | On Assert builds the "call" was matching the variable name in %call = call ... llvm-svn: 197167
* Switch to the new MingW ABI.Rafael Espindola2013-12-123-4/+4
| | | | | | | GCC 4.7 changed the MingW ABI. On the clang side this means that methods now have the thiscall calling convention by default. llvm-svn: 197164
* Make the -Wkeyword-compat diag message more accurateAlp Toker2013-12-091-2/+2
| | | | | | | | | | | | | | | | Changed from: keyword '__is_empty' will be treated as an identifier for the remainder of the translation unit To: keyword '__is_empty' will be made available as an identifier for the remainder of the translation unit This is a more accurate description of clang's keyword compatibility feature, given that some of the keywords are turned into context-sensitive keywords (e.g. REVERTIBLE_TYPE_TRAIT) rather than being fully disabled. llvm-svn: 196776
* Remove duplicated -cc1 in testsAlp Toker2013-12-081-3/+3
| | | | llvm-svn: 196728
* Emit an extension warning when changing system header tokensAlp Toker2013-12-032-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | clang converts keywords to identifiers for compatibility with various system headers such as GNU libc. Implement a -Wkeyword-compat extension warning to diagnose those cases. The warning is on by default but will generally be ignored in system headers. It can however be enabled globally to aid standards conformance testing. This also changes the __uptr keyword avoidance from r195710 to no longer special-case system headers, bringing it in line with other similar workarounds in clang. Implementation returns bool for symmetry with token annotation functions. Some examples: warning: keyword '__is_pod' will be treated as an identifier for the remainder of the translation unit [-Wkeyword-compat] struct __is_pod warning: keyword '__uptr' will be treated as an identifier here [-Wkeyword-compat] union w *__uptr; llvm-svn: 196212
* Default to use libc++ on OS X 10.9+ and iOS 7+.Bob Wilson2013-11-021-3/+3
| | | | llvm-svn: 193934
* Change the other -Wtautological-compare warnings to not trigger in templateRichard Trieu2013-11-021-7/+9
| | | | | | | specializations. Also switch to -Wuninitialized for a test case that depended on a warning firing in template specializations. llvm-svn: 193906
* Refactor out the circular reference to LambdaExpr in CXXRecordDecl.Faisal Vali2013-10-231-0/+58
| | | | | | | | | | | | | | | | | A prior commit of this patch was reverted because it was within the blamelist's purview of a failing test. The failure of that test has been addressed here: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131021/091546.html. Therefore I am recommitting this patch (all tests pass on windows, except for the usual modules & index suspects that never pass on my box). Some background: Both Doug and Richard had asked me in Chicago to remove the circular reference in CXXRecordDecl to LambdaExpr by factoring out and storing the needed information from LambdaExpr directly into CXXRecordDecl. In addition, I have added an IsGenericLambda flag - this makes life a little easier when we implement capturing, and are Sema-analyzing the body of a lambda (and the calloperator hasn't been wired to the closure class yet). Any inner lambdas can have potential captures that could require walking up the scope chain and checking if any generic lambdas are capture-ready. This 'bit' makes some of that checking easier. No change in functionality. This patch was approved by Doug with minor modifications (comments were cleaned up, and all data members were converted from bool/enum to unsigned, as requested): http://llvm-reviews.chandlerc.com/D1856 Thanks! llvm-svn: 193246
* Revert r193223 and r193216.Rafael Espindola2013-10-231-58/+0
| | | | | | | | | | They were causing CodeGenCXX/mangle-exprs.cpp to fail. Revert "Remove the circular reference to LambdaExpr in CXXRecordDecl." Revert "Again: Teach TreeTransform and family how to transform generic lambdas nested within templates and themselves." llvm-svn: 193226
* Remove the circular reference to LambdaExpr in CXXRecordDecl.Faisal Vali2013-10-231-0/+58
| | | | | | | | | | | | | | | Both Doug and Richard had asked me to remove the circular reference in CXXRecordDecl to LambdaExpr by factoring out and storing the needed information from LambdaExpr directly into CXXRecordDecl. No change in functionality. In addition, I have added an IsGenericLambda flag - this makes life a little easier when we implement capturing, and are Sema-analyzing the body of a lambda (and the calloperator hasn't been wired to the closure class yet). Any inner lambdas can have potential captures that could require walking up the scope chain and checking if any generic lambdas are capture-ready. This 'bit' makes some of that checking easier. This patch was approved by Doug with minor modifications (comments were cleaned up, and all data members were converted from bool/enum to unsigned, as requested): http://llvm-reviews.chandlerc.com/D1856 Thanks! llvm-svn: 193223
* Sema: Do not allow template declarations inside local classesDavid Majnemer2013-10-222-113/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Enforce the rule in C++11 [temp.mem]p2 that local classes cannot have member templates. This fixes PR16947. N.B. C++14 has slightly different wording to afford generic lambdas declared inside of functions. Fun fact: Some formulations of local classes with member templates would cause clang to crash during Itanium mangling, such as the following: void outer_mem() { struct Inner { template <typename = void> struct InnerTemplateClass { static void itc_mem() {} }; }; Inner::InnerTemplateClass<>::itc_mem(); } Reviewers: eli.friedman, rsmith, doug.gregor, faisalv Reviewed By: doug.gregor CC: cfe-commits, ygao Differential Revision: http://llvm-reviews.chandlerc.com/D1866 llvm-svn: 193144
* Adds Microsoft compatiable C++ record layout code to clang.Warren Hunt2013-10-111-1/+1
| | | | llvm-svn: 192494
* Add compat/extension warnings for init captures.Richard Smith2013-09-281-2/+2
| | | | llvm-svn: 191609
* Per latest drafting, switch to implementing init-captures as if by declaringRichard Smith2013-09-281-0/+28
| | | | | | and capturing a variable declaration, and complete the implementation of them. llvm-svn: 191605
* Implement restriction that a partial specialization must actually specializeRichard Smith2013-09-241-9/+9
| | | | | | something, for variable templates. llvm-svn: 191278
OpenPOWER on IntegriCloud