summaryrefslogtreecommitdiffstats
path: root/clang/test/PCH
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix a crash when ASTReader emits diagnostic when another one is in flight. ↵Argyrios Kyrtzidis2011-04-252-0/+10
| | | | | | Fixes rdar//9334563. llvm-svn: 130162
* Set the correct anonymous namespace (must be last reopening), and behave ↵Sebastian Redl2011-04-241-0/+20
| | | | | | correctly in the presence of the ever-annoying linkage specifications. llvm-svn: 130105
* Fix adding an anonymous namespace in a chained PCH to a namespace from a ↵Sebastian Redl2011-04-241-0/+41
| | | | | | | | previous PCH. Fix anonymous namespaces in PCH. llvm-svn: 130104
* Synthesizing the definition of an implicit member is an AST modification, so ↵Sebastian Redl2011-04-241-0/+39
| | | | | | notify any mutation listeners of it. This fixes a crasher in chained PCH, where an implicit destructor in a PCH gets a definition in a chained PCH, which is then lost. However, any further use of the destructor would cause its definition to be regenerated in the final file, hiding the bug. llvm-svn: 130103
* On reading DeclContexts from PCH, check for visible updates even if the ↵Sebastian Redl2011-04-241-0/+24
| | | | | | context was empty in the original version. Also, if there are any, tell the context that it has external visible decls. This fixes the problem that a namespace that was empty in the initial PCH (could also happen if the initial PCH didn't include any std header but caused implicit creation of namespace std, e.g. due to implicit declaration of a virtual destructor) never found any declaration declared in *any* chained PCH. Very ugly when the chained PCH includes all that std stuff, as the errors were effectively the same as not including std headers. llvm-svn: 130102
* Store the full list of pending instantiations in a chained PCH. Previously ↵Sebastian Redl2011-04-241-0/+33
| | | | | | we attempted to store only new pending instantiations, but our filter was incorrect, dropping implicit instantiations of class template members. It's just not worth coming up with a complex filter that is correct, when the only cost is PCH files that are a few hundred bytes (at most) larger. llvm-svn: 130098
* C1X: implement generic selectionsPeter Collingbourne2011-04-152-0/+7
| | | | | | | As an extension, generic selection support has been added for all supported languages. The syntax is the same as for C1X. llvm-svn: 129554
* Add support for C++0x's range-based for loops, as specified by the C++11 ↵Richard Smith2011-04-142-0/+54
| | | | | | draft standard (N3291). llvm-svn: 129541
* Chained PCH: Remember when additional specializations are added to a ↵Sebastian Redl2011-04-141-0/+32
| | | | | | function template from a previous PCH. Fixes the only crasher when using massive chains on Clang's Sema component. We still have some incomplete codegen there. llvm-svn: 129516
* Fix AST serialization of reference-to-reference types. This previously causedRichard Smith2011-04-122-0/+19
| | | | | | | | | a crash when deserializing the AST for this: typedef char (&R); extern R &r; llvm-svn: 129358
* Flip the default for showing include stacks on notes to false. ThisChandler Carruth2011-03-271-2/+2
| | | | | | | | | | | | | required modifying a few tests that specifically use note include stacks to check the source manager's view of include stacks. I've simply added the flag to these tests for now, they may have to be more substantially changed if we decide to remove support for note include stacks altogether. Also, add a test for include stacks on notes that was supposed to go in with the previous commit. llvm-svn: 128390
* Diagnose uninitialized uses of a variable within its own initializer.Chandler Carruth2011-03-273-3/+8
| | | | | | | | | | | This is basically the same idea as the warning on uninitialized uses of fields within an initializer list. As such, it is on by default and under -Wuninitialized. Original patch by Richard Trieu, with some massaging from me on the wording and grouping of the diagnostics. llvm-svn: 128376
* The emission of an Objective-C++'s class .cxx_destruct method should beJohn McCall2011-03-221-0/+1
| | | | | | | conditioned on whether it has any destructible ivars, not on whether it has any non-trivial class-object initializers. llvm-svn: 128074
* Add support for the OpenCL vec_step operator, by generalising andPeter Collingbourne2011-03-112-2/+2
| | | | | | | extending the existing support for sizeof and alignof. Original patch by Guy Benyei. llvm-svn: 127475
* Introduce '-chain-include' option to specify headers that will be converted ↵Argyrios Kyrtzidis2011-03-091-3/+1
| | | | | | | | | | to chained PCHs in memory without having to use multiple runs and intermediate files. Intended for testing & debugging of chained PCH. llvm-svn: 127339
* When deserializing CXXBaseSpecifiers (and offsets), make sure to walk the ↵Anders Carlsson2011-03-091-0/+6
| | | | | | chain in the correct order. llvm-svn: 127315
* When writing file references in a pch, make sure to ask the file manager for ↵Anders Carlsson2011-03-083-0/+18
| | | | | | the absolute path. llvm-svn: 127248
* test/PCH/headersearch.cpp: Tweak for Windows hosts especially cygming.NAKAMURA Takumi2011-03-061-3/+3
| | | | | | | This test requires shell feature, to change working directory. On Windows, current directory cannot be moved nor removed. llvm-svn: 127130
* Write CXX base specifier offsets for chained ASTs.Anders Carlsson2011-03-061-0/+5
| | | | llvm-svn: 127126
* When serializing a DeclRefExpr, always store the number of explicit templateAnders Carlsson2011-03-061-0/+19
| | | | | | | | arguments at the same offset, since it's needed when creating the empty DeclRefExpr when deserializing. Fixes a memory corruption issue that would lead to random bugs and crashes. llvm-svn: 127125
* test: Mark 3 tests as XFAIL:cygwin,mingw.NAKAMURA Takumi2011-03-051-1/+1
| | | | llvm-svn: 127077
* test: Mark two tests as XFAIL:mingw.NAKAMURA Takumi2011-03-051-1/+1
| | | | llvm-svn: 127076
* When we're deserializing a template parameter declaration, temporarilyDouglas Gregor2011-03-051-0/+12
| | | | | | | | | | use the translation unit as its declaration context, then deserialize the actual lexical and semantic DeclContexts after the template parameter is complete. This avoids problems when the DeclContext itself (e.g., a class template) is dependent on the template parameter (e.g., for the injected-class-name). llvm-svn: 127056
* Add -fcxx-exceptions to all tests that use C++ exceptions.Anders Carlsson2011-02-282-8/+8
| | | | llvm-svn: 126599
* Make clang -cc1 disable Objective-C exceptions by default, and add a ↵Anders Carlsson2011-02-221-5/+5
| | | | | | | | -fobjc-exceptions flag to turn them on. Update all tests accordingly. llvm-svn: 126177
* Pass -fexceptions to all tests that use try/catch/throw.Anders Carlsson2011-02-192-8/+8
| | | | llvm-svn: 126037
* test/PCH/headersearch.cpp fails on Win32. Not trivial to fix.Francois Pichet2011-02-161-0/+1
| | | | llvm-svn: 125644
* Serialization/deserialization support for floating point #pragmaPeter Collingbourne2011-02-151-0/+17
| | | | | | options, enabled OpenCL extensions and default FP_CONTRACT setting. llvm-svn: 125589
* Allow resolving headers from a PCH even after headers+PCH were moved to ↵Argyrios Kyrtzidis2011-02-151-0/+43
| | | | | | | | | | | another path. Store in PCH the directory that the PCH was originally created in. If a header file is not found at the path that we expect it to be and the PCH file was moved from its original location, try to resolve the file by assuming that header+PCH were moved together and the header is in the same place relative to the PCH. llvm-svn: 125576
* Implement AST/PCH chaining support for macro definitions. Previously,Douglas Gregor2011-02-111-0/+3
| | | | | | | | | | | | | | we would deserialize all of the macro definitions we knew about while serializing the macro definitions at the end of the AST/PCH file. Even though we skipped most of them (since they were unchanged), it's still a performance problem. Now, we do the standard AST/PCH chaining trick: watch what identifiers are deserialized as macro names, and consider only those identifiers (along with macro definitions that have been deserialized/written in the source) when serializing the preprocessor state. llvm-svn: 125324
* When we're writing macro definitions to an AST/PCH File, sort theDouglas Gregor2011-02-101-0/+2
| | | | | | | macro definitions by macro name first. That way, we'll get a stable ordering in the AST/PCH file. llvm-svn: 125297
* Parse: add support for parsing CUDA kernel callsPeter Collingbourne2011-02-091-0/+25
| | | | llvm-svn: 125219
* Implement proper (de-)serialization for explicit template argumentDouglas Gregor2011-02-042-0/+28
| | | | | | | lists with zero template arguments. Fixes some seriously scary crashers in C++ PCH. llvm-svn: 124862
* Remove unnecessary RUN: directive.Axel Naumann2011-02-031-1/+0
| | | | llvm-svn: 124795
* Use tempfiles for the .o outputs.Matt Beaumont-Gay2011-02-011-3/+3
| | | | llvm-svn: 124697
* Fix a thinko where I didn't update a consistency check forDouglas Gregor2011-02-012-0/+29
| | | | | | | PackExpansionType in the AST reader. We need more testing for variadic templates + PCH, but this fixes PR9073. llvm-svn: 124662
* Perform the bad-address-space conversions check as part of John McCall2011-02-011-2/+1
| | | | | | CheckPointerTypesForAssignment. llvm-svn: 124632
* TextDiagnosticPrinter.cpp: Show diagnostics as far as possible even with ↵Axel Naumann2011-01-271-0/+32
| | | | | | | | | | | | | | invalid PresomedLoc, instead of just silencing it. FileManager.cpp: Allow virtual files in nonexistent directories. FileManager.cpp: Close FileDescriptor for virtual files that correspond to actual files. FileManager.cpp: Enable virtual files to be created even for files that were flagged as NON_EXISTENT_FILE, e.g. by a prior (unsuccessful) addFile(). ASTReader.cpp: Read a PCH even if the original source files cannot be found. Add a test for reading a PCH of a file that has been removed and diagnostics referencing that file. llvm-svn: 124374
* Properly propagate #pragma diagnostic mappings from PCH but not command-line ↵Argyrios Kyrtzidis2011-01-142-0/+51
| | | | | | | | warning flags. Addresses rdar://8435969&8852495 llvm-svn: 123462
* Adding a line for XFAIL win32 broke the test.Francois Pichet2010-12-201-1/+0
| | | | | | Remove a line: this test is line position sensitive. llvm-svn: 122231
* test/PCH/reloc.c fails on Win32. Francois Pichet2010-12-201-0/+1
| | | | | | XFAIL for now, I'll investigate why later. llvm-svn: 122229
* Read/write from/to PCH the diagnostic mappings that the user set so that ↵Argyrios Kyrtzidis2010-11-051-0/+19
| | | | | | | | e.g. #pragma clang diagnostic can be used in a PCH. Fixes rdar://8435969. llvm-svn: 118303
* Make the deserialization of C++ base class specifiers lazy, improvingDouglas Gregor2010-10-292-0/+7
| | | | | | the performance of C++ PCH and reducing stack depth in the reader. llvm-svn: 117732
* When de-serializing a type that is supposed to be canonical, callDouglas Gregor2010-10-262-1/+17
| | | | | | | | | | | | | getCanonicalType() to make sure that the type we got back is actually canonical. This is the case for most types, which always build a canonical type when given canonical components. However, some types that involve expressions in their canonicalization (e.g., array types with dependent sizes) don't always build canonical types from canonical components, because there is no such thing as a "canonical" expression. Therefore, we do this extra mapping to ensure that the canonical types we store are actually canonical. llvm-svn: 117344
* Start fleshing out ASTMutationListener; notify when a tag definition is ↵Argyrios Kyrtzidis2010-10-241-1/+0
| | | | | | | | | completed. In that case a chained PCH will record the updates to the DefinitionData pointer of forward references. If a forward reference mutated into a definition re-write it into the chained PCH, this is too big of a change. llvm-svn: 117239
* Simplify and "robust-ify" the way that CXXRecord references point to the ↵Argyrios Kyrtzidis2010-10-241-0/+1
| | | | | | | | definition data when loaded from PCH. Temporary disable 'test/PCH/chain-cxx.cpp' until a better way to fix it is in place. llvm-svn: 117234
* Fix issue with chained PCH where forward references did not pick up later ↵Argyrios Kyrtzidis2010-10-201-0/+7
| | | | | | definition in the chained PCH. llvm-svn: 116887
* Putting back safe fixes 116836,116837,116838Andrew Trick2010-10-193-54/+70
| | | | llvm-svn: 116866
* Reverting 116836,116837,116838 until we resolve the getLangStandardForKind ↵Andrew Trick2010-10-193-70/+54
| | | | | | failures. llvm-svn: 116859
* Merge headers into test/PCH/chain-cxx.cpp for convenience.Argyrios Kyrtzidis2010-10-193-54/+70
| | | | llvm-svn: 116836
OpenPOWER on IntegriCloud