aboutsummaryrefslogtreecommitdiff
path: root/clang/lib
AgeCommit message (Collapse)AuthorFilesLines
2009-12-23Some cleanup and refactoring of rewriter.Fariborz Jahanian1-4/+26
llvm-svn: 92049
2009-12-23Tidy up ~ASTContext a bit by turning orphan compound statements intoTed Kremenek1-25/+24
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-23Diagnose the use of incomplete types in C++ typeid expressionsDouglas Gregor1-2/+18
llvm-svn: 92045
2009-12-23Remove cv-qualifiers from the argument to typeidDouglas Gregor1-11/+30
llvm-svn: 92041
2009-12-23This patch concludes rewriteing of __block variables to allowFariborz Jahanian1-2/+10
a small test case using Block_copy(...) API to pass. llvm-svn: 92038
2009-12-23Mangle template template parameters. Fixes PR5861.Anders Carlsson1-9/+12
llvm-svn: 92030
2009-12-23Removed a FIXME comment.Fariborz Jahanian1-3/+2
llvm-svn: 92028
2009-12-23More rewriting of __block variables.Fariborz Jahanian1-4/+18
llvm-svn: 92027
2009-12-23fix the microsoft "charify" extension to return the charified token Chris Lattner1-1/+1
as a character literal, not a string literal. This might fix rdar://7486575 llvm-svn: 92025
2009-12-23switch -Werror/-Wfatal-errors error conditions to use diagnostics insteadChris Lattner1-9/+7
of printf, patch by Christian Adaker! llvm-svn: 92019
2009-12-23Fix the overflow calculation in Sema::CheckTemplateArgument to be a bit moreEli Friedman1-1/+8
accurate. llvm-svn: 92018
2009-12-23When using a default function argument for a function template (orDouglas Gregor2-3/+31
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-23Remove RewriteBlocks. It has been superseded by RewriteObjCKovarththanan Rajaratnam4-1161/+0
llvm-svn: 92014
2009-12-23move a few more symbols to .rodata/.data.rel.roNuno Lopes5-5/+5
llvm-svn: 92012
2009-12-23Fix DISABLE_SMART_POINTERS buildDouglas Gregor1-5/+6
llvm-svn: 92008
2009-12-23Add support for handling initializers in RewriteObjC::RewriteByRefVar().Steve Naroff1-5/+16
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-23Register call inliner as the last checker.Zhongxing Xu1-2/+3
llvm-svn: 91992
2009-12-23Migrate the call inliner to the Checker interface.Zhongxing Xu2-34/+70
llvm-svn: 91991
2009-12-23Add 'DeclStmt::DoDestroy()' which doesn't actually recurse over its child ↵Ted Kremenek2-0/+9
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-23For inter-procedural analysis, predecessor node may be in another function.Zhongxing Xu1-3/+3
So we should use the current program point. llvm-svn: 91989
2009-12-23Add CFG support for the condition variable that can appear in IfStmts in C++ ↵Ted Kremenek2-1/+50
mode. Add transfer function support in GRExprEngine for IfStmts with initialized condition variables. llvm-svn: 91987
2009-12-23Suppress dead store warnings involving objects initialized with ↵Ted Kremenek1-0/+4
CXXExprTemporaries. llvm-svn: 91986
2009-12-23Add stack trace pretty printing in GRExprEngine::VisitLValue().Ted Kremenek1-0/+4
llvm-svn: 91985
2009-12-23Fix CXXConstructExpr::getSourceRange() to not include the source ranges of ↵Ted Kremenek1-0/+12
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-23Update for the intrinsic changes in llvm: the object size intrinsicEric Christopher3-2/+13
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-23Teach GRExprEngine::VisitLValue to ignore CXXExprWithTempories (for now).Ted Kremenek1-0/+1
llvm-svn: 91982
2009-12-23Fix PR 5857. When casting from a symbolic region to an integer back to a ↵Ted Kremenek1-8/+9
pointer value, we were not correctly layering the correct ElementRegion on the original SymbolicRegion. llvm-svn: 91981
2009-12-23Remove CharUnits::toString() to eliminate dependence on <string>.Ken Dyck2-21/+0
llvm-svn: 91978
2009-12-23Patch to do more rewrite of __block variables.Fariborz Jahanian1-11/+87
Still WIP. llvm-svn: 91977
2009-12-23Eliminate a completely unnecessary buffer copy when parsing float literals.John McCall1-6/+1
llvm-svn: 91974
2009-12-23Teach GRExprEngine::VisitLValue that we don't handle CXXZeroInitValueExprs yet.Ted Kremenek1-1/+2
llvm-svn: 91970
2009-12-23Also treat the type of the subexpression as a pointer in ↵Ted Kremenek1-0/+1
GRExprEngine::VisitCast when the expression is handled as an lvalue. llvm-svn: 91969
2009-12-23Driver: Fix '... -O4 -O0 ...', which was generating bitcode.Daniel Dunbar1-2/+5
llvm-svn: 91962
2009-12-23Driver: Drop ToolChain::getHost()Daniel Dunbar1-1/+1
llvm-svn: 91960
2009-12-23Set a member's access specifier even if it doesn't match the previous specifier.John McCall1-0/+2
Prevents an assert on successive redeclarations. Fixed PR5573. llvm-svn: 91956
2009-12-23Add basic support for analyzing CastExprs as lvalues.Ted Kremenek1-3/+27
llvm-svn: 91952
2009-12-23Objective-C methods can be variadic, too. Who knew.Douglas Gregor1-0/+7
llvm-svn: 91951
2009-12-23Switch Sema::CreateOverloadedUnaryOp over to InitializationSequence.Douglas Gregor1-3/+8
llvm-svn: 91948
2009-12-22warn when attribute warn_unused_result is applied to void functions.Nuno Lopes1-1/+6
while at it, remove an outdated FIXME llvm-svn: 91946
2009-12-22Allow the first parameter of operator new to be a cv-qualifiedDouglas Gregor3-3/+4
size_t. Also, fix an issue with initialization of parameters in calls, where we weren't removing the cv-qualifiers on the parameter type itself. Fixes PR5823. llvm-svn: 91941
2009-12-22Driver: When linking, don't warn about unused arguments which are obviously onlyDaniel Dunbar1-0/+5
used during compilation. - There is no easy way to define this group properly, unfortunately, and maybe this is a losing strategy. For now this is unambiguous more friendly, though. llvm-svn: 91940
2009-12-22implement -W[no-]fatal-errors, patch by Christian Adåker!Chris Lattner2-2/+38
llvm-svn: 91938
2009-12-22Make sure that reinterpret_cast gets a CastKind on all successfulDouglas Gregor1-1/+5
paths. Fixes "cannot compile this unexpected cast lvalue yet" error in llvm/lib/Analysis/IPA/GlobalsModRef.cpp. llvm-svn: 91932
2009-12-22Add using shadow decls to the "instantiated locals" map, fixing PR5847.John McCall1-0/+5
llvm-svn: 91928
2009-12-22Switch Sema::AddCXXDirectInitializerToDecl over to InitializationSequenceDouglas Gregor3-36/+41
llvm-svn: 91927
2009-12-22Add transfer functions support for visiting an Objective-C message ↵Ted Kremenek2-42/+78
expression as an lvalue when the return type is a C++ reference. llvm-svn: 91926
2009-12-22ARM: Remove a FIXME, it's not actually more complicated than that.Daniel Dunbar1-1/+0
llvm-svn: 91924
2009-12-22Switch parameter passing for overloaded binary operators toDouglas Gregor1-7/+31
InitializationSequence. Fixes the -fsyntax-only failure in llvm/lib/Transforms/Scalar/InstructionCombining.cpp. llvm-svn: 91921
2009-12-22Serialize the NoReturn bit on FunctionTypes for precompiled headersDouglas Gregor2-4/+6
llvm-svn: 91911
2009-12-22Enter the scope of an initializer for direct-initialization as well asDouglas Gregor1-0/+16
for copy-initialization. llvm-svn: 91909