]>
granicus.if.org Git - clang/log
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Ted Kremenek [Tue, 22 Dec 2009 23:00:32 +0000 (23:00 +0000)]
Add c++-analyzer symlink (which is used by scan-build)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91937
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 22 Dec 2009 22:47:22 +0000 (22:47 +0000)]
Make sure that reinterpret_cast gets a CastKind on all successful
paths. Fixes "cannot compile this unexpected cast lvalue yet" error in
llvm/lib/Analysis/IPA/GlobalsModRef.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91932
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 22 Dec 2009 22:30:51 +0000 (22:30 +0000)]
Revert accidental commit
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91930
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 22 Dec 2009 22:29:12 +0000 (22:29 +0000)]
accept -Wcomments as an alias for -Wcomment, PR5855
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91929
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 22 Dec 2009 22:26:37 +0000 (22:26 +0000)]
Add using shadow decls to the "instantiated locals" map, fixing PR5847.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91928
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 22 Dec 2009 22:17:25 +0000 (22:17 +0000)]
Switch Sema::AddCXXDirectInitializerToDecl over to InitializationSequence
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91927
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 22 Dec 2009 22:13:46 +0000 (22:13 +0000)]
Add transfer functions support for visiting an Objective-C message expression as an lvalue when the return type is a C++ reference.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91926
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 22 Dec 2009 21:59:17 +0000 (21:59 +0000)]
ARM: Remove a FIXME, it's not actually more complicated than that.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91924
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 22 Dec 2009 21:44:34 +0000 (21:44 +0000)]
Switch parameter passing for overloaded binary operators to
InitializationSequence. Fixes the -fsyntax-only failure in
llvm/lib/Transforms/Scalar/InstructionCombining.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91921
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 22 Dec 2009 18:11:50 +0000 (18:11 +0000)]
Serialize the NoReturn bit on FunctionTypes for precompiled headers
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91911
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 22 Dec 2009 17:47:17 +0000 (17:47 +0000)]
Enter the scope of an initializer for direct-initialization as well as
for copy-initialization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91909
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 22 Dec 2009 17:13:37 +0000 (17:13 +0000)]
When transforming a C++ "new" expression that was not explicitly given
a size, check whether the transformed type is itself an array type. If
so, take the major array bound as the size to allocate. Fixes PR5833.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91907
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 22 Dec 2009 16:09:06 +0000 (16:09 +0000)]
Switch parameter-passing for calls via function pointers (where we
don't have a FunctionDecl) over to InitializationSequence.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91906
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 22 Dec 2009 15:35:07 +0000 (15:35 +0000)]
Switch InitializedEntity from TypeLoc down to just QualTypes, since we don't use the location information but we did spend a bunch of time building faked-up TypeLocs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91905
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ken Dyck [Tue, 22 Dec 2009 14:23:30 +0000 (14:23 +0000)]
Move the implementation of ASTContext::getTypeSizeInChars() to the .cpp file to
avoid #including CharUnits.h in ASTContext.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91903
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 22 Dec 2009 07:24:36 +0000 (07:24 +0000)]
Switch initialization of parameters in a call over to
InitializationSequence (when a FunctionDecl is present). This required
a few small fixes to initialization sequences:
- Make sure to use the adjusted parameter type for initialization of
function parameters.
- Implement transparent union calling semantics in C
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91902
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 22 Dec 2009 06:36:32 +0000 (06:36 +0000)]
Make sure that we mangle overloaded operators that are member functions correctly, giving them the correct arity.
With this seemingly insignificant fix, we are now able to build and link clang using clang itself! (LLVM still has to be built with gcc for the time being).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91893
91177308 -0d34-0410-b5e6-
96231b3b80d8