aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-12-27Promote arguments of frameaddr / returnaddr builtins to i32 type, when needed.Anton Korobeynikov
This is needed for the platforms, where bitwidth of "int" is not 32 bits (e.g. 16 on msp430). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92176 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-27Add a sanity assertion so that we don't silently generate bad code; I'll fileEli Friedman
a bug with a testcase hitting this assertion in a moment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92175 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-27Fix runline.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92174 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-27Fix PointerExprEvaluator::VisitCastExpr so it doesn't misfold C++ casts whichEli Friedman
it doesn't know how to fold, like derived-to-base casts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92173 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-27Fix obvious mistake.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92172 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-27Fix for PR5872. Add static specifier and const/volatile qualifiers to member ↵Sam Weinig
functions in __PRETTY_FUNCTION__ predefined expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92171 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-26Tests: Tweak LLVM-Code-Symbols test to ignore common and undefined symbols forDaniel Dunbar
now, let's start small. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92170 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-26Don't look through casts when looking for the underlying decl for a functionEli Friedman
call; the standard doesn't expect us to, and the program could be doing something crazy. Fixes PR5882. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92166 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-25Attempted fix for PR5884; this code will be dead soon, but this fix shouldEli Friedman
help for the moment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92165 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-25Driver: Use "g++" as generic gcc name when running in C++ mode, for platformsDaniel Dunbar
that lack real tool definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92164 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-25Make sure operator new[] and operator delete[] match. This will hopefully ↵Benjamin Kramer
silence 3 remaining MSVC warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92163 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-25Remove some dead variables clang-analyzer found.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92162 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-25Fix typo spotted by MSVC.Benjamin Kramer
GRExprEngine.cpp(1348) : warning C4305: 'argument' : truncation from 'clang::ProgramPoint::Kind' to 'bool' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92154 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-25Minor optimization; emit proper unsupported messages for a couple of cases.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92153 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-25Some small improvements to dead code elimination; helps a bit onEli Friedman
LLVM-Code-Symbols test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92152 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Make copy constructor elimination work in more cases; the case in questionEli Friedman
here affects clang-on-clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92151 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Fix for PR5844. Be explicit about anonymous struct/class/union/namespaces in ↵Sam Weinig
__PRETTY_FUNCTION__ predefined expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92149 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Move a bunch of class related functions to CGClass.cpp, no functionality change.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92148 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Sketch a simple new C++Tests suite for checking that llvm-gcc and clang generateDaniel Dunbar
the same visible symbols, useful for finding ABI/Mangler/vtable/etc. issues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92147 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Pass the return value slot to all call exprs.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92145 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Egregious, disgusting workaround for PR5866. We need to rework how weDouglas Gregor
keep track of friends within templates, which will provide a real for PR5866. For now, this makes sure we don't do something entirely stupid with friends of specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92143 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Fill in the return value slot in CGExprAgg::VisitCallExpr. This takes us ↵Anders Carlsson
halfway towards fixing PR5824. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92142 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Add test case for PR5868, and improve location information slightly for ↵Douglas Gregor
implicit "this" expressions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92141 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Add a test for x86-64 struct returns under gc.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92140 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24When rebuilding a MemberExpr that refers to an anonymous union, beDouglas Gregor
sure to perform derived-to-base conversions on the base expression. Fixes PR5868. Proper testcase is coming soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92139 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Pass ReturnValueSlot to EmitCall. No functionality change yet.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92138 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Fix -Asserts warning.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92137 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Add a ReturnValueSlot class. Change the argument order in EmitCall to match ↵Anders Carlsson
the other overload better. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92136 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24When transforming CXXExprWithTemporaries and CXXBindTemporaryExprDouglas Gregor
expressions (e.g., for template instantiation), just transform the subexpressions and return those, since the temporary-related nodes will be implicitly regenerated. Fixes PR5867, but I said that before... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92135 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Fix double-destruction assertion to account for temporaries in conditionalsDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92134 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Assert that we aren't trying to push the same C++ temporary onto the live ↵Douglas Gregor
temporary stack twice. A little insurance against PR5867 surprising us again git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92132 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24InitializationSequence handles binding to temporaries, so thatDouglas Gregor
argument-passing doesn't have to. Fixes PR5867, where we were binding a temporary twice in the AST and, therefore, calling its destructor twice. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92131 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Fix the clang-on-clang build: APFloat reports underflow whenever we get aJohn McCall
denormal, but we only want to diagnose if we underflowed to zero. This allows people to write constants in the denormal range. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92129 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Tweak the text of several main() diagnostics and punch a hole specifically forJohn McCall
Darwin's sekrit fourth argument. This should probably be factored to let targets make target-specific decisions about what main() should look like. Fixes rdar://problem/7414990 or if different platforms have radically different ideas of what they want in git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92128 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Diagnose out-of-bounds floating-point constants. Fixes rdar://problem/6974641John McCall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92127 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Remove some dead code.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92123 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Cleanup some dead code.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92122 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24As Ted suggested, record the callsite information with the StackFrameContext.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92121 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Add analyzer test case for 'ForStmt' with condition variable.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92120 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Enhance dataflow analyses to recognize branch statements in the CFG used as ↵Ted Kremenek
hooks for the initialization of condition variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92119 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Don't set hidden for a non-external symbol as that would make it extenal.Mike Stump
Refine codegen for visibility and hidden. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92118 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Fix for bug 5691.David Chisnall
This fixes throwing exceptions inside @catch blocks nested inside outer @try blocks and also fixes jumping from an inner @finally to an outer @finally (via any relevant @catch blocks). The code exhibiting this bug was based on code from CGObjCMac. I believe that this bug may still be present on the Mac runtimes, although the test case in the bug contains a few GNUisms and won't compile without some minor tweaks with Apple's libobjc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92117 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Inter-procedural analysis: now we can return from the callee.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92116 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Fix bug I just introduced in ForStmt::child_end() where we could iterate off ↵Ted Kremenek
into garbage values. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92115 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Teach GRExprEngine to handle the initialization of the condition variable of ↵Ted Kremenek
a ForStmt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92114 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Add CFG support for the initializer of the condition variable of a ForStmt.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92113 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Coelesce 'DoDestroy()' methods in Stmt.cpp, and modify the child_iterator ↵Ted Kremenek
returned by ForStmt to include the initializer of the condition variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92112 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24CFG tweak: in a WhileStmt, the condition variable initializer is evaluated ↵Ted Kremenek
every time the condition is checked. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92111 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Fix recent regression caught by g++.old-deja/g++.mike/eh19.C.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92109 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Teach GRExprEngine to handle the initialization of the condition variable of ↵Ted Kremenek
a WhileStmt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92106 91177308-0d34-0410-b5e6-96231b3b80d8