Commit Graph

4038 Commits

Author SHA1 Message Date
Steve Naroff
5d5efca405 -Add missing visitor for ObjCIvarRefExpr.
-Wrap objc runtime calls with "extern "C"" (for now).

llvm-svn: 48284
2008-03-12 13:19:12 +00:00
Steve Naroff
4182fd56ad Since the rewriter now outputs C++, it no longer makes sense to pipe the output to clang.
This should "fix" all but one of the test failure.

llvm-svn: 48275
2008-03-12 02:07:40 +00:00
Ted Kremenek
48a3410e25 Fixed regression in SymbolManager introduced in r48272.
llvm-svn: 48273
2008-03-12 02:00:37 +00:00
Ted Kremenek
68d73d19f1 Prototype (pre-alpha) implementation of CFRef checker.
llvm-svn: 48272
2008-03-12 01:21:45 +00:00
Steve Naroff
251084d03e Remove more dependencies on C "flexible array member" idiom (when generating meta-data).
llvm-svn: 48271
2008-03-12 01:06:30 +00:00
Steve Naroff
dc5b6b2e5d Make ivar rewrite C++ friendly (since C++ forces a unified namespace for typedefs/structures). The previous version of the rewriter generated both a type def and structure def for each class (which doesn't fly in C++).
llvm-svn: 48266
2008-03-12 00:25:36 +00:00
Ted Kremenek
2a723e6e80 Added pretty-printing support for checker-specific state for the CFRefCount checker.
llvm-svn: 48242
2008-03-11 19:44:10 +00:00
Ted Kremenek
d01efb547f Expanded graph-visualization to include optional pretty-printing of checker-specific state.
llvm-svn: 48238
2008-03-11 19:02:40 +00:00
Ted Kremenek
827d0fcd57 Expanded ValueState pretty-printing to use an optional "CheckerStatePrinter"
object to pretty-print the component of a state that is specific to a checker.

llvm-svn: 48237
2008-03-11 18:57:24 +00:00
Ted Kremenek
a7178c7429 Expanded graph visualization interface to include specifying a range of
nodes to use a trim sources.

llvm-svn: 48236
2008-03-11 18:25:33 +00:00
Steve Naroff
0b844f053f Make "super" rewrite for class methods C++ friendly (follow-up from last commit).
llvm-svn: 48235
2008-03-11 18:14:26 +00:00
Ted Kremenek
e5605568ae Added bookkeeping of error nodes.
llvm-svn: 48234
2008-03-11 18:14:09 +00:00
Ted Kremenek
bf9d8048c6 Added main logic for typestate tracking for the CFRetain checker.
llvm-svn: 48231
2008-03-11 17:48:22 +00:00
Steve Naroff
17978c4dcb Make "super" rewrite C++ friendly (since it doesn't support Compound Literals).
llvm-svn: 48230
2008-03-11 17:37:02 +00:00
Ted Kremenek
819e9b6f39 Added main skeleton for CFRetain transfer function logic.
llvm-svn: 48214
2008-03-11 06:39:11 +00:00
Steve Naroff
c5b9cc70ce Generate meta-data in a C++ compatible way (remove 2 dependencies on C "flexible array member" idiom and perform some extra casts).
llvm-svn: 48202
2008-03-11 00:12:29 +00:00
Steve Naroff
14a0746b13 Missed a couple "_IMPL" suffixes.
llvm-svn: 48191
2008-03-10 23:33:22 +00:00
Steve Naroff
a1e115ee57 Fix dangling pointer and give the implementation struct for a class a unique name.
llvm-svn: 48190
2008-03-10 23:16:54 +00:00
Anders Carlsson
0be8163fb6 Add support for the 'N' constraint.
llvm-svn: 48185
2008-03-10 22:37:16 +00:00
Steve Naroff
945a3b145a Pass LangOptions to RewriteTest().
llvm-svn: 48172
2008-03-10 20:43:59 +00:00
Chris Lattner
4114219ac6 rewriter tests are darwin specific, don't run them on other platforms.
llvm-svn: 48168
2008-03-10 19:32:31 +00:00
Chris Lattner
89fc4d4af7 Fix "error: explicit template specialization cannot have a storage class"
with gcc 4.4, patch by Shantonu Sen!

llvm-svn: 48155
2008-03-10 17:06:40 +00:00
Chris Lattner
0d799d3957 Add some missing #includes for GCC mainline, patch by Shantonu Sen!
llvm-svn: 48153
2008-03-10 17:04:53 +00:00
Ted Kremenek
afa02ed5fb Add transfer function support for pointer arithmetic where the
increment/decrement operand is on the left side.

llvm-svn: 48144
2008-03-10 15:17:11 +00:00
Chris Lattner
242245d8ec add comments about some simple optimizations that may become
more important if this api gets wider use.

llvm-svn: 48131
2008-03-10 06:20:22 +00:00
Chris Lattner
3e4683262e implement simple support for arbitrary token lookahead. Change the
objc @try parser to use it, fixing a FIXME.  Update the 
objc-try-catch-1.m file to pass now that we get more reasonable 
errors.

llvm-svn: 48129
2008-03-10 06:06:04 +00:00
Ted Kremenek
a34cf6de66 More edge-case handling with using liveness information to prune dead state values.
llvm-svn: 48127
2008-03-10 04:45:00 +00:00
Ted Kremenek
b73a43cc01 More cleanups with using the liveness analysis to removed dead symbols and
variables from the symbolic state. Now we keep a mapping from the predecessor
node of a statement and its cleaned state, and interpose an accessor
"GetState()" to return the cleaned state when the node is the predecessor node,
and the real state otherwise. This obviates problem of ever accidentally
cleaning the state more than once (thus blowing away new bindings by mistake).

llvm-svn: 48124
2008-03-10 04:11:42 +00:00
Ted Kremenek
6c50479737 When processing the transfer function for a statement, evaluate
RemoveDeadBindings early because (1) it will always be called and (2) we can
dispatch to a plug-in transfer function that can evaluate the effect of dead
symbols (not yet added).

llvm-svn: 48114
2008-03-09 18:28:41 +00:00
Ted Kremenek
2d063bef8b Refactored guards for "GRExprEngine::RemoveDeadBindings" directly into the
method. This paves the way for other alterations to RemoveDeadBindings that are
transparent to its callers.

llvm-svn: 48113
2008-03-09 18:05:48 +00:00
Ted Kremenek
cfd8b19ef7 Bug fix in the transfer function for compound assignments: if the value
of the LHS expressions is Unknown, the value of the entire expression
does not evaluate to the RHS (as is the case with normal assignments).

llvm-svn: 48102
2008-03-09 08:12:37 +00:00
Anders Carlsson
a3a96afb51 Handle the 'n' constraint
llvm-svn: 48091
2008-03-09 06:02:02 +00:00
Chris Lattner
6af064641f Fix a ted-o
llvm-svn: 48089
2008-03-09 05:25:01 +00:00
Ted Kremenek
ebe5c8520c Fixed crash where SetBlkExpr would attempt to query the liveness data when
we weren't processing a statement within a basic block.

llvm-svn: 48087
2008-03-09 05:15:50 +00:00
Chris Lattner
d2d3441ddb improve comment.
llvm-svn: 48083
2008-03-09 04:49:35 +00:00
Chris Lattner
f7ad82df8c move PP::LookupFile from PPLexerChange -> PPDirectives.cpp
llvm-svn: 48082
2008-03-09 04:17:44 +00:00
Chris Lattner
e35109726c Add PPLexerChange.cpp to the project.
llvm-svn: 48081
2008-03-09 04:14:55 +00:00
Chris Lattner
1eed734c9c Move a bunch more code out of Preprocessor.cpp into PPLexerChange.cpp
llvm-svn: 48080
2008-03-09 04:10:46 +00:00
Ted Kremenek
03ab156041 Bug fix: Don't call RemoveDeadBindings more than once (can kill newly generated values to Block-Level Expressions).
llvm-svn: 48079
2008-03-09 03:30:59 +00:00
Chris Lattner
8962015386 split macro expansion support out of Preprocessor.cpp into PPMacroExpansion.cpp
Rename Directives.cpp -> PPDirectives.cpp since it implements part of the
Preprocessor class.

llvm-svn: 48078
2008-03-09 03:13:06 +00:00
Nate Begeman
aca747a34a Propagate calling convention information to function declarations and CallInst
instructions.

llvm-svn: 48077
2008-03-09 03:09:36 +00:00
Chris Lattner
1d4000ba50 rename HandleEndOfMacro -> HandleEndOfTokenLexer
llvm-svn: 48076
2008-03-09 03:04:16 +00:00
Chris Lattner
7ff66fb91e split the MacroArgs class out of TokenLexer.cpp/h into
MacroArgs.cpp/h

llvm-svn: 48075
2008-03-09 02:55:12 +00:00
Chris Lattner
d5917cef95 update documentation
llvm-svn: 48074
2008-03-09 02:27:26 +00:00
Chris Lattner
285c0c1150 rename some MacroExpander-related ivars to TokenLexer.
llvm-svn: 48073
2008-03-09 02:26:03 +00:00
Chris Lattner
5bb36002be Rename MacroExpander.cpp/h -> TokenLexer.cpp/h
llvm-svn: 48072
2008-03-09 02:22:57 +00:00
Chris Lattner
95d72cdf0f rename the MacroExpander class to TokenLexer. It handles both
token streams and macro lexing, so a more generic name is useful.

llvm-svn: 48071
2008-03-09 02:18:51 +00:00
Chris Lattner
d7daed1478 rename MacroTokens -> Tokens. When this is a token stream, there is no macro
involved.

llvm-svn: 48070
2008-03-09 02:07:49 +00:00
Nate Begeman
6127ae4cde fix clang xcode build
llvm-svn: 48069
2008-03-09 01:55:39 +00:00
Chris Lattner
f64b352660 split preprocesor directive handling out of Preprocessor.cpp into Directives.cpp
llvm-svn: 48068
2008-03-09 01:54:53 +00:00