]>
granicus.if.org Git - clang/log
Ted Kremenek [Tue, 5 Feb 2008 22:10:48 +0000 (22:10 +0000)]
Added new "NonLValue" class: SymIntConstraintVal. This class represents a binary
contraint between a symbol and an integer constant.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46771
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Feb 2008 21:52:21 +0000 (21:52 +0000)]
Moved subclasses of LValue and NonLValue into their own namespaces.
This noticeably cleans up the naming of these classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46770
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Feb 2008 21:32:43 +0000 (21:32 +0000)]
Added "SymIntConstraint", a utility class to represent intermediate values for
transfer function evaluation that represent constraints between symbolic values
and constant integers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46769
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 5 Feb 2008 21:27:35 +0000 (21:27 +0000)]
Fix Parser::ParseObjCTryStmt() to allow for trailing @-keyword statements/expressions.
This bug fix is the result of not having 2-token lookahead to recognize specific @-keywords.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46768
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 5 Feb 2008 20:54:21 +0000 (20:54 +0000)]
Add some binops.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46766
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 5 Feb 2008 20:01:53 +0000 (20:01 +0000)]
More improvements to inline asm CG.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46762
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Feb 2008 19:35:18 +0000 (19:35 +0000)]
Added "batch" processing versions of Nodify and SetValue. Created typedefs
for buffers for RValues and States.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46759
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Feb 2008 18:51:06 +0000 (18:51 +0000)]
Added a "ConstantNotEq" map to ValueState (and added necessary typedefs and factory objects to ValueStateManager).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46758
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Feb 2008 18:24:17 +0000 (18:24 +0000)]
Added some comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46756
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Feb 2008 18:19:15 +0000 (18:19 +0000)]
Renamed typedef "iterator" in ValueState to "vb_iterator" (for "VariableBindings").
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46755
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Feb 2008 18:17:58 +0000 (18:17 +0000)]
Reordered fields/methods in ValueState to make it more aesthetically pleasing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46754
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 5 Feb 2008 17:26:36 +0000 (17:26 +0000)]
Use correct flag value.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46752
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 5 Feb 2008 16:57:38 +0000 (16:57 +0000)]
Append input argument to args vector.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46751
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 5 Feb 2008 16:35:33 +0000 (16:35 +0000)]
Add code generation for inline asm statements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46750
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 5 Feb 2008 08:06:13 +0000 (08:06 +0000)]
rewrite some of the type refinement code to eliminate dangling pointers
simplify the code and generally make it more robust.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46745
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Feb 2008 07:17:49 +0000 (07:17 +0000)]
Overhauling of "ValueState" so that it represents its own functional data
structure that can contain several maps, not just one.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46744
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 5 Feb 2008 06:55:31 +0000 (06:55 +0000)]
Change the key of CGRecordLayouts from being an llvm type* to being a decl*. LLVM
Type*'s can change as types are refined, so we can't use them as a stable key in
the map. Decls don't change, so use them instead.
This patch was written by Anders, but he's too shy to commit it himself :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46743
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 5 Feb 2008 06:37:34 +0000 (06:37 +0000)]
Relax an assertion, fixing PR1968
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46742
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Feb 2008 05:15:51 +0000 (05:15 +0000)]
ValueManager now uses the BumpPtrAllocator owned by the ExplodedGraph.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46740
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 5 Feb 2008 03:17:42 +0000 (03:17 +0000)]
Update outdated comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46737
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 5 Feb 2008 02:39:50 +0000 (02:39 +0000)]
Cleanup InitListExpr code generation code.
Handle padding fields while initializing struct (fix PR 1962)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46736
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 5 Feb 2008 02:18:07 +0000 (02:18 +0000)]
Fix memory corruption from the type map being modified while a reference
to a cell is being held.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46735
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 5 Feb 2008 01:40:48 +0000 (01:40 +0000)]
Keep track of padding fields.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46734
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Feb 2008 00:43:43 +0000 (00:43 +0000)]
Simplified transfer functions for '++' and '--'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46732
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Feb 2008 00:26:40 +0000 (00:26 +0000)]
Implemented initial transfer function support for '&&', '||', '?', and
__builtin_choose.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46731
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 4 Feb 2008 21:59:22 +0000 (21:59 +0000)]
Added file that should have been in my previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46722
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 4 Feb 2008 21:59:01 +0000 (21:59 +0000)]
Created ValueStateManager, a full-blown class to manage the states
created for GRConstants. Moved instances of ValueManager and SymbolManager
inside this class. The goal is to gradually separate more of the state
management from the state transformation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46721
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 4 Feb 2008 16:58:30 +0000 (16:58 +0000)]
Implemented transfer function for unary '~'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46708
91177308 -0d34-0410-b5e6-
96231b3b80d8
Christopher Lamb [Mon, 4 Feb 2008 02:35:11 +0000 (02:35 +0000)]
Add ending newline to test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46692
91177308 -0d34-0410-b5e6-
96231b3b80d8
Christopher Lamb [Mon, 4 Feb 2008 02:31:56 +0000 (02:31 +0000)]
Add experimental support for address space qualified types. Address space
qualifiers use the __attribute__((address_space(id))) syntax.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46691
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 3 Feb 2008 21:27:46 +0000 (21:27 +0000)]
- ccc creates output objects in same directory as the source file, and
not in the current directory. This doesn't work with VPATH builds in
autotooled builds.
- ccc now creates object files without an extension.
- Return exit code 1 if code > 255.
Patch by Torok!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46689
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 3 Feb 2008 09:00:04 +0000 (09:00 +0000)]
Fix PR1966 by ignoring non-error diagnostics from system headers even if they are
*mapped* onto errors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46686
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 3 Feb 2008 08:24:13 +0000 (08:24 +0000)]
the macro start and macro end bits in source location are dead, remove them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46685
91177308 -0d34-0410-b5e6-
96231b3b80d8
Seo Sanghyeon [Sun, 3 Feb 2008 03:40:41 +0000 (03:40 +0000)]
Make ccc work with older Python versions. Patch by Sam Bishop.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46675
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 2 Feb 2008 20:20:10 +0000 (20:20 +0000)]
Implement support for __extension__ which silences extwarnings in its
scope. This is part of the fix for PR1966
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46669
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 2 Feb 2008 04:51:41 +0000 (04:51 +0000)]
minor tweak to anders patch: (only) ocu vectors support splatting, but
ocu vectors should not treat bitcasts from int <-> vector as a splat
unless it is of the element type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46664
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 2 Feb 2008 04:49:12 +0000 (04:49 +0000)]
Add RUN line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46663
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 2 Feb 2008 04:45:42 +0000 (04:45 +0000)]
testcase for previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46662
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 2 Feb 2008 04:43:11 +0000 (04:43 +0000)]
fix codegen on static variables which have multiple decl nodes. These
should be merged just like normal globals. This fixes this testcase
that Anders provided:
static struct s a;
static struct s *ap1 = &a;
static struct s a = { 10 };
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46661
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Sat, 2 Feb 2008 00:10:46 +0000 (00:10 +0000)]
Cleanup previous patch (based on feedback from Ted).
Since this behavior is useful for most classes, we might consider adding a simple 3 method class that implements the behavior. Ted said that Boost has such a class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46654
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Fri, 1 Feb 2008 23:31:13 +0000 (23:31 +0000)]
Make sure SourceManager/HeaderSearch don't support default copy constructors (since they result in bad runtime behavior).
I'm sure there are other classes that might need this "guard", however I was bitten by these 2 recently (so I thought I'd fix them).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46653
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 1 Feb 2008 23:27:51 +0000 (23:27 +0000)]
Add trailing newline.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46652
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 1 Feb 2008 23:17:55 +0000 (23:17 +0000)]
Only OCU vectors can be splatted.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46651
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Fri, 1 Feb 2008 22:44:48 +0000 (22:44 +0000)]
Rename diagnostic to reflect it's role...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46650
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Fri, 1 Feb 2008 22:08:12 +0000 (22:08 +0000)]
Minor API cleanup...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46649
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Fri, 1 Feb 2008 21:51:39 +0000 (21:51 +0000)]
Remove temporary workaround (thanks to Ted for fixing ObjCAtCatchStmt so quickly:-).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46648
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 1 Feb 2008 21:28:59 +0000 (21:28 +0000)]
For ObjCAtCatchStmt, removed field 'NextAtCatchStmt' (which referenced the next @catch)
and put the the next ObjcAtCatchStmt* as part of SubExprs. This fixes a bug with
iterating over the children of ObjcAtCatch, where the next @catch was not
properly being iterated over as a child.
Altered serialization of ObjCAtCatchStmt to reflect this new layout of
its subexpressions, and fixed an ownership issue with the next @catch not
being serialized as an owned pointer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46647
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Fri, 1 Feb 2008 20:02:07 +0000 (20:02 +0000)]
Fix two rewriter bugs with @catch.
- Support @catch(...), rather than crash:-)
- Make sure all catch bodies get rewritten. This "fix" is really a workaround until the iterator for the "try" AST is fixed. Will fix this in a separate commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46644
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 1 Feb 2008 17:05:54 +0000 (17:05 +0000)]
Moved "Rewriter" tests from test/Sema to test/Rewriter.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46640
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 1 Feb 2008 16:06:34 +0000 (16:06 +0000)]
Generate correct code for __builtin_huge_val
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46639
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 1 Feb 2008 16:01:31 +0000 (16:01 +0000)]
getPrimaryDecl can return null.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46638
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 1 Feb 2008 07:15:58 +0000 (07:15 +0000)]
It is allowed to get the address of an array subscript, even if the array has the register qualifier, if the array is really a pointer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46634
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 1 Feb 2008 06:57:39 +0000 (06:57 +0000)]
make some diagnostics more terse, update testcases.
Fix Sema::ActOnInstanceMessage to correctly do things in terms of canonical
types, fixing bogus errors like:
NSDistantObject.m:10383:120: error: bad receiver type 'typeof((id<NSMutableCopying>)self)'
id mess = ({ id __inv__ = ((void *)0); id __mb__ = _NSMessageBuilder((id <NSMutableCopying>)self, &__inv__); (void)[(__typeof__((id <NSMutableCopying>)self))__mb__ mutableCopyWithZone:((void *)0)]; if (!objc_collecting_enabled()) object_dispose(__mb__); __inv__; });
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46633
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 1 Feb 2008 06:43:02 +0000 (06:43 +0000)]
Sema::ActOnInstanceMessage is generally doing bad things with typedefs, but
here I fix just one. The loop that rips through pointers should use
getAsPointerType() not static_cast<PointerType*> to get the pointee. This
fixes a crash on a large testcase.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46632
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 1 Feb 2008 06:37:46 +0000 (06:37 +0000)]
Added back 'CodeGen' to test suite (accidentally removed in my last patch).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46631
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 1 Feb 2008 06:36:40 +0000 (06:36 +0000)]
Implemented casts for ConcreteInt and ConcreteIntLValue.
Implemented '==' and '!=' for ConcreteIntLValue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46630
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 1 Feb 2008 05:34:02 +0000 (05:34 +0000)]
Fix PR1969. stdin has no FileEntry.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46629
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 1 Feb 2008 00:44:41 +0000 (00:44 +0000)]
Implement __builtin_huge_val.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46627
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 31 Jan 2008 23:48:19 +0000 (23:48 +0000)]
Don't try to compile .a files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46626
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 31 Jan 2008 22:17:03 +0000 (22:17 +0000)]
Added skeleton for new LValue class ConcereteIntLValue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46624
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 31 Jan 2008 19:51:04 +0000 (19:51 +0000)]
add some helper methods for removing and replacing text, this makes the
rewriter more robust.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46622
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 31 Jan 2008 19:42:41 +0000 (19:42 +0000)]
Add a new InsertText method that does the check to see if the insertion was valid. This
fixes crashes where the insertion point was in a macro. Instead of crashing, we want
to emit a warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46621
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 31 Jan 2008 19:38:44 +0000 (19:38 +0000)]
move a large method out of line
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46620
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 31 Jan 2008 19:37:57 +0000 (19:37 +0000)]
Make rewriter::inserttext return a bool to indicate if it failed.
Add a RewriteTest::ReplaceStmt method to factor the 'checking for
rewrite failed + emitting diagnostic if so' code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46619
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 31 Jan 2008 19:34:24 +0000 (19:34 +0000)]
Moved RValue code in GRConstants.cpp to RValue.[h,cpp].
Moved ValueKey/ValueMap declaration to ValueState.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46618
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Thu, 31 Jan 2008 18:29:10 +0000 (18:29 +0000)]
Fix http://llvm.org/bugs/show_bug.cgi?id=1967.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46616
91177308 -0d34-0410-b5e6-
96231b3b80d8
Lauro Ramos Venancio [Thu, 31 Jan 2008 15:19:04 +0000 (15:19 +0000)]
Implement review feedback. Use getAsPointerType instead of cast<PointerType>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46613
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 31 Jan 2008 06:49:09 +0000 (06:49 +0000)]
Fixed misspelling of "LLVM" due to some editor+Ted madness.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46604
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 31 Jan 2008 06:10:07 +0000 (06:10 +0000)]
Fix PR1965: missing diagnostics for parameters that are missing
type specifiers. This required updating some (buggy) tests, and the
testcase was previously accidentally committed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46603
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 31 Jan 2008 06:06:29 +0000 (06:06 +0000)]
Fix a bogus test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46602
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 31 Jan 2008 05:38:29 +0000 (05:38 +0000)]
Remainder of the __builtin_overload feedback
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46601
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 31 Jan 2008 05:10:40 +0000 (05:10 +0000)]
Fix a rewriter crash when the whole body of a foreach is itself
rewritten, as in Sema/rewrite-foreach-6.m. Fariborz/Steve,
please review this to see if it is sane.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46600
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 31 Jan 2008 04:12:50 +0000 (04:12 +0000)]
Fix PR1921 by promoting negative indices to intptrty.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46599
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 31 Jan 2008 02:35:41 +0000 (02:35 +0000)]
Added transfer function support for unary '&' and '*', providing basic
(local) aliasing support.
Modified ExplodedGraph pretty-printer (for GRConstants) to also print out the
pointer value of the state associated with a node. This way one can easily
see that two states are identical.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46595
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 31 Jan 2008 02:13:57 +0000 (02:13 +0000)]
Make CallExpr::isBuiltinConstantExpr slightly more efficient.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46594
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Thu, 31 Jan 2008 01:07:12 +0000 (01:07 +0000)]
Add support for CallExpr::isBuiltinConstantExpr(). For now, this hook is used to support CFConstantStrings. Can be extended to support other built-in functions.
This allows the following code to compile without error...
#include <CoreFoundation/CoreFoundation.h>
#define CONST_STRING_DECL(S, V) const CFStringRef S = (const CFStringRef)__builtin___CFStringMakeConstantString(V);
CONST_STRING_DECL(kCFTimeZoneSystemTimeZoneDidChangeNotification, "kCFTimeZoneSystemTimeZoneDidChangeNotification")
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46592
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 31 Jan 2008 00:09:56 +0000 (00:09 +0000)]
Added 'SymbolicLValue' class to represent LValues whose value is symbolic.
Improved pretty-printing of LValues.
Parameters whose values are pointers/references are now assigned SymbolicLValues.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46584
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 30 Jan 2008 23:46:05 +0000 (23:46 +0000)]
Hack Sema::MergeTypeDefDecl() to silently ignore duplicate typedef's in system headers files.
A bizarre, non-standard hook that many compilers appear to implement (sigh:-).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46583
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 30 Jan 2008 23:24:39 +0000 (23:24 +0000)]
We now delay adding nodes created by GRBranchNodeBuilder to the analysis
worklist until the dstor of GRBranchNodeBuilderImpl. This way clients can mark
creates nodes as "sinks" before they are added to the worklist.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46582
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 30 Jan 2008 23:03:39 +0000 (23:03 +0000)]
Implemented some branch pruning in GRConstants using != and == for
constant integers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46581
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 30 Jan 2008 23:02:42 +0000 (23:02 +0000)]
Added method "printTerminator" to CFGBlock so that external clients can
pretty-print a block's terminator.
When building CFGs, for IfStmts ('if'), we no longer add the ParenExpr
that is the subexpression of the IfStmt to the CFG; instead we add its
first descendant subexpression that is not a ParenExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46580
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 30 Jan 2008 21:50:43 +0000 (21:50 +0000)]
Fix test case and add a FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46577
91177308 -0d34-0410-b5e6-
96231b3b80d8
Lauro Ramos Venancio [Wed, 30 Jan 2008 21:23:20 +0000 (21:23 +0000)]
getLLVMFieldNo can't be called before emitting the base value.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46576
91177308 -0d34-0410-b5e6-
96231b3b80d8
Lauro Ramos Venancio [Wed, 30 Jan 2008 21:21:08 +0000 (21:21 +0000)]
A pointer to an opaque type is an "opaque type definition".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46575
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Jan 2008 21:20:25 +0000 (21:20 +0000)]
On an unexpected @foo keyword, return failure instead of a 'successful' null AST. This fixes a segfault
on things like @foo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46574
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Wed, 30 Jan 2008 20:50:20 +0000 (20:50 +0000)]
Implement first round of feedback on __builtin_overload
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46572
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 30 Jan 2008 20:03:29 +0000 (20:03 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46570
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 30 Jan 2008 19:17:43 +0000 (19:17 +0000)]
Abolish a bunch of Xcode inserted tabs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46566
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 30 Jan 2008 18:54:06 +0000 (18:54 +0000)]
Minor cosmetic cleanups: replaced some integer literals with constants and
more cleanups with pretty-printing of analysis results.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46564
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 30 Jan 2008 18:00:07 +0000 (18:00 +0000)]
Add TODO marker so that it is easier to search.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46561
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 30 Jan 2008 17:38:42 +0000 (17:38 +0000)]
Ignore __aligned__ with zero arguments in addition to __aligned__ with
one argument. Lets stuff using pthread.h compile.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46559
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 30 Jan 2008 17:38:29 +0000 (17:38 +0000)]
Fixed misc. issues raised by Chris L. on @synchronized implementation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46558
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 30 Jan 2008 17:02:03 +0000 (17:02 +0000)]
Fix codegen for conditionals with incommpatible pointer types. Code
that causes this isn't really correct, but if we're going to accept
this, it should come up with a consistent AST.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46557
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Jan 2008 07:01:17 +0000 (07:01 +0000)]
fix a problem reported by Eli, caused by not keeping bool as i1
when in a register.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46552
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Jan 2008 06:46:30 +0000 (06:46 +0000)]
make this pass by adding an expected error, add some tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46551
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Jan 2008 06:08:20 +0000 (06:08 +0000)]
Eli points out this can only happen for scalar elements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46550
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Jan 2008 05:53:56 +0000 (05:53 +0000)]
Be more explicit about what flavors of initlistexpr's we can see. I don't
know if all of this is exactly right, but it seems like the right thing to
aim for. Steve, please review.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46549
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Jan 2008 05:01:46 +0000 (05:01 +0000)]
move some constructors out of line and fix indentation in ObjCAtThrowStmt::getSourceRange.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46547
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 30 Jan 2008 01:32:06 +0000 (01:32 +0000)]
Make sure to emit all the arguments to a function call. This fixes the
codegen of calls to functions without a prototype and varargs functions,
including printf.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46543
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 30 Jan 2008 00:44:01 +0000 (00:44 +0000)]
Many refinements to Sema::MergeVarDecl(). This routine still needs some re-work to fully handle tentative decls.
This includes a fix to bz1908.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46540
91177308 -0d34-0410-b5e6-
96231b3b80d8