aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-02-01For ObjCAtCatchStmt, removed field 'NextAtCatchStmt' (which referenced the ↵Ted Kremenek
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
2008-02-01Fix two rewriter bugs with @catch.Steve Naroff
- 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
2008-02-01Moved "Rewriter" tests from test/Sema to test/Rewriter.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46640 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-01Generate correct code for __builtin_huge_valAnders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46639 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-01getPrimaryDecl can return null.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46638 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-01It is allowed to get the address of an array subscript, even if the array ↵Anders Carlsson
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
2008-02-01make some diagnostics more terse, update testcases.Chris Lattner
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
2008-02-01Sema::ActOnInstanceMessage is generally doing bad things with typedefs, butChris Lattner
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
2008-02-01Added back 'CodeGen' to test suite (accidentally removed in my last patch).Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46631 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-01Implemented casts for ConcreteInt and ConcreteIntLValue.Ted Kremenek
Implemented '==' and '!=' for ConcreteIntLValue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46630 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-01Fix PR1969. stdin has no FileEntry.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46629 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-01Implement __builtin_huge_val.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46627 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31Don't try to compile .a files.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46626 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31Added skeleton for new LValue class ConcereteIntLValue.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46624 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31add some helper methods for removing and replacing text, this makes theChris Lattner
rewriter more robust. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46622 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31Add a new InsertText method that does the check to see if the insertion was ↵Chris Lattner
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
2008-01-31move a large method out of lineChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46620 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31Make rewriter::inserttext return a bool to indicate if it failed.Chris Lattner
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
2008-01-31Moved RValue code in GRConstants.cpp to RValue.[h,cpp].Ted Kremenek
Moved ValueKey/ValueMap declaration to ValueState.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46618 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31Fix http://llvm.org/bugs/show_bug.cgi?id=1967.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46616 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31Implement review feedback. Use getAsPointerType instead of cast<PointerType>.Lauro Ramos Venancio
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46613 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31Fixed misspelling of "LLVM" due to some editor+Ted madness.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46604 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31Fix PR1965: missing diagnostics for parameters that are missingChris Lattner
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
2008-01-31Fix a bogus testChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46602 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31Remainder of the __builtin_overload feedbackNate Begeman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46601 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31Fix a rewriter crash when the whole body of a foreach is itself Chris Lattner
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
2008-01-31Fix PR1921 by promoting negative indices to intptrty.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46599 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31Added transfer function support for unary '&' and '*', providing basicTed Kremenek
(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
2008-01-31Make CallExpr::isBuiltinConstantExpr slightly more efficient.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46594 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31Add support for CallExpr::isBuiltinConstantExpr(). For now, this hook is ↵Steve Naroff
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
2008-01-31Added 'SymbolicLValue' class to represent LValues whose value is symbolic.Ted Kremenek
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
2008-01-30Hack Sema::MergeTypeDefDecl() to silently ignore duplicate typedef's in ↵Steve Naroff
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
2008-01-30We now delay adding nodes created by GRBranchNodeBuilder to the analysisTed Kremenek
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
2008-01-30Implemented some branch pruning in GRConstants using != and == forTed Kremenek
constant integers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46581 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30Added method "printTerminator" to CFGBlock so that external clients canTed Kremenek
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
2008-01-30Fix test case and add a FIXME.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46577 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30getLLVMFieldNo can't be called before emitting the base value.Lauro Ramos Venancio
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46576 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30A pointer to an opaque type is an "opaque type definition".Lauro Ramos Venancio
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46575 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30On an unexpected @foo keyword, return failure instead of a 'successful' null ↵Chris Lattner
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
2008-01-30Implement first round of feedback on __builtin_overloadNate Begeman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46572 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30Typo.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46570 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30Abolish a bunch of Xcode inserted tabs.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46566 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30Minor cosmetic cleanups: replaced some integer literals with constants andTed Kremenek
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
2008-01-30Add TODO marker so that it is easier to search.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46561 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30Ignore __aligned__ with zero arguments in addition to __aligned__ with Eli Friedman
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
2008-01-30Fixed misc. issues raised by Chris L. on @synchronized implementation.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46558 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30Fix codegen for conditionals with incommpatible pointer types. Code Eli Friedman
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
2008-01-30fix a problem reported by Eli, caused by not keeping bool as i1 Chris Lattner
when in a register. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46552 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30make this pass by adding an expected error, add some tests.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46551 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30Eli points out this can only happen for scalar elements.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46550 91177308-0d34-0410-b5e6-96231b3b80d8