]> granicus.if.org Git - clang/log
clang
14 years agoFill in the return value slot in CGExprAgg::VisitCallExpr. This takes us halfway...
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

14 years agoAdd test case for PR5868, and improve location information slightly for implicit...
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

14 years agoAdd a test for x86-64 struct returns under gc.
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

14 years agoWhen rebuilding a MemberExpr that refers to an anonymous union, be
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

14 years agoPass ReturnValueSlot to EmitCall. No functionality change yet.
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

14 years agoFix -Asserts warning.
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

14 years agoAdd a ReturnValueSlot class. Change the argument order in EmitCall to match the other...
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

14 years agoWhen transforming CXXExprWithTemporaries and CXXBindTemporaryExpr
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

14 years agoFix double-destruction assertion to account for temporaries in conditionals
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

14 years agoAssert that we aren't trying to push the same C++ temporary onto the live temporary...
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

14 years agoInitializationSequence handles binding to temporaries, so that
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

14 years agoFix the clang-on-clang build: APFloat reports underflow whenever we get a
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

14 years agoTweak the text of several main() diagnostics and punch a hole specifically for
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

14 years agoDiagnose out-of-bounds floating-point constants. Fixes rdar://problem/6974641
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

14 years agoRemove some dead code.
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

14 years agoCleanup some dead code.
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

14 years agoAs Ted suggested, record the callsite information with the StackFrameContext.
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

14 years agoAdd analyzer test case for 'ForStmt' with condition variable.
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

14 years agoEnhance dataflow analyses to recognize branch statements in the CFG used as hooks...
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

14 years agoDon't set hidden for a non-external symbol as that would make it extenal.
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

14 years agoFix for bug 5691.
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

14 years agoInter-procedural analysis: now we can return from the callee.
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

14 years agoFix bug I just introduced in ForStmt::child_end() where we could iterate off into...
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

14 years agoTeach GRExprEngine to handle the initialization of the condition variable of a ForStmt.
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

14 years agoAdd CFG support for the initializer of the condition variable of a ForStmt.
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

14 years agoCoelesce 'DoDestroy()' methods in Stmt.cpp, and modify the child_iterator returned...
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

14 years agoCFG tweak: in a WhileStmt, the condition variable initializer is evaluated every...
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

14 years agoFix recent regression caught by g++.old-deja/g++.mike/eh19.C.
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

14 years agoTeach GRExprEngine to handle the initialization of the condition variable of a WhileStmt.
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

14 years agoAdd CFG support for the initializer of the condition variable of a WhileStmt.
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

14 years agoModify WhileStmt::child_begin()/child_end() to include the initializer for the condit...
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

14 years agoAdd test case for PR 4358.
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

14 years agoTeach GRExprEngine to handle the initialization of the condition variable of a Switch...
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

14 years agoAdd CFG support for the initializer of the condition variable of a SwitchStmt.
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

14 years agoModify SwitchStmt::child_begin()/child_end() to include the initializer for the condi...
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

14 years agosupport the warn_unused_result in C++ class methods
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

14 years agoallow the noreturn attribute to be used in class methods
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

14 years agoAdd StmtIterator support for iterating over both the condition
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

14 years agoTidy up FindSubExprAssignments to not deference the child_iterator multiple times.
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

14 years agoWhen we see a CXXDefaultArgExpr during template instantiation, rebuild
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

14 years agoFix regression found by g++.dg/eh/alias1.C.
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

14 years agoIncrease StmtIterator size by one pointer (separating out the Stmt** from the union...
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

14 years agoMangle block pointer types. Fixes PR5858.
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

14 years agofix typo
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

14 years agoThere is no such thing as typeinfo for a cv-qualified type. Assert
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

14 years agoMore cleanup/refactoring of the rewrite.
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

14 years agosimplify my previous patch.
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

14 years agofix opencl extvector element extraction on rvalues. We previously
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

14 years agocomment tweak
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

14 years agoSome cleanup and refactoring of rewriter.
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

14 years agoTidy up ~ASTContext a bit by turning orphan compound statements into
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

14 years agoDiagnose the use of incomplete types in C++ typeid expressions
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

14 years agoRename test file.
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

14 years agoChange test case to use 'clang -cc1' (without --disable-free) instead of c-index...
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

14 years agoRemove cv-qualifiers from the argument to typeid
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

14 years agoThis patch concludes rewriteing of __block variables to allow
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

14 years agoMangle template template parameters. Fixes PR5861.
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

14 years agoRemoved a FIXME comment.
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

14 years agoMore rewriting of __block variables.
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

14 years agofix the microsoft "charify" extension to return the charified token
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

14 years agoupdate comments
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

14 years agoswitch -Werror/-Wfatal-errors error conditions to use diagnostics instead
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

14 years agoFix the overflow calculation in Sema::CheckTemplateArgument to be a bit more
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

14 years agoWhen using a default function argument for a function template (or
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

14 years agoRemove RewriteBlocks. It has been superseded by RewriteObjC
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

14 years agomove a few more symbols to .rodata/.data.rel.ro
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

14 years agoDon't commit my silly little local changes
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

14 years agoDon't disable smart pointers, silly
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

14 years agoFix DISABLE_SMART_POINTERS build
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

14 years agoAdd support for handling initializers in RewriteObjC::RewriteByRefVar().
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

14 years agoRegister call inliner as the last checker.
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

14 years agoMigrate the call inliner to the Checker interface.
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

14 years agoAdd 'DeclStmt::DoDestroy()' which doesn't actually recurse over its child expressions...
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

14 years agoFor inter-procedural analysis, predecessor node may be in another function.
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

14 years agoAdd CFG support for the condition variable that can appear in IfStmts in C++ mode.
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

14 years agoSuppress dead store warnings involving objects initialized with CXXExprTemporaries.
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

14 years agoAdd stack trace pretty printing in GRExprEngine::VisitLValue().
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

14 years agoFix CXXConstructExpr::getSourceRange() to not include the source ranges of CXXDefault...
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

14 years agoUpdate for the intrinsic changes in llvm: the object size intrinsic
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

14 years agoTeach GRExprEngine::VisitLValue to ignore CXXExprWithTempories (for now).
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

14 years agoFix PR 5857. When casting from a symbolic region to an integer back to a pointer...
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

14 years agoRemove CharUnits::toString() to eliminate dependence on <string>.
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

14 years agoPatch to do more rewrite of __block variables.
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

14 years agoEliminate a completely unnecessary buffer copy when parsing float literals.
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

14 years agoTeach GRExprEngine::VisitLValue that we don't handle CXXZeroInitValueExprs yet.
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

14 years agoAlso treat the type of the subexpression as a pointer in GRExprEngine::VisitCast...
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

14 years agoAdd assertion to check for valid source ranges.
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

14 years agoTest case for PR5134.
John McCall [Wed, 23 Dec 2009 01:09:14 +0000 (01:09 +0000)]
Test case for PR5134.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91965 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDriver: Fix '... -O4 -O0 ...', which was generating bitcode.
Daniel Dunbar [Wed, 23 Dec 2009 00:47:42 +0000 (00:47 +0000)]
Driver: Fix '... -O4 -O0 ...', which was generating bitcode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91962 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDriver: Drop ToolChain::getHost()
Daniel Dunbar [Wed, 23 Dec 2009 00:46:38 +0000 (00:46 +0000)]
Driver: Drop ToolChain::getHost()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91960 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTest case from PR5476.
John McCall [Wed, 23 Dec 2009 00:44:38 +0000 (00:44 +0000)]
Test case from PR5476.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91957 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSet a member's access specifier even if it doesn't match the previous specifier.
John McCall [Wed, 23 Dec 2009 00:37:40 +0000 (00:37 +0000)]
Set a member's access specifier even if it doesn't match the previous specifier.
Prevents an assert on successive redeclarations.

Fixed PR5573.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91956 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd basic support for analyzing CastExprs as lvalues.
Ted Kremenek [Wed, 23 Dec 2009 00:26:16 +0000 (00:26 +0000)]
Add basic support for analyzing CastExprs as lvalues.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91952 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoObjective-C methods can be variadic, too. Who knew.
Douglas Gregor [Wed, 23 Dec 2009 00:21:46 +0000 (00:21 +0000)]
Objective-C methods can be variadic, too. Who knew.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91951 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSwitch Sema::CreateOverloadedUnaryOp over to InitializationSequence.
Douglas Gregor [Wed, 23 Dec 2009 00:02:00 +0000 (00:02 +0000)]
Switch Sema::CreateOverloadedUnaryOp over to InitializationSequence.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91948 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoset svn:ignore
Nuno Lopes [Wed, 23 Dec 2009 00:01:08 +0000 (00:01 +0000)]
set svn:ignore

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91947 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agowarn when attribute warn_unused_result is applied to void functions.
Nuno Lopes [Tue, 22 Dec 2009 23:59:52 +0000 (23:59 +0000)]
warn when attribute warn_unused_result is applied to void functions.
while at it, remove an outdated FIXME

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91946 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAllow the first parameter of operator new to be a cv-qualified
Douglas Gregor [Tue, 22 Dec 2009 23:42:49 +0000 (23:42 +0000)]
Allow the first parameter of operator new to be a cv-qualified
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91941 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDriver: When linking, don't warn about unused arguments which are obviously only
Daniel Dunbar [Tue, 22 Dec 2009 23:19:32 +0000 (23:19 +0000)]
Driver: When linking, don't warn about unused arguments which are obviously only
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91940 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoimplement -W[no-]fatal-errors, patch by Christian Adåker!
Chris Lattner [Tue, 22 Dec 2009 23:12:53 +0000 (23:12 +0000)]
implement -W[no-]fatal-errors, patch by Christian Adåker!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91938 91177308-0d34-0410-b5e6-96231b3b80d8