]>
granicus.if.org Git - clang/log
Eli Friedman [Fri, 25 Dec 2009 23:59:21 +0000 (23:59 +0000)]
Attempted fix for PR5884; this code will be dead soon, but this fix should
help for the moment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92165
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 25 Dec 2009 20:21:23 +0000 (20:21 +0000)]
Driver: Use "g++" as generic gcc name when running in C++ mode, for platforms
that lack real tool definitions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92164
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 25 Dec 2009 17:06:27 +0000 (17:06 +0000)]
Make sure operator new[] and operator delete[] match. This will hopefully silence 3 remaining MSVC warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92163
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 25 Dec 2009 15:43:36 +0000 (15:43 +0000)]
Remove some dead variables clang-analyzer found.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92162
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 25 Dec 2009 09:44:02 +0000 (09:44 +0000)]
Fix typo spotted by MSVC.
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
Eli Friedman [Fri, 25 Dec 2009 06:17:05 +0000 (06:17 +0000)]
Minor optimization; emit proper unsupported messages for a couple of cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92153
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 25 Dec 2009 05:29:40 +0000 (05:29 +0000)]
Some small improvements to dead code elimination; helps a bit on
LLVM-Code-Symbols test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92152
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 24 Dec 2009 23:33:34 +0000 (23:33 +0000)]
Make copy constructor elimination work in more cases; the case in question
here affects clang-on-clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92151
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sam Weinig [Thu, 24 Dec 2009 23:15:03 +0000 (23:15 +0000)]
Fix for PR5844. Be explicit about anonymous struct/class/union/namespaces in __PRETTY_FUNCTION__ predefined expression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92149
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 24 Dec 2009 22:46:43 +0000 (22:46 +0000)]
Move a bunch of class related functions to CGClass.cpp, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92148
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 24 Dec 2009 21:27:38 +0000 (21:27 +0000)]
Sketch a simple new C++Tests suite for checking that llvm-gcc and clang generate
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
Anders Carlsson [Thu, 24 Dec 2009 21:13:40 +0000 (21:13 +0000)]
Pass the return value slot to all call exprs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92145
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 24 Dec 2009 20:56:24 +0000 (20:56 +0000)]
Egregious, disgusting workaround for PR5866. We need to rework how we
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
Anders Carlsson [Thu, 24 Dec 2009 20:40:36 +0000 (20:40 +0000)]
Fill in the return value slot in CGExprAgg::VisitCallExpr. This takes us halfway towards fixing PR5824.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92142
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 24 Dec 2009 20:23:34 +0000 (20:23 +0000)]
Add test case for PR5868, and improve location information slightly for implicit "this" expressions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92141
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 24 Dec 2009 20:21:41 +0000 (20:21 +0000)]
Add a test for x86-64 struct returns under gc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92140
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 24 Dec 2009 20:02:50 +0000 (20:02 +0000)]
When rebuilding a MemberExpr that refers to an anonymous union, be
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
Anders Carlsson [Thu, 24 Dec 2009 19:25:24 +0000 (19:25 +0000)]
Pass ReturnValueSlot to EmitCall. No functionality change yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92138
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 24 Dec 2009 19:19:26 +0000 (19:19 +0000)]
Fix -Asserts warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92137
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 24 Dec 2009 19:08:58 +0000 (19:08 +0000)]
Add a ReturnValueSlot class. Change the argument order in EmitCall to match the other overload better.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92136
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 24 Dec 2009 18:51:59 +0000 (18:51 +0000)]
When transforming CXXExprWithTemporaries and CXXBindTemporaryExpr
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
Douglas Gregor [Thu, 24 Dec 2009 18:16:21 +0000 (18:16 +0000)]
Fix double-destruction assertion to account for temporaries in conditionals
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92134
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 24 Dec 2009 17:48:05 +0000 (17:48 +0000)]
Assert that we aren't trying to push the same C++ temporary onto the live 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
Douglas Gregor [Thu, 24 Dec 2009 17:16:46 +0000 (17:16 +0000)]
InitializationSequence handles binding to temporaries, so that
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
John McCall [Thu, 24 Dec 2009 11:09:08 +0000 (11:09 +0000)]
Fix the clang-on-clang build: APFloat reports underflow whenever we get a
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
John McCall [Thu, 24 Dec 2009 09:58:38 +0000 (09:58 +0000)]
Tweak the text of several main() diagnostics and punch a hole specifically for
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
John McCall [Thu, 24 Dec 2009 09:08:04 +0000 (09:08 +0000)]
Diagnose out-of-bounds floating-point constants. Fixes rdar://problem/
6974641
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92127
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 24 Dec 2009 07:29:41 +0000 (07:29 +0000)]
Remove some dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92123
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 24 Dec 2009 06:52:05 +0000 (06:52 +0000)]
Cleanup some dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92122
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 24 Dec 2009 03:34:38 +0000 (03:34 +0000)]
As Ted suggested, record the callsite information with the StackFrameContext.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92121
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Dec 2009 02:41:19 +0000 (02:41 +0000)]
Add analyzer test case for 'ForStmt' with condition variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92120
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Dec 2009 02:40:30 +0000 (02:40 +0000)]
Enhance dataflow analyses to recognize branch statements in the CFG used as hooks for the initialization of condition variables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92119
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 24 Dec 2009 02:33:48 +0000 (02:33 +0000)]
Don't set hidden for a non-external symbol as that would make it extenal.
Refine codegen for visibility and hidden. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92118
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Chisnall [Thu, 24 Dec 2009 02:26:34 +0000 (02:26 +0000)]
Fix for bug 5691.
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
Zhongxing Xu [Thu, 24 Dec 2009 02:25:21 +0000 (02:25 +0000)]
Inter-procedural analysis: now we can return from the callee.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92116
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Dec 2009 01:59:46 +0000 (01:59 +0000)]
Fix bug I just introduced in ForStmt::child_end() where we could iterate off into garbage values.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92115
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Dec 2009 01:49:25 +0000 (01:49 +0000)]
Teach GRExprEngine to handle the initialization of the condition variable of a ForStmt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92114
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Dec 2009 01:49:06 +0000 (01:49 +0000)]
Add CFG support for the initializer of the condition variable of a ForStmt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92113
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Dec 2009 01:48:39 +0000 (01:48 +0000)]
Coelesce 'DoDestroy()' methods in Stmt.cpp, and modify the child_iterator 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
Ted Kremenek [Thu, 24 Dec 2009 01:34:10 +0000 (01:34 +0000)]
CFG tweak: in a WhileStmt, the condition variable initializer is evaluated every time the condition is checked.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92111
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 24 Dec 2009 01:10:27 +0000 (01:10 +0000)]
Fix recent regression caught by g++.old-deja/g++.mike/eh19.C.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92109
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Dec 2009 00:54:56 +0000 (00:54 +0000)]
Teach GRExprEngine to handle the initialization of the condition variable of a WhileStmt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92106
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Dec 2009 00:54:37 +0000 (00:54 +0000)]
Add CFG support for the initializer of the condition variable of a WhileStmt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92105
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Dec 2009 00:54:19 +0000 (00:54 +0000)]
Modify WhileStmt::child_begin()/child_end() to include the initializer for the condition variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92104
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Dec 2009 00:48:11 +0000 (00:48 +0000)]
Add test case for PR 4358.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92103
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Dec 2009 00:40:03 +0000 (00:40 +0000)]
Teach GRExprEngine to handle the initialization of the condition variable of a SwitchStmt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92102
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Dec 2009 00:39:26 +0000 (00:39 +0000)]
Add CFG support for the initializer of the condition variable of a SwitchStmt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92101
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Dec 2009 00:39:05 +0000 (00:39 +0000)]
Modify SwitchStmt::child_begin()/child_end() to include the initializer for the condition variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92100
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Thu, 24 Dec 2009 00:28:18 +0000 (00:28 +0000)]
support the warn_unused_result in C++ class methods
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92095
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Wed, 23 Dec 2009 23:40:33 +0000 (23:40 +0000)]
allow the noreturn attribute to be used in class methods
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92090
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 23 Dec 2009 23:38:34 +0000 (23:38 +0000)]
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).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92089
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 23 Dec 2009 23:37:10 +0000 (23:37 +0000)]
Tidy up FindSubExprAssignments to not deference the child_iterator multiple times.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92087
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 23 Dec 2009 23:03:06 +0000 (23:03 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92078
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 23 Dec 2009 22:48:20 +0000 (22:48 +0000)]
Fix regression found by g++.dg/eh/alias1.C.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92072
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 23 Dec 2009 22:31:49 +0000 (22:31 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92070
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 23 Dec 2009 22:31:44 +0000 (22:31 +0000)]
Mangle block pointer types. Fixes PR5858.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92069
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Dec 2009 22:06:12 +0000 (22:06 +0000)]
fix typo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92065
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 23 Dec 2009 22:04:40 +0000 (22:04 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92064
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 23 Dec 2009 21:52:32 +0000 (21:52 +0000)]
More cleanup/refactoring of the rewrite.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92062
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Dec 2009 21:33:41 +0000 (21:33 +0000)]
simplify my previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92057
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Dec 2009 21:31:11 +0000 (21:31 +0000)]
fix opencl extvector element extraction on rvalues. We previously
error_unsupported on test10 and crashed on test11.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92056
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Dec 2009 21:29:53 +0000 (21:29 +0000)]
comment tweak
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92055
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 23 Dec 2009 21:18:41 +0000 (21:18 +0000)]
Some cleanup and refactoring of rewriter.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92049
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 23 Dec 2009 21:13:52 +0000 (21:13 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92047
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 23 Dec 2009 21:06:06 +0000 (21:06 +0000)]
Diagnose the use of incomplete types in C++ typeid expressions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92045
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 23 Dec 2009 20:59:39 +0000 (20:59 +0000)]
Rename test file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92044
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 23 Dec 2009 20:58:27 +0000 (20:58 +0000)]
Change test case to use 'clang -cc1' (without --disable-free) instead of c-index-test (whose memory management behavior may change in the future).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92043
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 23 Dec 2009 20:51:04 +0000 (20:51 +0000)]
Remove cv-qualifiers from the argument to typeid
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92041
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 23 Dec 2009 20:32:38 +0000 (20:32 +0000)]
This patch concludes rewriteing of __block variables to allow
a small test case using Block_copy(...) API to pass.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92038
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 23 Dec 2009 19:30:55 +0000 (19:30 +0000)]
Mangle template template parameters. Fixes PR5861.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92030
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 23 Dec 2009 19:26:34 +0000 (19:26 +0000)]
Removed a FIXME comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92028
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 23 Dec 2009 19:22:33 +0000 (19:22 +0000)]
More rewriting of __block variables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92027
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Dec 2009 19:15:27 +0000 (19:15 +0000)]
fix the microsoft "charify" extension to return the charified token
as a character literal, not a string literal. This might fix
rdar://
7486575
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92025
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Dec 2009 19:08:19 +0000 (19:08 +0000)]
update comments
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92022
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Dec 2009 18:53:37 +0000 (18:53 +0000)]
switch -Werror/-Wfatal-errors error conditions to use diagnostics instead
of printf, patch by Christian Adaker!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92019
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 23 Dec 2009 18:44:58 +0000 (18:44 +0000)]
Fix the overflow calculation in Sema::CheckTemplateArgument to be a bit more
accurate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92018
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 23 Dec 2009 18:19:08 +0000 (18:19 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92015
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kovarththanan Rajaratnam [Wed, 23 Dec 2009 18:03:34 +0000 (18:03 +0000)]
Remove RewriteBlocks. It has been superseded by RewriteObjC
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92014
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Wed, 23 Dec 2009 17:49:57 +0000 (17:49 +0000)]
move a few more symbols to .rodata/.data.rel.ro
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92012
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 23 Dec 2009 17:43:32 +0000 (17:43 +0000)]
Don't commit my silly little local changes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92010
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 23 Dec 2009 17:42:06 +0000 (17:42 +0000)]
Don't disable smart pointers, silly
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92009
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 23 Dec 2009 17:40:29 +0000 (17:40 +0000)]
Fix DISABLE_SMART_POINTERS build
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92008
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 23 Dec 2009 17:24:33 +0000 (17:24 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92007
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 23 Dec 2009 09:15:19 +0000 (09:15 +0000)]
Register call inliner as the last checker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91992
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 23 Dec 2009 08:56:18 +0000 (08:56 +0000)]
Migrate the call inliner to the Checker interface.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91991
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 23 Dec 2009 08:56:00 +0000 (08:56 +0000)]
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 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91990
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 23 Dec 2009 08:54:57 +0000 (08:54 +0000)]
For inter-procedural analysis, predecessor node may be in another function.
So we should use the current program point.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91989
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 23 Dec 2009 04:49:01 +0000 (04:49 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91987
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 23 Dec 2009 04:11:44 +0000 (04:11 +0000)]
Suppress dead store warnings involving objects initialized with CXXExprTemporaries.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91986
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 23 Dec 2009 04:09:43 +0000 (04:09 +0000)]
Add stack trace pretty printing in GRExprEngine::VisitLValue().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91985
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 23 Dec 2009 04:00:48 +0000 (04:00 +0000)]
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).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91984
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 23 Dec 2009 03:49:37 +0000 (03:49 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91983
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 23 Dec 2009 03:14:23 +0000 (03:14 +0000)]
Teach GRExprEngine::VisitLValue to ignore CXXExprWithTempories (for now).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91982
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 23 Dec 2009 02:52:14 +0000 (02:52 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91981
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ken Dyck [Wed, 23 Dec 2009 02:44:11 +0000 (02:44 +0000)]
Remove CharUnits::toString() to eliminate dependence on <string>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91978
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 23 Dec 2009 02:07:37 +0000 (02:07 +0000)]
Patch to do more rewrite of __block variables.
Still WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91977
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 23 Dec 2009 01:37:10 +0000 (01:37 +0000)]
Eliminate a completely unnecessary buffer copy when parsing float literals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91974
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 23 Dec 2009 01:25:13 +0000 (01:25 +0000)]
Teach GRExprEngine::VisitLValue that we don't handle CXXZeroInitValueExprs yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91970
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 23 Dec 2009 01:19:20 +0000 (01:19 +0000)]
Also treat the type of the subexpression as a pointer in GRExprEngine::VisitCast when the expression is handled as an lvalue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91969
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 23 Dec 2009 01:09:59 +0000 (01:09 +0000)]
Add assertion to check for valid source ranges.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91966
91177308 -0d34-0410-b5e6-
96231b3b80d8