Nuno Lopes
c095b5361a
support the warn_unused_result in C++ class methods
...
llvm-svn: 92095
2009-12-24 00:28:18 +00:00
Nuno Lopes
0e7860f21e
allow the noreturn attribute to be used in class methods
...
llvm-svn: 92090
2009-12-23 23:40:33 +00:00
Ted Kremenek
b27a6d24a6
Add StmtIterator support for iterating over both the condition
...
variable initializer and the other expressions in an IfStmt.
This change required adding a 'DoDestroy()' method for IfStmt that did
not include destroying the initializer (since that is owned by the
VarDecl).
llvm-svn: 92089
2009-12-23 23:38:34 +00:00
Ted Kremenek
bff9844327
Tidy up FindSubExprAssignments to not deference the child_iterator multiple times.
...
llvm-svn: 92087
2009-12-23 23:37:10 +00:00
Douglas Gregor
033f675f61
When we see a CXXDefaultArgExpr during template instantiation, rebuild
...
the default argument so that we're sure to mark any referenced
declarations. This gets us another little step closer to fixing
PR5810.
llvm-svn: 92078
2009-12-23 23:03:06 +00:00
Mike Stump
f3c23c0cd4
Fix regression found by g++.dg/eh/alias1.C.
...
llvm-svn: 92072
2009-12-23 22:48:20 +00:00
Ted Kremenek
1bc899f4d3
Increase StmtIterator size by one pointer (separating out the Stmt** from the union including Decl* and Decl**).
...
This change is setup for adding StmtIterator support for condition variables in IfStmt, WhileStmt, etc.
llvm-svn: 92070
2009-12-23 22:31:49 +00:00
Anders Carlsson
a88d197284
Mangle block pointer types. Fixes PR5858.
...
llvm-svn: 92069
2009-12-23 22:31:44 +00:00
Douglas Gregor
247894b361
There is no such thing as typeinfo for a cv-qualified type. Assert
...
that this is true when mangling, then fix up the various places in
Sema and/or CodeGen that need to remove qualifiers. Addresses a
linking issue when building LLVM with Clang.
llvm-svn: 92064
2009-12-23 22:04:40 +00:00
Fariborz Jahanian
65e6bd6246
More cleanup/refactoring of the rewrite.
...
llvm-svn: 92062
2009-12-23 21:52:32 +00:00
Chris Lattner
f0a9ba37d4
simplify my previous patch.
...
llvm-svn: 92057
2009-12-23 21:33:41 +00:00
Chris Lattner
4e1a323b85
fix opencl extvector element extraction on rvalues. We previously
...
error_unsupported on test10 and crashed on test11.
llvm-svn: 92056
2009-12-23 21:31:11 +00:00
Chris Lattner
43c8be526d
comment tweak
...
llvm-svn: 92055
2009-12-23 21:29:53 +00:00
Fariborz Jahanian
4bf727d9e1
Some cleanup and refactoring of rewriter.
...
llvm-svn: 92049
2009-12-23 21:18:41 +00:00
Ted Kremenek
40ee0cc813
Tidy up ~ASTContext a bit by turning orphan compound statements into
...
for loops. Also do not manually free the Type objects when the
'FreeMemory' flag is set, as they will be deallocated when the
BumpPtrAllocator is destroyed.
llvm-svn: 92047
2009-12-23 21:13:52 +00:00
Douglas Gregor
721fb2b6e4
Diagnose the use of incomplete types in C++ typeid expressions
...
llvm-svn: 92045
2009-12-23 21:06:06 +00:00
Douglas Gregor
f45f6828c6
Remove cv-qualifiers from the argument to typeid
...
llvm-svn: 92041
2009-12-23 20:51:04 +00:00
Fariborz Jahanian
cbdcfe802a
This patch concludes rewriteing of __block variables to allow
...
a small test case using Block_copy(...) API to pass.
llvm-svn: 92038
2009-12-23 20:32:38 +00:00
Anders Carlsson
910847c149
Mangle template template parameters. Fixes PR5861.
...
llvm-svn: 92030
2009-12-23 19:30:55 +00:00
Fariborz Jahanian
25c07fa224
Removed a FIXME comment.
...
llvm-svn: 92028
2009-12-23 19:26:34 +00:00
Fariborz Jahanian
7df3980609
More rewriting of __block variables.
...
llvm-svn: 92027
2009-12-23 19:22:33 +00:00
Chris Lattner
3859c74b32
fix the microsoft "charify" extension to return the charified token
...
as a character literal, not a string literal. This might fix
rdar://7486575
llvm-svn: 92025
2009-12-23 19:15:27 +00:00
Chris Lattner
b089c1de55
switch -Werror/-Wfatal-errors error conditions to use diagnostics instead
...
of printf, patch by Christian Adaker!
llvm-svn: 92019
2009-12-23 18:53:37 +00:00
Eli Friedman
38b9ad88e2
Fix the overflow calculation in Sema::CheckTemplateArgument to be a bit more
...
accurate.
llvm-svn: 92018
2009-12-23 18:44:58 +00:00
Douglas Gregor
25ab25f39d
When using a default function argument for a function template (or
...
member function thereof), perform the template instantiation each time
the default argument is needed. This ensures that
(1) We get different CXXTemporary objects for each instantiation, and
(2) Any other instantiations or definitions triggered by the
instantiation of the default argument expression are guaranteed to
happen; previously, they might have been suppressed, e.g., because
they happened in an unevaluated context.
This fixes the majority of PR5810. However, it does not address the
problem where we may have multiple uses of the same CXXTemporary
within an expression when the temporary came from a non-instantiated
default argument expression.
llvm-svn: 92015
2009-12-23 18:19:08 +00:00
Kovarththanan Rajaratnam
55e74a1a6a
Remove RewriteBlocks. It has been superseded by RewriteObjC
...
llvm-svn: 92014
2009-12-23 18:03:34 +00:00
Nuno Lopes
cfca1f0dc1
move a few more symbols to .rodata/.data.rel.ro
...
llvm-svn: 92012
2009-12-23 17:49:57 +00:00
Douglas Gregor
e6600379b1
Fix DISABLE_SMART_POINTERS build
...
llvm-svn: 92008
2009-12-23 17:40:29 +00:00
Steve Naroff
13468371a7
Add support for handling initializers in RewriteObjC::RewriteByRefVar().
...
As the FIXME indicates, RewriteByRefVar() won't work for multiple declarators (in general). I've discussed this with Fariborz and he is aware of the limitation.
llvm-svn: 92007
2009-12-23 17:24:33 +00:00
Zhongxing Xu
d803cc51af
Register call inliner as the last checker.
...
llvm-svn: 91992
2009-12-23 09:15:19 +00:00
Zhongxing Xu
2923046ec4
Migrate the call inliner to the Checker interface.
...
llvm-svn: 91991
2009-12-23 08:56:18 +00:00
Ted Kremenek
00d19ee130
Add 'DeclStmt::DoDestroy()' which doesn't actually recurse over its child expressions (via StmtIterator), as those expressions are owned by the Decls and Types (which are destroyed elsewhere). This fixes a crasher reported in <rdar://problem/7487294>.
...
llvm-svn: 91990
2009-12-23 08:56:00 +00:00
Zhongxing Xu
d2ab38e3f4
For inter-procedural analysis, predecessor node may be in another function.
...
So we should use the current program point.
llvm-svn: 91989
2009-12-23 08:54:57 +00:00
Ted Kremenek
a7bcbde814
Add CFG support for the condition variable that can appear in IfStmts in C++ mode.
...
Add transfer function support in GRExprEngine for IfStmts with initialized condition variables.
llvm-svn: 91987
2009-12-23 04:49:01 +00:00
Ted Kremenek
857f41c650
Suppress dead store warnings involving objects initialized with CXXExprTemporaries.
...
llvm-svn: 91986
2009-12-23 04:11:44 +00:00
Ted Kremenek
76d5225271
Add stack trace pretty printing in GRExprEngine::VisitLValue().
...
llvm-svn: 91985
2009-12-23 04:09:43 +00:00
Ted Kremenek
49ace5cd62
Fix CXXConstructExpr::getSourceRange() to not include the source ranges of CXXDefaultArgExprs when computing its range (since these expressions have no source range, and using them will make the encompassing range invalid).
...
llvm-svn: 91984
2009-12-23 04:00:48 +00:00
Eric Christopher
c87915629b
Update for the intrinsic changes in llvm: the object size intrinsic
...
only takes a boolean second argument now. Update tests accordingly.
Currently the builtin still accepts the full range for compatibility.
llvm-svn: 91983
2009-12-23 03:49:37 +00:00
Ted Kremenek
9a05f20d41
Teach GRExprEngine::VisitLValue to ignore CXXExprWithTempories (for now).
...
llvm-svn: 91982
2009-12-23 03:14:23 +00:00
Ted Kremenek
25e280bf02
Fix PR 5857. When casting from a symbolic region to an integer back to a pointer value, we were not correctly layering the correct ElementRegion on the original SymbolicRegion.
...
llvm-svn: 91981
2009-12-23 02:52:14 +00:00
Ken Dyck
73536eab67
Remove CharUnits::toString() to eliminate dependence on <string>.
...
llvm-svn: 91978
2009-12-23 02:44:11 +00:00
Fariborz Jahanian
02e07737a9
Patch to do more rewrite of __block variables.
...
Still WIP.
llvm-svn: 91977
2009-12-23 02:07:37 +00:00
John McCall
230a5d527e
Eliminate a completely unnecessary buffer copy when parsing float literals.
...
llvm-svn: 91974
2009-12-23 01:37:10 +00:00
Ted Kremenek
bb7a826844
Teach GRExprEngine::VisitLValue that we don't handle CXXZeroInitValueExprs yet.
...
llvm-svn: 91970
2009-12-23 01:25:13 +00:00
Ted Kremenek
343b51271d
Also treat the type of the subexpression as a pointer in GRExprEngine::VisitCast when the expression is handled as an lvalue.
...
llvm-svn: 91969
2009-12-23 01:19:20 +00:00
Daniel Dunbar
e0d2691b88
Driver: Fix '... -O4 -O0 ...', which was generating bitcode.
...
llvm-svn: 91962
2009-12-23 00:47:42 +00:00
Daniel Dunbar
f4894fe0eb
Driver: Drop ToolChain::getHost()
...
llvm-svn: 91960
2009-12-23 00:46:38 +00:00
John McCall
0a4bb26ed0
Set a member's access specifier even if it doesn't match the previous specifier.
...
Prevents an assert on successive redeclarations.
Fixed PR5573.
llvm-svn: 91956
2009-12-23 00:37:40 +00:00
Ted Kremenek
22cc1a8438
Add basic support for analyzing CastExprs as lvalues.
...
llvm-svn: 91952
2009-12-23 00:26:16 +00:00
Douglas Gregor
04c5f973ee
Objective-C methods can be variadic, too. Who knew.
...
llvm-svn: 91951
2009-12-23 00:21:46 +00:00