summaryrefslogtreecommitdiffstats
path: root/clang/test/PCH
Commit message (Collapse)AuthorAgeFilesLines
...
* Support C++ try/catch statements for PCH.Argyrios Kyrtzidis2010-07-221-1/+2
| | | | llvm-svn: 109112
* Hide the specializations folding sets of ClassTemplateDecl as an ↵Argyrios Kyrtzidis2010-07-201-0/+5
| | | | | | | | | | | | | implementation detail (InsertPos leaks though) and add methods to its interface for adding/finding specializations. Simplifies its users a bit and we no longer need to replace specializations in the folding set with their redeclarations. We just return the most recent redeclarations. As a bonus, it fixes http://llvm.org/PR7670. llvm-svn: 108832
* Fix http://llvm.org/PR7660Argyrios Kyrtzidis2010-07-191-0/+3
| | | | | | | A ParmVarDecl instantiated from a FunctionProtoType may have Record as DeclContext, in which case isStaticDataMember() will erroneously return true. llvm-svn: 108692
* Make PCHReader cope with PCH files containing more than one predefines buffer.Sebastian Redl2010-07-143-0/+6
| | | | llvm-svn: 108340
* Fix a regression of a previous commit of mine (rdar://8158953).Argyrios Kyrtzidis2010-07-042-1/+6
| | | | | | | Some of the invariant checks for creating Record/Enum types don't hold true during PCH reading. Introduce more suitable ASTContext::getRecordType() and getEnumType(). llvm-svn: 107598
* When setting the anonymous namespace at PCH reading, it may still be ↵Argyrios Kyrtzidis2010-07-032-0/+17
| | | | | | | | initializing so avoid the invariant checks at NamespaceDecl::setAnonymousNamespace(). llvm-svn: 107566
* Provide some test cases for C++ PCH.Argyrios Kyrtzidis2010-07-021-0/+35
| | | | llvm-svn: 107479
* Fix PCH support for UnresolvedUsingTypenameDecl and UnresolvedUsingValueDecl.Argyrios Kyrtzidis2010-06-301-0/+10
| | | | llvm-svn: 107268
* Support DependentSizedArrayType for PCH.Argyrios Kyrtzidis2010-06-301-0/+1
| | | | llvm-svn: 107267
* Support C++ friend declarations for PCH.Argyrios Kyrtzidis2010-06-292-0/+19
| | | | | | | | | | | | This commit 'introduces' a slightly different way to restore the state of the AST object. It makes PCHDeclReader/PCHDeclWriter friends and gives them access to the private members of the object. The rationale is to avoid using/modifying the AST interfaces for PCH read/write so that to: -Avoid complications with objects that have side-effects during creation or when using some setters. -Not 'pollute' the AST interface with methods only used by the PCH reader/writer -Allow AST objects to be read-only. llvm-svn: 107219
* Modify the way sub-statements are stored and retrieved from PCH.Argyrios Kyrtzidis2010-06-282-0/+4
| | | | | | | | | | | | | | | Before this commit, sub-stmts were stored as encountered and when they were placed in the Stmts stack we had to know what index each stmt operand has. This complicated supporting variable sub-stmts and sub-stmts that were contained in TypeSourceInfos, e.g. x = sizeof(int[1]); would crash PCH. Now, sub-stmts are stored in reverse order, from last to first, so that when reading them, in order to get the next sub-stmt we just need to pop the last stmt from the stack. This greatly simplified the way stmts are written and read (just use PCHWriter::AddStmt and PCHReader::ReadStmt accordingly) and allowed variable stmt operands and TypeSourceInfo exprs. llvm-svn: 107087
* Support DependentScopeDeclRefExpr for PCH.Argyrios Kyrtzidis2010-06-281-0/+1
| | | | llvm-svn: 106998
* Fix PCH emitting/reading for template arguments that contain expressions.Argyrios Kyrtzidis2010-06-281-0/+4
| | | | llvm-svn: 106996
* Fix various bugs in recent commits for C++ PCH.Argyrios Kyrtzidis2010-06-281-0/+1
| | | | llvm-svn: 106995
* Support NonTypeTemplateParmDecl for PCH.Argyrios Kyrtzidis2010-06-252-3/+3
| | | | llvm-svn: 106860
* Support UnresolvedLookupExpr for PCH.Argyrios Kyrtzidis2010-06-251-0/+10
| | | | llvm-svn: 106832
* Support UnresolvedMemberExpr for PCH.Argyrios Kyrtzidis2010-06-251-0/+4
| | | | llvm-svn: 106831
* Support a couple more C++ Exprs for PCH.Argyrios Kyrtzidis2010-06-242-2/+28
| | | | llvm-svn: 106727
* Fix broken de/serialization for a couple of C++ Exprs.Argyrios Kyrtzidis2010-06-241-4/+4
| | | | llvm-svn: 106726
* Support C++ class template specializations and partial specializations for PCH.Argyrios Kyrtzidis2010-06-232-5/+21
| | | | llvm-svn: 106625
* Read/write CXXDeleteExpr from/to PCH.Argyrios Kyrtzidis2010-06-221-2/+2
| | | | llvm-svn: 106552
* Support emitting/reading function templates to/from PCH.Argyrios Kyrtzidis2010-06-222-0/+9
| | | | llvm-svn: 106534
* Support PCH emitting/reading of using declarations.Argyrios Kyrtzidis2010-06-202-0/+31
| | | | llvm-svn: 106404
* Include a hack to allow loading of templated CXXRecordDecls and test ↵Argyrios Kyrtzidis2010-06-191-1/+2
| | | | | | template reading from PCH. llvm-svn: 106393
* Initial support for writing templates to PCH.Argyrios Kyrtzidis2010-06-192-0/+9
| | | | llvm-svn: 106391
* Fix PCH issue. Attributes of a declaration were truncated to just one when ↵Argyrios Kyrtzidis2010-06-111-1/+1
| | | | | | the decl was read from a PCH file. llvm-svn: 105852
* pch'ify CXXNewExpr and CXXZeroInitValueExprChris Lattner2010-05-101-4/+22
| | | | llvm-svn: 103390
* pchify CXXTemporary, CXXBindTemporaryExpr, and Chris Lattner2010-05-101-1/+8
| | | | | | CXXExprWithTemporaries. llvm-svn: 103387
* pch'ify default argument definitions and uses.Chris Lattner2010-05-091-4/+7
| | | | llvm-svn: 103376
* pch'ify 'this' and 'throw'Chris Lattner2010-05-091-1/+11
| | | | llvm-svn: 103375
* pch'ify typeid.Chris Lattner2010-05-092-1/+16
| | | | llvm-svn: 103374
* pchify CXXMemberCallExpr correctly. Before it would serializeChris Lattner2010-05-091-0/+5
| | | | | | | and deserialize as a CallExpr which is close, but ends up deserializing with the wrong stmt class. llvm-svn: 103371
* add PCH support for a bunch of C++ Decls, patch byChris Lattner2010-05-072-0/+56
| | | | | | Andrew Sutton! llvm-svn: 103301
* Completely reimplement __builtin_offsetof, based on a patch by RobertoDouglas Gregor2010-04-282-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amadini. This change introduces a new expression node type, OffsetOfExpr, that describes __builtin_offsetof. Previously, __builtin_offsetof was implemented using a unary operator whose subexpression involved various synthesized array-subscript and member-reference expressions, which was ugly and made it very hard to instantiate as a template. OffsetOfExpr represents the AST more faithfully, with proper type source information and a more compact representation. OffsetOfExpr also has support for dependent __builtin_offsetof expressions; it can be value-dependent, but will never be type-dependent (like sizeof or alignof). This commit introduces template instantiation for __builtin_offsetof as well. There are two major caveats to this patch: 1) CodeGen cannot handle the case where __builtin_offsetof is not a constant expression, so it produces an error. So, to avoid regressing in C, we retain the old UnaryOperator-based __builtin_offsetof implementation in C while using the shiny new OffsetOfExpr implementation in C++. The old implementation can go away once we have proper CodeGen support for this case, which we expect won't cause much trouble in C++. 2) __builtin_offsetof doesn't work well with non-POD class types, particularly when the designated field is found within a base class. I will address this in a subsequent patch. Fixes PR5880 and a bunch of assertions when building Boost.Python tests. llvm-svn: 102542
* Improve the AST representation of Objective-C @try/@catch/@finallyDouglas Gregor2010-04-232-0/+34
| | | | | | | | | | statements. Instead of the @try having a single @catch, where all of the @catch's were chained (using an O(n^2) algorithm nonetheless), @try just holds an array of its @catch blocks. The resulting AST is slightly more compact (not important) and better represents the actual language semantics (good). llvm-svn: 102221
* Whenever we complain about a failed initialization of a function orDouglas Gregor2010-04-222-2/+5
| | | | | | | | | | | | | | | | | method parameter, provide a note pointing at the parameter itself so the user does not have to manually look for the function/method being called and match up parameters to arguments. For example, we now get: t.c:4:5: warning: incompatible pointer types passing 'long *' to parameter of type 'int *' [-pedantic] f(long_ptr); ^~~~~~~~ t.c:1:13: note: passing argument to parameter 'x' here void f(int *x); ^ llvm-svn: 102038
* Improve diagnostics like "initializing <type> from an expression ofDouglas Gregor2010-04-091-1/+1
| | | | | | | type..." with "initializing <type> with an expression of type...", which reads better. Thanks to John for the improved wording. llvm-svn: 100873
* Forcibly disable test/PCH/pr4489.c, it is flaky on one of the buildbots.Daniel Dunbar2010-04-091-0/+7
| | | | llvm-svn: 100864
* Improve diagnostics when we fail to convert from a source type to aDouglas Gregor2010-04-092-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | destination type for initialization, assignment, parameter-passing, etc. The main issue fixed here is that we used rather confusing wording for diagnostics such as t.c:2:9: warning: initializing 'char const [2]' discards qualifiers, expected 'char *' [-pedantic] char *name = __func__; ^ ~~~~~~~~ We're not initializing a 'char const [2]', we're initializing a 'char *' with an expression of type 'char const [2]'. Similar problems existed for other diagnostics in this area, so I've normalized them all with more precise descriptive text to say what we're initializing/converting/assigning/etc. from and to. The warning for the code above is now: t.c:2:9: warning: initializing 'char *' from an expression of type 'char const [2]' discards qualifiers [-pedantic] char *name = __func__; ^ ~~~~~~~~ Fixes <rdar://problem/7447179>. llvm-svn: 100832
* Use Daniel's trick for XFAIL'd testsDouglas Gregor2010-03-251-17/+19
| | | | llvm-svn: 99515
* DefangDouglas Gregor2010-03-181-13/+14
| | | | llvm-svn: 98827
* Defang a test that's failing intermittently on windowsDouglas Gregor2010-03-181-4/+5
| | | | llvm-svn: 98825
* XFAIL this test on that silly Windows platform. GrrrDouglas Gregor2010-03-171-0/+2
| | | | llvm-svn: 98750
* Use a simple diagnostic (file modified) when we detect that a file hasDouglas Gregor2010-03-171-3/+3
| | | | | | | changed, rather than trying to point out how it changed. The "why" doesn't matter. llvm-svn: 98725
* Emit output of PCH consistency checking test case to a separate text file ↵Douglas Gregor2010-03-171-3/+6
| | | | | | and grep that llvm-svn: 98695
* Teach SourceManager's content cache to keep track of whether itsDouglas Gregor2010-03-161-0/+1
| | | | | | | | | buffer was invalid when it was created, and use that bit to always set the "Invalid" flag according to whether the buffer is invalid. This ensures that all accesses to an invalid buffer are marked invalid, improving recovery. llvm-svn: 98690
* Audit all Preprocessor::getSpelling() callers, improving failureDouglas Gregor2010-03-161-0/+7
| | | | | | recovery for those that need it. llvm-svn: 98689
* Fix header-search problems with precompiled headers, where theDouglas Gregor2010-03-162-0/+18
| | | | | | | | | | | | | | | | | | | | | | presence or absence of header map arguments when using the precompiled header would cause Clang to get confused about which headers had already been included/imported, along with their controlling macros. The fundamental problem is that the serialization of the header search information was relying on the UIDs of FileEntry objects at PCH generation time and PCH load time to be equivalent, which effectively means that we had to probe the same files in the same order. Differing header map arguments caused an extra FileEntry lookup, but it's easy to imagine other minor command-line arguments triggering this problem. Header-search information is now encoded along with the source-location entry for a file, so that we register information about a file's properties as a header at the same time we create the FileEntry for that file. Fixes <rdar://problem/7743243>. llvm-svn: 98636
* Introduce optional "Invalid" parameters to routines that invoke theDouglas Gregor2010-03-161-0/+11
| | | | | | | | | | | | | SourceManager's getBuffer() and, therefore, could fail, along with Preprocessor::getSpelling(). Use the Invalid parameters in the literal parsers (string, floating point, integral, character) to make them robust against errors that stem from, e.g., PCH files that are not consistent with the underlying file system. I still need to audit every use caller to all of these routines, to determine which ones need specific handling of error conditions. llvm-svn: 98608
* Add PCH test for C++ namespaces, missing from a previous commitDouglas Gregor2010-02-242-0/+27
| | | | llvm-svn: 97061
OpenPOWER on IntegriCloud