Argyrios Kyrtzidis
de2bdf637e
Revert r119838 "Don't warn for empty 'if' body if there is a macro that 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
2010-11-20 02:04:01 +00:00
Argyrios Kyrtzidis
90ee2a4ecf
Don't warn for empty 'if' body if there is a macro that expands to nothing, e.g:
...
if (condition)
CALL(0); // empty macro but don't warn for empty body.
Fixes rdar://8436021.
llvm-svn: 119838
2010-11-19 20:54:25 +00:00
John McCall
7decc9e4ea
Calculate the value kind of an expression when it's created and
...
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
2010-11-18 06:31:45 +00:00
John McCall
8d69a2160e
Add a new expression kind, OpaqueValueExpr, which is useful for
...
certain internal type-checking procedures as well as for representing
certain implicitly-generated operations. Uses to follow.
llvm-svn: 119289
2010-11-15 23:31:06 +00:00
Argyrios Kyrtzidis
d9f526fc2e
Switch case IDs conflict between chained PCHs; since there is no need to be global, make them local to a decl.
...
llvm-svn: 117540
2010-10-28 09:29:32 +00:00
Chandler Carruth
0171815ae1
Improve the tracking of source locations for parentheses in constructor calls.
...
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
2010-10-25 08:47:36 +00:00
Fariborz Jahanian
4f99b59df6
Eradicate IsSuper field from ObjCImplicitSetterGetterRefExprClass
...
AST node. (finishing off radar 8525788).
llvm-svn: 116603
2010-10-15 18:40:05 +00:00
Argyrios Kyrtzidis
434383d703
Read/write to/from PCH DeclarationNameLocs, DeclarationNameInfos and QualifierInfos (rdar://8513756).
...
llvm-svn: 116598
2010-10-15 18:21:24 +00:00
Fariborz Jahanian
681c0754d9
Eliminate usage of ObjCSuperExpr used for
...
'super' as receiver of property or a setter/getter
methods. //rdar: //8525788
llvm-svn: 116483
2010-10-14 16:04:05 +00:00
Argyrios Kyrtzidis
9f48354b71
Don't warn for an unused label if it has 'unused' attribute. Fixes rdar://8483139.
...
llvm-svn: 114954
2010-09-28 14:54:07 +00:00
Argyrios Kyrtzidis
72664df103
Implement -Wunused-label.
...
llvm-svn: 114315
2010-09-19 21:21:25 +00:00
Sebastian Redl
8eb06f17c4
Eagerly evaluate type traits in Sema instead of lazily in AST. They actually need Sema access to be correct, fixes coming up.
...
llvm-svn: 113782
2010-09-13 20:56:31 +00:00
Argyrios Kyrtzidis
14ec9f674a
When applying 'delete' on a pointer-to-array type match GCC and EDG behavior and treat it as 'delete[]'.
...
Also offer a fix-it hint adding '[]'.
llvm-svn: 113778
2010-09-13 20:15:54 +00:00
Sebastian Redl
9ac55dd8e4
Serialization support for CXXNoexceptExpr.
...
llvm-svn: 113627
2010-09-10 20:55:54 +00:00
Douglas Gregor
54e5b13a27
Add proper type-source information to UnaryTypeTraitExpr, including
...
libclang visitation.
llvm-svn: 113492
2010-09-09 16:14:44 +00:00
Ted Kremenek
c42f345157
When building SwitchStmts in Sema, record whether all the enum values of a 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
2010-09-09 00:05:53 +00:00
Francois Pichet
9f4f2078d6
Microsoft's __uuidof operator implementation part 1.
...
llvm-svn: 113356
2010-09-08 12:20:18 +00:00
Douglas Gregor
2b88c115f9
Provide proper type-source location information for
...
CXXTemporaryObjectExpr, CXXScalarValueInitExpr, and
CXXUnresolvedConstructExpr, getting rid of a bunch of FIXMEs in the
process.
llvm-svn: 113319
2010-09-08 00:15:04 +00:00
Douglas Gregor
0744ef6371
Improve source-location information for CXXNewExpr, by hanging on to
...
the TypeSourceInfo for the allocated type. Fixes PR7501.
llvm-svn: 113291
2010-09-07 21:49:58 +00:00
Douglas Gregor
6429f5cf29
Eliminate CXXBindReferenceExpr, which was used in a ton of
...
well-intentioned but completely unused code.
llvm-svn: 112868
2010-09-02 21:50:02 +00:00
Fariborz Jahanian
c6bf0bd51b
AST work to support [C++] [IRgen] for ?: with missing LHS
...
This is also pr7726 and wip. No change in functionality
at this time.
llvm-svn: 112612
2010-08-31 18:02:20 +00:00
John McCall
2536c6da0e
More incremental progress towards not including Expr.h in Sema.h.
...
llvm-svn: 112044
2010-08-25 10:28:54 +00:00
John McCall
b3774b5c1e
Regularize the API for accessing explicit template arguments.
...
llvm-svn: 111584
2010-08-19 23:49:38 +00:00
Sebastian Redl
539c506152
Rename pch namespace to serialization.
...
llvm-svn: 111478
2010-08-18 23:57:32 +00:00
Sebastian Redl
1914c6fef8
Rename PCHWriter.h to ASTWriter.h
...
llvm-svn: 111466
2010-08-18 23:56:37 +00:00
Sebastian Redl
d6522cfc6d
Rename the ASTWriter implementation files
...
llvm-svn: 111465
2010-08-18 23:56:31 +00:00