summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTWriterStmt.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* An insomniac stab at making block declarations list the variables they closeJohn McCall2011-02-021-1/+0
| | | | | | | on, as well as more reliably limiting invalid references to locals from nested scopes. llvm-svn: 124721
* Give OpaqueValueExpr a source location, because its source locationDouglas Gregor2011-01-281-0/+1
| | | | | | | | might be queried in places where we absolutely require a valid location (e.g., for template instantiation). Fixes some major brokenness in the use of __is_convertible_to. llvm-svn: 124465
* Do a proper recursive lookup when deciding whether a class's usualJohn McCall2011-01-271-0/+2
| | | | | | | | | deallocation function has a two-argument form. Store the result of this check in new[] and delete[] nodes. Fixes rdar://problem/8913519 llvm-svn: 124373
* Introduce a new expression kind, SubstNonTypeTemplateParmPackExpr,Douglas Gregor2011-01-151-0/+12
| | | | | | | | | that captures the substitution of a non-type template argument pack for a non-type template parameter pack within a pack expansion that cannot be fully expanded. This follows the approach taken by SubstTemplateTypeParmPackType. llvm-svn: 123506
* Teach PackExpansionExpr to keep track of the number of pack expansionsDouglas Gregor2011-01-141-0/+1
| | | | | | it will expand to, if known. Propagate this information throughout Sema. llvm-svn: 123470
* Add the location of the right parenthesis of a C++ named castDouglas Gregor2011-01-121-1/+2
| | | | | | | (static_cast, dynamic_cast, reinterpret_cast, or const_cast) to improve source-location information. Fixes PR8960. llvm-svn: 123336
* Implement the sizeof...(pack) expression to compute the length of aDouglas Gregor2011-01-041-0/+11
| | | | | | | | | parameter pack. Note that we're missing proper libclang support for the new SizeOfPackExpr expression node. llvm-svn: 122813
* Implement support for pack expansions whose pattern is a non-typeDouglas Gregor2011-01-031-1/+8
| | | | | | | | | | | | | | | | | template argument (described by an expression, of course). For example: template<int...> struct int_tuple { }; template<int ...Values> struct square { typedef int_tuple<(Values*Values)...> type; }; It also lays the foundation for pack expansions in an initializer-list. llvm-svn: 122751
* Variadic templates: extend Type, NestedNameSpecifier, TemplateName,Douglas Gregor2010-12-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | and TemplateArgument with an operation that determines whether there are any unexpanded parameter packs within that construct. Use this information to diagnose the appearance of the names of parameter packs that have not been expanded (C++ [temp.variadic]p5). Since this property is checked often (every declaration, ever expression statement, etc.), we extend Type and Expr with a bit storing the result of this computation, rather than walking the AST each time to determine whether any unexpanded parameter packs occur. This commit is deficient in several ways, which will be remedied with future commits: - Expr has a bit to store the presence of an unexpanded parameter pack, but it is never set. - The error messages don't point out where the unexpanded parameter packs were named in the type/expression, but they should. - We don't check for unexpanded parameter packs in all of the places where we should. - Testing is sparse, pending the resolution of the above three issues. llvm-svn: 121724
* Keep the source location of the selector in ObjCMessageExpr.Argyrios Kyrtzidis2010-12-101-0/+1
| | | | llvm-svn: 121516
* Remove the TypesCompatibleExprClass AST node. Merge its functionality into ↵Francois Pichet2010-12-081-11/+1
| | | | | | BinaryTypeTraitExpr. llvm-svn: 121298
* Type traits intrinsic implementation: __is_base_of(T, U)Francois Pichet2010-12-071-0/+11
| | | | | | New AST node introduced: BinaryTypeTraitExpr; to be reused for more intrinsics. llvm-svn: 121074
* Rename CXXExprWithTemporaries -> ExprWithCleanups; there's no theoreticalJohn McCall2010-12-061-3/+3
| | | | | | reason this is limited to C++, and it's certainly not limited to temporaries. llvm-svn: 120996
* Simplify the ASTs by consolidating ObjCImplicitGetterSetterExpr and ↵John McCall2010-12-021-23/+17
| | | | | | | | ObjCPropertyRefExpr into the latter. llvm-svn: 120643
* Revert r119838 "Don't warn for empty 'if' body if there is a macro that ↵Argyrios Kyrtzidis2010-11-201-1/+1
| | | | | | | | | | expands to nothing" and use a better and more general approach, where NullStmt has a flag to indicate whether it was preceded by an empty macro. Thanks to Abramo Bagnara for the hint! llvm-svn: 119887
* Don't warn for empty 'if' body if there is a macro that expands to nothing, e.g:Argyrios Kyrtzidis2010-11-191-0/+1
| | | | | | | | | if (condition) CALL(0); // empty macro but don't warn for empty body. Fixes rdar://8436021. llvm-svn: 119838
* Calculate the value kind of an expression when it's created andJohn McCall2010-11-181-2/+4
| | | | | | | | | | | | | store it on the expression node. Also store an "object kind", which distinguishes ordinary "addressed" l-values (like variable references and pointer dereferences) and bitfield, @property, and vector-component l-values. Currently we're not using these for much, but I aim to switch pretty much everything calculating l-valueness over to them. For now they shouldn't necessarily be trusted. llvm-svn: 119685
* Add a new expression kind, OpaqueValueExpr, which is useful forJohn McCall2010-11-151-0/+8
| | | | | | | certain internal type-checking procedures as well as for representing certain implicitly-generated operations. Uses to follow. llvm-svn: 119289
* Switch case IDs conflict between chained PCHs; since there is no need to be ↵Argyrios Kyrtzidis2010-10-281-0/+4
| | | | | | global, make them local to a decl. llvm-svn: 117540
* Improve the tracking of source locations for parentheses in constructor calls.Chandler Carruth2010-10-251-1/+3
| | | | | | | | | | | | This adds them where missing, and traces them through PCH. We fix at least one bug in the extents found by the Index library, and make a lot of refactoring tools which care about the exact formulation of a constructor call easier to write. Also some minor cleanups to more consistently follow the friend pattern instead of the setter pattern when rebuilding a serialized AST. Patch originally by Samuel Benzaquen. llvm-svn: 117254
* Eradicate IsSuper field from ObjCImplicitSetterGetterRefExprClassFariborz Jahanian2010-10-151-1/+0
| | | | | | AST node. (finishing off radar 8525788). llvm-svn: 116603
* Read/write to/from PCH DeclarationNameLocs, DeclarationNameInfos and ↵Argyrios Kyrtzidis2010-10-151-11/+6
| | | | | | QualifierInfos (rdar://8513756). llvm-svn: 116598
* Eliminate usage of ObjCSuperExpr used forFariborz Jahanian2010-10-141-8/+9
| | | | | | | 'super' as receiver of property or a setter/getter methods. //rdar: //8525788 llvm-svn: 116483
* Don't warn for an unused label if it has 'unused' attribute. Fixes ↵Argyrios Kyrtzidis2010-09-281-0/+1
| | | | | | rdar://8483139. llvm-svn: 114954
* Implement -Wunused-label.Argyrios Kyrtzidis2010-09-191-0/+1
| | | | llvm-svn: 114315
* Eagerly evaluate type traits in Sema instead of lazily in AST. They actually ↵Sebastian Redl2010-09-131-0/+1
| | | | | | need Sema access to be correct, fixes coming up. llvm-svn: 113782
* When applying 'delete' on a pointer-to-array type match GCC and EDG behavior ↵Argyrios Kyrtzidis2010-09-131-0/+1
| | | | | | | | and treat it as 'delete[]'. Also offer a fix-it hint adding '[]'. llvm-svn: 113778
* Serialization support for CXXNoexceptExpr.Sebastian Redl2010-09-101-0/+9
| | | | llvm-svn: 113627
* Add proper type-source information to UnaryTypeTraitExpr, includingDouglas Gregor2010-09-091-1/+1
| | | | | | libclang visitation. llvm-svn: 113492
* When building SwitchStmts in Sema, record whether all the enum values of a ↵Ted Kremenek2010-09-091-0/+1
| | | | | | | | | | switch(enum) where covered by individual case statements. Flow-based analyses may wish to consult this information, and recording this in the AST allows us to obviate reconstructing this information later when we build the CFG. llvm-svn: 113447
* Microsoft's __uuidof operator implementation part 1.Francois Pichet2010-09-081-0/+13
| | | | llvm-svn: 113356
* Provide proper type-source location information forDouglas Gregor2010-09-081-4/+3
| | | | | | | | CXXTemporaryObjectExpr, CXXScalarValueInitExpr, and CXXUnresolvedConstructExpr, getting rid of a bunch of FIXMEs in the process. llvm-svn: 113319
* Improve source-location information for CXXNewExpr, by hanging on toDouglas Gregor2010-09-071-0/+1
| | | | | | the TypeSourceInfo for the allocated type. Fixes PR7501. llvm-svn: 113291
* Eliminate CXXBindReferenceExpr, which was used in a ton ofDouglas Gregor2010-09-021-9/+0
| | | | | | well-intentioned but completely unused code. llvm-svn: 112868
* AST work to support [C++] [IRgen] for ?: with missing LHSFariborz Jahanian2010-08-311-0/+1
| | | | | | | This is also pr7726 and wip. No change in functionality at this time. llvm-svn: 112612
* More incremental progress towards not including Expr.h in Sema.h.John McCall2010-08-251-1/+1
| | | | llvm-svn: 112044
* Regularize the API for accessing explicit template arguments.John McCall2010-08-191-5/+4
| | | | llvm-svn: 111584
* Rename pch namespace to serialization.Sebastian Redl2010-08-181-107/+107
| | | | llvm-svn: 111478
* Rename PCHWriter.h to ASTWriter.hSebastian Redl2010-08-181-1/+1
| | | | llvm-svn: 111466
* Rename the ASTWriter implementation filesSebastian Redl2010-08-181-0/+1370
llvm-svn: 111465
OpenPOWER on IntegriCloud