Chris Lattner
d11482ea22
simplify and speed up type refinement logic. No functionality change.
...
llvm-svn: 46808
2008-02-06 06:03:51 +00:00
Chris Lattner
a64dde6b48
only convert the type name once, not each type it is refined.
...
llvm-svn: 46807
2008-02-06 05:48:29 +00:00
Eli Friedman
220ee41011
Fix the codegen of structs with flexible array members.
...
llvm-svn: 46806
2008-02-06 05:33:51 +00:00
Chris Lattner
3340b92582
simplify a bunch of code.
...
llvm-svn: 46805
2008-02-06 05:29:46 +00:00
Chris Lattner
56096f3020
rename TypeHolderMap to TypeCache, which more aptly describes what it is.
...
llvm-svn: 46804
2008-02-06 05:21:55 +00:00
Chris Lattner
ee9fafd533
split tagged decl layout into its own method.
...
llvm-svn: 46803
2008-02-06 05:18:32 +00:00
Chris Lattner
f6e3669eb2
only update the llvm type for a struct when we used the struct
...
previously in an opaque context. If we didn't do this,
computing its layout could be wasted: just be lazy.
llvm-svn: 46802
2008-02-06 05:12:09 +00:00
Chris Lattner
68be60694e
sink more of the type related code into CodeGenTypes.
...
llvm-svn: 46801
2008-02-06 05:08:19 +00:00
Chris Lattner
8b945ee058
codegen static variables in a function into a different namespace from
...
static variables outside functions.
llvm-svn: 46800
2008-02-06 04:54:32 +00:00
Eli Friedman
d49a720d52
Be a bit stricter about array type compatibility.
...
llvm-svn: 46799
2008-02-06 04:53:22 +00:00
Chris Lattner
a5e4d30942
Finish off the refactoring of type handling stuff. Now we recompile every
...
tag decl after it has been completed
llvm-svn: 46798
2008-02-06 04:51:19 +00:00
Ted Kremenek
73451846a7
Fixed bug in '=' transfer function: RHS does not have to be a non-LValue.
...
llvm-svn: 46797
2008-02-06 04:41:14 +00:00
Ted Kremenek
d17f05435a
Fixed signedness bug in cast transfer function when casting integers to pointers.
...
Removed lval::SymIntConstraintVal; wrappers for symbolic constraints are not lvalues (only integers that evaluate to !0 or 0).
llvm-svn: 46796
2008-02-06 04:31:33 +00:00
Ted Kremenek
b2652827e6
Modified state pretty-printing to include the '!=' and '==' constraints on
...
symbols (for constant integers).
llvm-svn: 46795
2008-02-06 03:56:15 +00:00
Ted Kremenek
0ea8fea0ba
Disabled operator= for ValueStateImpl.
...
ValueState no longer inherits FoldingSetNode (not needed).
Removed redundant operator= implementation for ValueState (it simply did the default behavior).
llvm-svn: 46794
2008-02-06 02:50:36 +00:00
Ted Kremenek
4ff4e7ce9f
Fixed bug when allocating a ValueStateImpl object in getPersistentState()
...
using the bump-pointer allocator and a placed new; we accidentally allocated
a ValueStateImpl* instead, causing an overrun when we did a placed new().
llvm-svn: 46793
2008-02-06 02:45:20 +00:00
Chris Lattner
adf1f51fc5
move the codegen ASTConsumer out of the driver into libcodegen,
...
eliminating a bunch of forwarding methods and generally
simplifying things.
llvm-svn: 46792
2008-02-06 02:01:47 +00:00
Chris Lattner
b5eda6253b
pull .ll and .bc writing out of the ASTConsumer destructors into some top
...
level code in clang. This is a cleanup, but does implement "-o" for
-emit-llvm. One effect of this is that "clang foo.c -emit-llvm" will now
emit into foo.ll instead of stdout. Use "clang foo.c -emit-llvm -o -" or
"clang < foo.c -emit-llvm" to get the old behavior.
llvm-svn: 46791
2008-02-06 01:42:25 +00:00
Ted Kremenek
03e7b55f22
Added some skeleton code for performing "assume" on symbols: e.g. assume($0 != 0).
...
This action will add constraints to the possible values of a symbol.
Still needs to be debugged.
llvm-svn: 46789
2008-02-06 00:54:14 +00:00
Chris Lattner
622c193a32
inform astconsumer about tagdecls as they are defined.
...
llvm-svn: 46788
2008-02-06 00:51:33 +00:00
Chris Lattner
fe0e0af434
pass the astconsumer into Sema's ctor, clean up some stuff in
...
Sema::ActOnTranslationUnitScope. The various ObjC pieces at the top
of Sema.cpp should be moved into SemaObjC or something.
llvm-svn: 46787
2008-02-06 00:46:58 +00:00
Chris Lattner
8082d870bd
rename ASTSTreamer.{h|cpp} -> ParseAST.{h|cpp}
...
llvm-svn: 46786
2008-02-06 00:23:21 +00:00
Chris Lattner
4afeded499
kill the ASTStreamer class, inlining it into its only client: clang::ParseAST
...
llvm-svn: 46785
2008-02-06 00:15:02 +00:00
Anders Carlsson
3ed4aea198
Even more inline asm codegen fixes.
...
llvm-svn: 46784
2008-02-06 00:11:32 +00:00
Nate Begeman
3399bb424c
simple implementation of __builtin_alloca
...
llvm-svn: 46783
2008-02-06 00:02:50 +00:00
Steve Naroff
2352150043
Add a FIXME to clarify previous commit/experiment.
...
llvm-svn: 46782
2008-02-05 23:59:27 +00:00
Anders Carlsson
487e527fcf
Handle the memory clobber.
...
llvm-svn: 46780
2008-02-05 23:30:20 +00:00
Anders Carlsson
b737b6247f
Improvements to inline asm code generation.
...
llvm-svn: 46779
2008-02-05 23:18:57 +00:00
Ted Kremenek
38b32e976c
Added pretty-printing support for lval::SymIntConstraintVal and
...
nonlval::SymIntConstraintVal.
Reworked transfer function for '==' and '!=' for LValues to return
SymIntConstraintVal when comparing a symbol with a constant.
llvm-svn: 46778
2008-02-05 23:08:41 +00:00
Anders Carlsson
19fe116fc0
Handle simple asm statements correctly.
...
llvm-svn: 46777
2008-02-05 23:03:50 +00:00
Chris Lattner
9413a016f4
simplify some code.
...
llvm-svn: 46774
2008-02-05 22:40:55 +00:00
Ted Kremenek
8f6dcfaa30
Moved implementation of cast<> for SymbolData closer to SymbolData's definition.
...
llvm-svn: 46772
2008-02-05 22:21:54 +00:00
Ted Kremenek
1ee50cd9c1
Added new "NonLValue" class: SymIntConstraintVal. This class represents a binary
...
contraint between a symbol and an integer constant.
llvm-svn: 46771
2008-02-05 22:10:48 +00:00
Ted Kremenek
1e3fa134de
Moved subclasses of LValue and NonLValue into their own namespaces.
...
This noticeably cleans up the naming of these classes.
llvm-svn: 46770
2008-02-05 21:52:21 +00:00
Ted Kremenek
a4aa95bd9d
Added "SymIntConstraint", a utility class to represent intermediate values for
...
transfer function evaluation that represent constraints between symbolic values
and constant integers.
llvm-svn: 46769
2008-02-05 21:32:43 +00:00
Steve Naroff
e6016798bf
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.
llvm-svn: 46768
2008-02-05 21:27:35 +00:00
Anders Carlsson
fcbb11a86f
Add some binops.
...
llvm-svn: 46766
2008-02-05 20:54:21 +00:00
Anders Carlsson
b170d0cf7e
More improvements to inline asm CG.
...
llvm-svn: 46762
2008-02-05 20:01:53 +00:00
Ted Kremenek
e1bbf8e549
Added "batch" processing versions of Nodify and SetValue. Created typedefs
...
for buffers for RValues and States.
llvm-svn: 46759
2008-02-05 19:35:18 +00:00
Ted Kremenek
1cc95f6cd3
Added a "ConstantNotEq" map to ValueState (and added necessary typedefs and factory objects to ValueStateManager).
...
llvm-svn: 46758
2008-02-05 18:51:06 +00:00
Ted Kremenek
961ec7bc22
Added some comments.
...
llvm-svn: 46756
2008-02-05 18:24:17 +00:00
Ted Kremenek
db814b5415
Renamed typedef "iterator" in ValueState to "vb_iterator" (for "VariableBindings").
...
llvm-svn: 46755
2008-02-05 18:19:15 +00:00
Ted Kremenek
17e5b5c99e
Reordered fields/methods in ValueState to make it more aesthetically pleasing.
...
llvm-svn: 46754
2008-02-05 18:17:58 +00:00
Anders Carlsson
063ab86775
Use correct flag value.
...
llvm-svn: 46752
2008-02-05 17:26:36 +00:00
Anders Carlsson
d0cd0d89a0
Append input argument to args vector.
...
llvm-svn: 46751
2008-02-05 16:57:38 +00:00
Anders Carlsson
952a99592f
Add code generation for inline asm statements.
...
llvm-svn: 46750
2008-02-05 16:35:33 +00:00
Chris Lattner
b1537ebdd4
rewrite some of the type refinement code to eliminate dangling pointers
...
simplify the code and generally make it more robust.
llvm-svn: 46745
2008-02-05 08:06:13 +00:00
Ted Kremenek
d8902e06ba
Overhauling of "ValueState" so that it represents its own functional data
...
structure that can contain several maps, not just one.
llvm-svn: 46744
2008-02-05 07:17:49 +00:00
Chris Lattner
86964a9653
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 :)
llvm-svn: 46743
2008-02-05 06:55:31 +00:00
Chris Lattner
b977b6a59b
Relax an assertion, fixing PR1968
...
llvm-svn: 46742
2008-02-05 06:37:34 +00:00
Ted Kremenek
0a04690fda
ValueManager now uses the BumpPtrAllocator owned by the ExplodedGraph.
...
llvm-svn: 46740
2008-02-05 05:15:51 +00:00
Devang Patel
6c037da51c
Update outdated comment.
...
llvm-svn: 46737
2008-02-05 03:17:42 +00:00
Devang Patel
a703a67384
Cleanup InitListExpr code generation code.
...
Handle padding fields while initializing struct (fix PR 1962)
llvm-svn: 46736
2008-02-05 02:39:50 +00:00
Eli Friedman
26a6dd0877
Fix memory corruption from the type map being modified while a reference
...
to a cell is being held.
llvm-svn: 46735
2008-02-05 02:18:07 +00:00
Devang Patel
86e7166522
Keep track of padding fields.
...
llvm-svn: 46734
2008-02-05 01:40:48 +00:00
Ted Kremenek
4894c56ba7
Simplified transfer functions for '++' and '--'
...
llvm-svn: 46732
2008-02-05 00:43:43 +00:00
Ted Kremenek
3f2f1ade4c
Implemented initial transfer function support for '&&', '||', '?', and
...
__builtin_choose.
llvm-svn: 46731
2008-02-05 00:26:40 +00:00
Ted Kremenek
7746a6279b
Added file that should have been in my previous commit.
...
llvm-svn: 46722
2008-02-04 21:59:22 +00:00
Ted Kremenek
723fe3f863
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.
llvm-svn: 46721
2008-02-04 21:59:01 +00:00
Ted Kremenek
2cdfd6670e
Implemented transfer function for unary '~'.
...
llvm-svn: 46708
2008-02-04 16:58:30 +00:00
Christopher Lamb
da8e5d979e
Add ending newline to test.
...
llvm-svn: 46692
2008-02-04 02:35:11 +00:00
Christopher Lamb
025b5fb883
Add experimental support for address space qualified types. Address space
...
qualifiers use the __attribute__((address_space(id))) syntax.
llvm-svn: 46691
2008-02-04 02:31:56 +00:00
Bill Wendling
e5b8b7db4a
- 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!
llvm-svn: 46689
2008-02-03 21:27:46 +00:00
Chris Lattner
3ac9699c44
Fix PR1966 by ignoring non-error diagnostics from system headers even if they are
...
*mapped* onto errors.
llvm-svn: 46686
2008-02-03 09:00:04 +00:00
Chris Lattner
15e4ad81c3
the macro start and macro end bits in source location are dead, remove them.
...
llvm-svn: 46685
2008-02-03 08:24:13 +00:00
Seo Sanghyeon
66de08bfb4
Make ccc work with older Python versions. Patch by Sam Bishop.
...
llvm-svn: 46675
2008-02-03 03:40:41 +00:00
Chris Lattner
c43926fe67
Implement support for __extension__ which silences extwarnings in its
...
scope. This is part of the fix for PR1966
llvm-svn: 46669
2008-02-02 20:20:10 +00:00
Chris Lattner
6cba8e9d66
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.
llvm-svn: 46664
2008-02-02 04:51:41 +00:00
Anders Carlsson
6fa0813186
Add RUN line.
...
llvm-svn: 46663
2008-02-02 04:49:12 +00:00
Chris Lattner
bfc2d8acd9
testcase for previous patch.
...
llvm-svn: 46662
2008-02-02 04:45:42 +00:00
Chris Lattner
ce6ae5cb06
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 };
llvm-svn: 46661
2008-02-02 04:43:11 +00:00
Steve Naroff
72df405dc5
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.
llvm-svn: 46654
2008-02-02 00:10:46 +00:00
Steve Naroff
f7fe5b372f
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).
llvm-svn: 46653
2008-02-01 23:31:13 +00:00
Anders Carlsson
53fef5d9d6
Add trailing newline.
...
llvm-svn: 46652
2008-02-01 23:27:51 +00:00
Anders Carlsson
0b05d041f2
Only OCU vectors can be splatted.
...
llvm-svn: 46651
2008-02-01 23:17:55 +00:00
Steve Naroff
0dffa442ea
Rename diagnostic to reflect it's role...
...
llvm-svn: 46650
2008-02-01 22:44:48 +00:00
Steve Naroff
e6b7ffd073
Minor API cleanup...
...
llvm-svn: 46649
2008-02-01 22:08:12 +00:00
Steve Naroff
d9dc63f2c5
Remove temporary workaround (thanks to Ted for fixing ObjCAtCatchStmt so quickly:-).
...
llvm-svn: 46648
2008-02-01 21:51:39 +00:00
Ted Kremenek
a496584c82
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.
llvm-svn: 46647
2008-02-01 21:28:59 +00:00
Steve Naroff
edb5bc6f09
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.
llvm-svn: 46644
2008-02-01 20:02:07 +00:00
Ted Kremenek
e9a709a0c5
Moved "Rewriter" tests from test/Sema to test/Rewriter.
...
llvm-svn: 46640
2008-02-01 17:05:54 +00:00
Anders Carlsson
f4f3679eea
Generate correct code for __builtin_huge_val
...
llvm-svn: 46639
2008-02-01 16:06:34 +00:00
Anders Carlsson
59435b2f9a
getPrimaryDecl can return null.
...
llvm-svn: 46638
2008-02-01 16:01:31 +00:00
Anders Carlsson
806700f973
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.
...
llvm-svn: 46634
2008-02-01 07:15:58 +00:00
Chris Lattner
a347834869
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__; });
llvm-svn: 46633
2008-02-01 06:57:39 +00:00
Chris Lattner
617bfc39ff
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.
llvm-svn: 46632
2008-02-01 06:43:02 +00:00
Ted Kremenek
81f0550cdd
Added back 'CodeGen' to test suite (accidentally removed in my last patch).
...
llvm-svn: 46631
2008-02-01 06:37:46 +00:00
Ted Kremenek
effdafa62a
Implemented casts for ConcreteInt and ConcreteIntLValue.
...
Implemented '==' and '!=' for ConcreteIntLValue.
llvm-svn: 46630
2008-02-01 06:36:40 +00:00
Chris Lattner
1226188e0a
Fix PR1969. stdin has no FileEntry.
...
llvm-svn: 46629
2008-02-01 05:34:02 +00:00
Anders Carlsson
b49fdfb5f0
Implement __builtin_huge_val.
...
llvm-svn: 46627
2008-02-01 00:44:41 +00:00
Anders Carlsson
3d149daf50
Don't try to compile .a files.
...
llvm-svn: 46626
2008-01-31 23:48:19 +00:00
Ted Kremenek
2820b9c893
Added skeleton for new LValue class ConcereteIntLValue.
...
llvm-svn: 46624
2008-01-31 22:17:03 +00:00
Chris Lattner
9cc55f5b1f
add some helper methods for removing and replacing text, this makes the
...
rewriter more robust.
llvm-svn: 46622
2008-01-31 19:51:04 +00:00
Chris Lattner
1780a85602
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.
llvm-svn: 46621
2008-01-31 19:42:41 +00:00
Chris Lattner
187f626a7c
move a large method out of line
...
llvm-svn: 46620
2008-01-31 19:38:44 +00:00
Chris Lattner
2e0d2600a2
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.
llvm-svn: 46619
2008-01-31 19:37:57 +00:00
Ted Kremenek
2838799859
Moved RValue code in GRConstants.cpp to RValue.[h,cpp].
...
Moved ValueKey/ValueMap declaration to ValueState.h.
llvm-svn: 46618
2008-01-31 19:34:24 +00:00
Steve Naroff
e97c4ab30c
Fix http://llvm.org/bugs/show_bug.cgi?id=1967 .
...
llvm-svn: 46616
2008-01-31 18:29:10 +00:00
Lauro Ramos Venancio
bb733a2bdc
Implement review feedback. Use getAsPointerType instead of cast<PointerType>.
...
llvm-svn: 46613
2008-01-31 15:19:04 +00:00
Ted Kremenek
6f4a9ef4b6
Fixed misspelling of "LLVM" due to some editor+Ted madness.
...
llvm-svn: 46604
2008-01-31 06:49:09 +00:00
Chris Lattner
7f024fe0c6
Fix PR1965: missing diagnostics for parameters that are missing
...
type specifiers. This required updating some (buggy) tests, and the
testcase was previously accidentally committed.
llvm-svn: 46603
2008-01-31 06:10:07 +00:00
Chris Lattner
4973fb9273
Fix a bogus test
...
llvm-svn: 46602
2008-01-31 06:06:29 +00:00
Nate Begeman
4cd6689d1f
Remainder of the __builtin_overload feedback
...
llvm-svn: 46601
2008-01-31 05:38:29 +00:00
Chris Lattner
a779d69029
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.
llvm-svn: 46600
2008-01-31 05:10:40 +00:00
Chris Lattner
a94035bbb8
Fix PR1921 by promoting negative indices to intptrty.
...
llvm-svn: 46599
2008-01-31 04:12:50 +00:00
Ted Kremenek
a0be8264b5
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.
llvm-svn: 46595
2008-01-31 02:35:41 +00:00
Anders Carlsson
fbcf676a65
Make CallExpr::isBuiltinConstantExpr slightly more efficient.
...
llvm-svn: 46594
2008-01-31 02:13:57 +00:00
Steve Naroff
f6e3b32964
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")
llvm-svn: 46592
2008-01-31 01:07:12 +00:00
Ted Kremenek
b5474fc529
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.
llvm-svn: 46584
2008-01-31 00:09:56 +00:00
Steve Naroff
e101f9548e
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:-).
llvm-svn: 46583
2008-01-30 23:46:05 +00:00
Ted Kremenek
2531fce319
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.
llvm-svn: 46582
2008-01-30 23:24:39 +00:00
Ted Kremenek
a50d98565f
Implemented some branch pruning in GRConstants using != and == for
...
constant integers.
llvm-svn: 46581
2008-01-30 23:03:39 +00:00
Ted Kremenek
1564763b8e
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.
llvm-svn: 46580
2008-01-30 23:02:42 +00:00
Steve Naroff
2a2c5b98ee
Fix test case and add a FIXME.
...
llvm-svn: 46577
2008-01-30 21:50:43 +00:00
Lauro Ramos Venancio
86b99c1b79
getLLVMFieldNo can't be called before emitting the base value.
...
llvm-svn: 46576
2008-01-30 21:23:20 +00:00
Lauro Ramos Venancio
f5291d2871
A pointer to an opaque type is an "opaque type definition".
...
llvm-svn: 46575
2008-01-30 21:21:08 +00:00
Chris Lattner
8f39876ac3
On an unexpected @foo keyword, return failure instead of a 'successful' null AST. This fixes a segfault
...
on things like @foo.
llvm-svn: 46574
2008-01-30 21:20:25 +00:00
Nate Begeman
936b207407
Implement first round of feedback on __builtin_overload
...
llvm-svn: 46572
2008-01-30 20:50:20 +00:00
Fariborz Jahanian
ca2565ce9a
Typo.
...
llvm-svn: 46570
2008-01-30 20:03:29 +00:00
Steve Naroff
7b3579b8de
Abolish a bunch of Xcode inserted tabs.
...
llvm-svn: 46566
2008-01-30 19:17:43 +00:00
Ted Kremenek
90962af0e8
Minor cosmetic cleanups: replaced some integer literals with constants and
...
more cleanups with pretty-printing of analysis results.
llvm-svn: 46564
2008-01-30 18:54:06 +00:00
Devang Patel
57412cacb6
Add TODO marker so that it is easier to search.
...
llvm-svn: 46561
2008-01-30 18:00:07 +00:00
Eli Friedman
3780d35306
Ignore __aligned__ with zero arguments in addition to __aligned__ with
...
one argument. Lets stuff using pthread.h compile.
llvm-svn: 46559
2008-01-30 17:38:42 +00:00
Fariborz Jahanian
049fa58d0d
Fixed misc. issues raised by Chris L. on @synchronized implementation.
...
llvm-svn: 46558
2008-01-30 17:38:29 +00:00
Eli Friedman
1bc0fed9a5
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.
llvm-svn: 46557
2008-01-30 17:02:03 +00:00
Chris Lattner
05ba4cbe17
fix a problem reported by Eli, caused by not keeping bool as i1
...
when in a register.
llvm-svn: 46552
2008-01-30 07:01:17 +00:00
Chris Lattner
e850fa2452
make this pass by adding an expected error, add some tests.
...
llvm-svn: 46551
2008-01-30 06:46:30 +00:00
Chris Lattner
dd830b9c8b
Eli points out this can only happen for scalar elements.
...
llvm-svn: 46550
2008-01-30 06:08:20 +00:00
Chris Lattner
6ebd38deae
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.
llvm-svn: 46549
2008-01-30 05:53:56 +00:00
Chris Lattner
86f5e13224
move some constructors out of line and fix indentation in ObjCAtThrowStmt::getSourceRange.
...
llvm-svn: 46547
2008-01-30 05:01:46 +00:00
Eli Friedman
9d92ce8b3a
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.
llvm-svn: 46543
2008-01-30 01:32:06 +00:00
Steve Naroff
1e7873642b
Many refinements to Sema::MergeVarDecl(). This routine still needs some re-work to fully handle tentative decls.
...
This includes a fix to bz1908.
llvm-svn: 46540
2008-01-30 00:44:01 +00:00
Ted Kremenek
162bb8060e
Added method "markInfeasible" to GRBranchNodeBuilder to disable the
...
auto-propagation of state along a branch.
llvm-svn: 46537
2008-01-29 23:36:02 +00:00
Ted Kremenek
7ff1893f86
Implemented more boilerplate in GREngine for processing branches. Now
...
we automatically generate a new successor node along an edge if the checker
did not explicitly do so (i.e., we just propagate the current state).
llvm-svn: 46536
2008-01-29 23:32:35 +00:00
Ted Kremenek
ee2d5a540c
Fixed bit-setting bug for ExplodedNodeImpl::NodeGroup.
...
llvm-svn: 46535
2008-01-29 23:31:09 +00:00
Devang Patel
45a65d2ee1
Handle incomplete struct initializer.
...
llvm-svn: 46534
2008-01-29 23:23:18 +00:00
Fariborz Jahanian
284011b462
Rewriting of @synchronized. This has one FIXME in it. But this should allow @sychronized to be rewritten.
...
llvm-svn: 46533
2008-01-29 22:59:37 +00:00
Ted Kremenek
9b4211d25d
Added boilerplate logic in GREngine for processing branches.
...
llvm-svn: 46532
2008-01-29 22:56:11 +00:00
Ted Kremenek
b2cad31aae
Renamed GRNodeBuilder to GRStmtNodeBuilder.
...
llvm-svn: 46531
2008-01-29 22:11:49 +00:00
Ted Kremenek
71b49503d8
Minor fix in transfer function of '!=' where a 'false' literal should
...
have been 'true'.
llvm-svn: 46530
2008-01-29 21:27:49 +00:00
Ted Kremenek
15ad4cf46b
- Hooked up deserialization of ObjCAtSynchronizedStmt Stmt::Create().
...
- Some minor optimizations of the encoding format for ObjCAtSynchronizedStmt.
- Reordered methods so that the deserialization methods for
ObjCAtSynchronizedStmt appear in alphabetical order with the corresponding
methods of the other AST nodes.
llvm-svn: 46529
2008-01-29 21:21:30 +00:00
Ted Kremenek
8d5bfe5844
Added preliminary transfer function support for '==' and '!='.
...
Made some internal API cleanups with creating ConcreteInt values, which lead to
some code reduction in implementing "++", "--".
llvm-svn: 46528
2008-01-29 19:43:15 +00:00
Fariborz Jahanian
48085b86ae
AST for @synchronized.
...
llvm-svn: 46524
2008-01-29 19:14:59 +00:00
Steve Naroff
ddb1dd8c5f
Tighten up ASTContext::typesAreCompatible()...it needs to make sure the qualifiers match. The comment and C99 citation for this routine were correct...the code needed to conform to the comment/spec. This fixes the test added below.
...
Tightening up this routine forced tweaks to Sema::CheckSubtractionOperands() and Sema::CheckCompareOperands(). For example, they both need to operate on the unqualified pointee...
llvm-svn: 46522
2008-01-29 18:58:14 +00:00
Fariborz Jahanian
f89ca383d7
Bunch of type defs, etc. for @synchronized.
...
llvm-svn: 46520
2008-01-29 18:21:32 +00:00
Eli Friedman
7031d734ed
Fix a bug where CodeGen would attempt to erase an instruction that was
...
already used.
llvm-svn: 46519
2008-01-29 18:13:51 +00:00
Ted Kremenek
b6056cfea4
Added "SymbolManager", which manages the set of symbolic values used
...
for analyzing a function.
The initial state for GRConstants now assigns symbolic values to parameters.
llvm-svn: 46517
2008-01-29 17:27:31 +00:00
Anders Carlsson
a8dc3e6b52
Implement __builtin_offsetof.
...
llvm-svn: 46515
2008-01-29 15:56:48 +00:00
Chris Lattner
f6df8e9702
fix comment typo
...
llvm-svn: 46505
2008-01-29 07:59:54 +00:00
Chris Lattner
5440b94ccf
add diagnostic
...
llvm-svn: 46504
2008-01-29 07:59:42 +00:00