]> granicus.if.org Git - clang/log
clang
16 years agoAdded pretty-printing support for checker-specific state for the CFRefCount checker.
Ted Kremenek [Tue, 11 Mar 2008 19:44:10 +0000 (19:44 +0000)]
Added pretty-printing support for checker-specific state for the CFRefCount checker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48242 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoExpanded graph-visualization to include optional pretty-printing of checker-specific...
Ted Kremenek [Tue, 11 Mar 2008 19:02:40 +0000 (19:02 +0000)]
Expanded graph-visualization to include optional pretty-printing of checker-specific state.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48238 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoExpanded ValueState pretty-printing to use an optional "CheckerStatePrinter"
Ted Kremenek [Tue, 11 Mar 2008 18:57:24 +0000 (18:57 +0000)]
Expanded ValueState pretty-printing to use an optional "CheckerStatePrinter"
object to pretty-print the component of a state that is specific to a checker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48237 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoExpanded graph visualization interface to include specifying a range of
Ted Kremenek [Tue, 11 Mar 2008 18:25:33 +0000 (18:25 +0000)]
Expanded graph visualization interface to include specifying a range of
nodes to use a trim sources.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48236 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake "super" rewrite for class methods C++ friendly (follow-up from last commit).
Steve Naroff [Tue, 11 Mar 2008 18:14:26 +0000 (18:14 +0000)]
Make "super" rewrite for class methods C++ friendly (follow-up from last commit).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48235 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded bookkeeping of error nodes.
Ted Kremenek [Tue, 11 Mar 2008 18:14:09 +0000 (18:14 +0000)]
Added bookkeeping of error nodes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48234 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded main logic for typestate tracking for the CFRetain checker.
Ted Kremenek [Tue, 11 Mar 2008 17:48:22 +0000 (17:48 +0000)]
Added main logic for typestate tracking for the CFRetain checker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48231 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake "super" rewrite C++ friendly (since it doesn't support Compound Literals).
Steve Naroff [Tue, 11 Mar 2008 17:37:02 +0000 (17:37 +0000)]
Make "super" rewrite C++ friendly (since it doesn't support Compound Literals).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48230 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded main skeleton for CFRetain transfer function logic.
Ted Kremenek [Tue, 11 Mar 2008 06:39:11 +0000 (06:39 +0000)]
Added main skeleton for CFRetain transfer function logic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48214 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoGenerate meta-data in a C++ compatible way (remove 2 dependencies on C "flexible...
Steve Naroff [Tue, 11 Mar 2008 00:12:29 +0000 (00:12 +0000)]
Generate meta-data in a C++ compatible way (remove 2 dependencies on C "flexible array member" idiom and perform some extra casts).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48202 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMissed a couple "_IMPL" suffixes.
Steve Naroff [Mon, 10 Mar 2008 23:33:22 +0000 (23:33 +0000)]
Missed a couple "_IMPL" suffixes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48191 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix dangling pointer and give the implementation struct for a class a unique name.
Steve Naroff [Mon, 10 Mar 2008 23:16:54 +0000 (23:16 +0000)]
Fix dangling pointer and give the implementation struct for a class a unique name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48190 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd support for the 'N' constraint.
Anders Carlsson [Mon, 10 Mar 2008 22:37:16 +0000 (22:37 +0000)]
Add support for the 'N' constraint.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48185 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPass LangOptions to RewriteTest().
Steve Naroff [Mon, 10 Mar 2008 20:43:59 +0000 (20:43 +0000)]
Pass LangOptions to RewriteTest().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48172 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agorewriter tests are darwin specific, don't run them on other platforms.
Chris Lattner [Mon, 10 Mar 2008 19:32:31 +0000 (19:32 +0000)]
rewriter tests are darwin specific, don't run them on other platforms.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48168 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix "error: explicit template specialization cannot have a storage class"
Chris Lattner [Mon, 10 Mar 2008 17:06:40 +0000 (17:06 +0000)]
Fix "error: explicit template specialization cannot have a storage class"
with gcc 4.4, patch by Shantonu Sen!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48155 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd some missing #includes for GCC mainline, patch by Shantonu Sen!
Chris Lattner [Mon, 10 Mar 2008 17:04:53 +0000 (17:04 +0000)]
Add some missing #includes for GCC mainline, patch by Shantonu Sen!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48153 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd transfer function support for pointer arithmetic where the
Ted Kremenek [Mon, 10 Mar 2008 15:17:11 +0000 (15:17 +0000)]
Add transfer function support for pointer arithmetic where the
increment/decrement operand is on the left side.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48144 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadd comments about some simple optimizations that may become
Chris Lattner [Mon, 10 Mar 2008 06:20:22 +0000 (06:20 +0000)]
add comments about some simple optimizations that may become
more important if this api gets wider use.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48131 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoimplement simple support for arbitrary token lookahead. Change the
Chris Lattner [Mon, 10 Mar 2008 06:06:04 +0000 (06:06 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48129 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMore edge-case handling with using liveness information to prune dead state values.
Ted Kremenek [Mon, 10 Mar 2008 04:45:00 +0000 (04:45 +0000)]
More edge-case handling with using liveness information to prune dead state values.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48127 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMore cleanups with using the liveness analysis to removed dead symbols and
Ted Kremenek [Mon, 10 Mar 2008 04:11:42 +0000 (04:11 +0000)]
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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48124 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoWhen processing the transfer function for a statement, evaluate
Ted Kremenek [Sun, 9 Mar 2008 18:28:41 +0000 (18:28 +0000)]
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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48114 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRefactored guards for "GRExprEngine::RemoveDeadBindings" directly into the
Ted Kremenek [Sun, 9 Mar 2008 18:05:48 +0000 (18:05 +0000)]
Refactored guards for "GRExprEngine::RemoveDeadBindings" directly into the
method. This paves the way for other alterations to RemoveDeadBindings that are
transparent to its callers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48113 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoBug fix in the transfer function for compound assignments: if the value
Ted Kremenek [Sun, 9 Mar 2008 08:12:37 +0000 (08:12 +0000)]
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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48102 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoHandle the 'n' constraint
Anders Carlsson [Sun, 9 Mar 2008 06:02:02 +0000 (06:02 +0000)]
Handle the 'n' constraint

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48091 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a ted-o
Chris Lattner [Sun, 9 Mar 2008 05:25:01 +0000 (05:25 +0000)]
Fix a ted-o

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48089 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFixed crash where SetBlkExpr would attempt to query the liveness data when
Ted Kremenek [Sun, 9 Mar 2008 05:15:50 +0000 (05:15 +0000)]
Fixed crash where SetBlkExpr would attempt to query the liveness data when
we weren't processing a statement within a basic block.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48087 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoimprove comment.
Chris Lattner [Sun, 9 Mar 2008 04:49:35 +0000 (04:49 +0000)]
improve comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48083 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agomove PP::LookupFile from PPLexerChange -> PPDirectives.cpp
Chris Lattner [Sun, 9 Mar 2008 04:17:44 +0000 (04:17 +0000)]
move PP::LookupFile from PPLexerChange -> PPDirectives.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48082 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd PPLexerChange.cpp to the project.
Chris Lattner [Sun, 9 Mar 2008 04:14:55 +0000 (04:14 +0000)]
Add PPLexerChange.cpp to the project.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48081 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMove a bunch more code out of Preprocessor.cpp into PPLexerChange.cpp
Chris Lattner [Sun, 9 Mar 2008 04:10:46 +0000 (04:10 +0000)]
Move a bunch more code out of Preprocessor.cpp into PPLexerChange.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48080 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoBug fix: Don't call RemoveDeadBindings more than once (can kill newly generated value...
Ted Kremenek [Sun, 9 Mar 2008 03:30:59 +0000 (03:30 +0000)]
Bug fix: Don't call RemoveDeadBindings more than once (can kill newly generated values to Block-Level Expressions).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48079 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agosplit macro expansion support out of Preprocessor.cpp into PPMacroExpansion.cpp
Chris Lattner [Sun, 9 Mar 2008 03:13:06 +0000 (03:13 +0000)]
split macro expansion support out of Preprocessor.cpp into PPMacroExpansion.cpp
Rename Directives.cpp -> PPDirectives.cpp since it implements part of the
Preprocessor class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48078 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPropagate calling convention information to function declarations and CallInst
Nate Begeman [Sun, 9 Mar 2008 03:09:36 +0000 (03:09 +0000)]
Propagate calling convention information to function declarations and CallInst
instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48077 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agorename HandleEndOfMacro -> HandleEndOfTokenLexer
Chris Lattner [Sun, 9 Mar 2008 03:04:16 +0000 (03:04 +0000)]
rename HandleEndOfMacro -> HandleEndOfTokenLexer

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48076 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agosplit the MacroArgs class out of TokenLexer.cpp/h into
Chris Lattner [Sun, 9 Mar 2008 02:55:12 +0000 (02:55 +0000)]
split the MacroArgs class out of TokenLexer.cpp/h into
MacroArgs.cpp/h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48075 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoupdate documentation
Chris Lattner [Sun, 9 Mar 2008 02:27:26 +0000 (02:27 +0000)]
update documentation

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48074 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agorename some MacroExpander-related ivars to TokenLexer.
Chris Lattner [Sun, 9 Mar 2008 02:26:03 +0000 (02:26 +0000)]
rename some MacroExpander-related ivars to TokenLexer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48073 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRename MacroExpander.cpp/h -> TokenLexer.cpp/h
Chris Lattner [Sun, 9 Mar 2008 02:22:57 +0000 (02:22 +0000)]
Rename MacroExpander.cpp/h -> TokenLexer.cpp/h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48072 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agorename the MacroExpander class to TokenLexer. It handles both
Chris Lattner [Sun, 9 Mar 2008 02:18:51 +0000 (02:18 +0000)]
rename the MacroExpander class to TokenLexer.  It handles both
token streams and macro lexing, so a more generic name is useful.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48071 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agorename MacroTokens -> Tokens. When this is a token stream, there is no macro
Chris Lattner [Sun, 9 Mar 2008 02:07:49 +0000 (02:07 +0000)]
rename MacroTokens -> Tokens.  When this is a token stream, there is no macro
involved.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48070 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agofix clang xcode build
Nate Begeman [Sun, 9 Mar 2008 01:55:39 +0000 (01:55 +0000)]
fix clang xcode build

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48069 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agosplit preprocesor directive handling out of Preprocessor.cpp into Directives.cpp
Chris Lattner [Sun, 9 Mar 2008 01:54:53 +0000 (01:54 +0000)]
split preprocesor directive handling out of Preprocessor.cpp into Directives.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48068 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agosecondary targets are gone, simplify this.
Chris Lattner [Sun, 9 Mar 2008 01:36:43 +0000 (01:36 +0000)]
secondary targets are gone, simplify this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48067 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agosimplify triple processing code now that there can be only one arch specified.
Chris Lattner [Sun, 9 Mar 2008 01:35:13 +0000 (01:35 +0000)]
simplify triple processing code now that there can be only one arch specified.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48066 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agobe more quiet when building headers.
Chris Lattner [Sun, 9 Mar 2008 01:29:23 +0000 (01:29 +0000)]
be more quiet when building headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48065 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadd some comments.
Chris Lattner [Sat, 8 Mar 2008 09:00:55 +0000 (09:00 +0000)]
add some comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48053 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agomake float format handling more regular.
Chris Lattner [Sat, 8 Mar 2008 08:59:43 +0000 (08:59 +0000)]
make float format handling more regular.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48052 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agosimplify all the type info accessors in TargeTInfo to return scalars,
Chris Lattner [Sat, 8 Mar 2008 08:52:55 +0000 (08:52 +0000)]
simplify all the type info accessors in TargeTInfo to return scalars,
which is simpler to use and provide.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48051 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a fixme by allowing pointers in different address spaces to have
Chris Lattner [Sat, 8 Mar 2008 08:34:58 +0000 (08:34 +0000)]
Fix a fixme by allowing pointers in different address spaces to have
different widths.  Start simplifying TargetInfo accessor methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48050 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoeliminate the TargetInfoImpl stuff, simplifying the target implementations.
Chris Lattner [Sat, 8 Mar 2008 08:24:01 +0000 (08:24 +0000)]
eliminate the TargetInfoImpl stuff, simplifying the target implementations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48049 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoeliminate ComputeWCharInfo.
Chris Lattner [Sat, 8 Mar 2008 08:07:34 +0000 (08:07 +0000)]
eliminate ComputeWCharInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48048 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoIncreased worklist limit for GRSimpleVals.
Ted Kremenek [Fri, 7 Mar 2008 22:59:32 +0000 (22:59 +0000)]
Increased worklist limit for GRSimpleVals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48037 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded --trim-path-graph to the driver to trim paths from the ExplodedGraph
Ted Kremenek [Fri, 7 Mar 2008 22:58:01 +0000 (22:58 +0000)]
Added --trim-path-graph to the driver to trim paths from the ExplodedGraph
that are not related to error nodes.

Fixed bug where we did not detect some NULL dereferences.

Added "ExplodedGraph::Trim" to trim all nodes that cannot transitively reach
a set of provided nodes.

Fixed subtle bug in ExplodedNodeImpl where we could create predecessor
iterators that included the mangled "sink" bit.  The better fix is to integrate
this bit into the void* for the wrapped State, not the NodeGroups representing
a node's predecessors and successors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48036 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImproved graph visualization of ExplodedGraphs to include source line and column
Ted Kremenek [Fri, 7 Mar 2008 20:57:30 +0000 (20:57 +0000)]
Improved graph visualization of ExplodedGraphs to include source line and column
information.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48031 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRenamed ValueManager to BasicValueFactory.
Ted Kremenek [Fri, 7 Mar 2008 20:13:31 +0000 (20:13 +0000)]
Renamed ValueManager to BasicValueFactory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48025 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd new test
Nate Begeman [Fri, 7 Mar 2008 20:04:49 +0000 (20:04 +0000)]
Add new test

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48018 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd fastcall/stdcall attribute support
Nate Begeman [Fri, 7 Mar 2008 20:04:22 +0000 (20:04 +0000)]
Add fastcall/stdcall attribute support
Generate CallingConv::Fast when fastcall attribute is present

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48017 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRefined divide-by-zero checking to distinguish between must and may
Ted Kremenek [Fri, 7 Mar 2008 19:04:53 +0000 (19:04 +0000)]
Refined divide-by-zero checking to distinguish between must and may
divide-by-zero errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48013 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPatch by Nuno Lopes:
Ted Kremenek [Fri, 7 Mar 2008 18:43:49 +0000 (18:43 +0000)]
Patch by Nuno Lopes:

  Added more comments for code processing attribute "format".
  Added more checks for corner cases, test cases, and warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48011 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agofix typos
Gabor Greif [Thu, 6 Mar 2008 10:40:09 +0000 (10:40 +0000)]
fix typos

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47995 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFixed mismatched deallocation in GRBlockCounter::Factory::~Factory.
Ted Kremenek [Thu, 6 Mar 2008 08:09:22 +0000 (08:09 +0000)]
Fixed mismatched deallocation in GRBlockCounter::Factory::~Factory.
Reported by Zhongxing Xu!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47991 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoremove two obsolete tests, not sure why my previous commit didn't commit the removal.
Chris Lattner [Thu, 6 Mar 2008 05:47:17 +0000 (05:47 +0000)]
remove two obsolete tests, not sure why my previous commit didn't commit the removal.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47986 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded boilerplate to execute the CF reference count checker (which isn't yet implemen...
Ted Kremenek [Thu, 6 Mar 2008 00:08:09 +0000 (00:08 +0000)]
Added boilerplate to execute the CF reference count checker (which isn't yet implemented).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47982 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded "CheckerState" field to ValueState.
Ted Kremenek [Wed, 5 Mar 2008 23:32:23 +0000 (23:32 +0000)]
Added "CheckerState" field to ValueState.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47979 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded transfer function support for __builtin_expect.
Ted Kremenek [Wed, 5 Mar 2008 22:59:42 +0000 (22:59 +0000)]
Added transfer function support for __builtin_expect.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47971 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSmall bug fix when handling CallExprs that generate sink nodes.
Ted Kremenek [Wed, 5 Mar 2008 22:49:16 +0000 (22:49 +0000)]
Small bug fix when handling CallExprs that generate sink nodes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47970 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUpdate vcproj files.
Steve Naroff [Wed, 5 Mar 2008 22:16:33 +0000 (22:16 +0000)]
Update vcproj files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47967 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFixed bug that could case unwanted bifurcation of states when evaluating calls.
Ted Kremenek [Wed, 5 Mar 2008 21:15:02 +0000 (21:15 +0000)]
Fixed bug that could case unwanted bifurcation of states when evaluating calls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47964 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFixed bogus assumption mistakenly introduced in r47955.
Ted Kremenek [Wed, 5 Mar 2008 19:26:46 +0000 (19:26 +0000)]
Fixed bogus assumption mistakenly introduced in r47955.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47958 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFixed a horribly insidious bit-masking bug in the implementation of
Ted Kremenek [Wed, 5 Mar 2008 19:08:55 +0000 (19:08 +0000)]
Fixed a horribly insidious bit-masking bug in the implementation of
ExplodedNode that would occasionally result in heap corruption.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47956 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMinor cleanups (mainly indentation).
Ted Kremenek [Wed, 5 Mar 2008 19:08:15 +0000 (19:08 +0000)]
Minor cleanups (mainly indentation).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47955 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoremove the source location arguments to various target query methods.
Chris Lattner [Wed, 5 Mar 2008 18:54:05 +0000 (18:54 +0000)]
remove the source location arguments to various target query methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47954 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadd analysis source files to project.
Chris Lattner [Wed, 5 Mar 2008 18:22:36 +0000 (18:22 +0000)]
add analysis source files to project.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47953 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd the various pathsensitive headers to the project.
Chris Lattner [Wed, 5 Mar 2008 18:20:02 +0000 (18:20 +0000)]
Add the various pathsensitive headers to the project.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47952 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoProgramEdge.h doesn't exist anymore.
Chris Lattner [Wed, 5 Mar 2008 18:18:31 +0000 (18:18 +0000)]
ProgramEdge.h doesn't exist anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47951 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoReverted patch 47926 for ProgramPoint.h because it is currently buggy. May add back...
Ted Kremenek [Wed, 5 Mar 2008 05:05:04 +0000 (05:05 +0000)]
Reverted patch 47926 for ProgramPoint.h because it is currently buggy.  May add back (fixed) later.
Updated CFGStmtVisitor to be in accord with rr47913: CallExprs are no longer (automatically) block-level expressions in the CFG.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47935 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove the first layer of support for "portability" warnings. This is
Chris Lattner [Wed, 5 Mar 2008 01:18:20 +0000 (01:18 +0000)]
Remove the first layer of support for "portability" warnings.  This is
theoretically useful, but not useful in practice.  It adds a bunch of
complexity, and not much value.  It's best to nuke it.  One big advantage
is that it means the target interfaces will soon lose their SLoc arguments
and target queries can never emit diagnostics anymore (yay).  Removing this
also simplifies some of the core preprocessor which should make it slightly
faster.

Ted, I didn't simplify TripleProcessor, which can now have at most one
triple, and can probably just be removed.  Please poke at it when you have
time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47930 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded support for ProgramPoints to represent ExplodedNodes in another
Ted Kremenek [Wed, 5 Mar 2008 00:59:43 +0000 (00:59 +0000)]
Added support for ProgramPoints to represent ExplodedNodes in another
ExplodedGraph. This allows us to build "layered" ExplodedGraphs where one
simulation is layered on another.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47926 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agomove this into the right file.
Chris Lattner [Wed, 5 Mar 2008 00:53:34 +0000 (00:53 +0000)]
move this into the right file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47925 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPlug-in transfer function "EvalCall" now takes as an argument the current
Ted Kremenek [Wed, 5 Mar 2008 00:33:14 +0000 (00:33 +0000)]
Plug-in transfer function "EvalCall" now takes as an argument the current
GRStmtNodeBuilder and is now responsible for adding its own nodes to the graph.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47923 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCleaned up typedefs involving StateTy so that we always use "StateTy*" instead of...
Ted Kremenek [Wed, 5 Mar 2008 00:11:33 +0000 (00:11 +0000)]
Cleaned up typedefs involving StateTy so that we always use "StateTy*" instead of StateTy.
This is conceptually much cleaner, as it shows that the state is always a pointer.
It also makes it easier to marshall these values around across the internal APIs
of the path-sensitive engine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47921 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake GRStmtNodeBuilder only depend on StateTy, and not the type definition
Ted Kremenek [Tue, 4 Mar 2008 23:50:00 +0000 (23:50 +0000)]
Make GRStmtNodeBuilder only depend on StateTy, and not the type definition
of the entire checker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47920 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMoved implementation of GRExprEngine::Nodify into GRStmtNodeBuilder. This will
Ted Kremenek [Tue, 4 Mar 2008 23:39:43 +0000 (23:39 +0000)]
Moved implementation of GRExprEngine::Nodify into GRStmtNodeBuilder.  This will
allow us to pass the builder to plug-in transfer functions and allow those
functions to create intermediate nodes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47919 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMoved GRExprEngine::NodeSet out of GRExprEngine and made it a standalone class: Explo...
Ted Kremenek [Tue, 4 Mar 2008 23:13:06 +0000 (23:13 +0000)]
Moved GRExprEngine::NodeSet out of GRExprEngine and made it a standalone class: ExplodedNodeSet.
Made GRExprEngine::NodeSet a typedef of ExplodedNodeSet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47914 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCallExprs are now no longer block-level expressions in the CFG by construction.
Ted Kremenek [Tue, 4 Mar 2008 22:29:40 +0000 (22:29 +0000)]
CallExprs are now no longer block-level expressions in the CFG by construction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47913 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded preliminary transfer function support for references.
Ted Kremenek [Tue, 4 Mar 2008 22:16:08 +0000 (22:16 +0000)]
Added preliminary transfer function support for references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47912 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFor the transfer function for CallExpr, invalidate all arguments
Ted Kremenek [Tue, 4 Mar 2008 22:01:56 +0000 (22:01 +0000)]
For the transfer function for CallExpr, invalidate all arguments
passed-by-reference to builtin functions until we have better builtin support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47910 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake intrinsics always_inline.
Anders Carlsson [Tue, 4 Mar 2008 21:11:29 +0000 (21:11 +0000)]
Make intrinsics always_inline.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47902 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFor the transfer function of DeclStmt, for now initialize the values of
Ted Kremenek [Tue, 4 Mar 2008 20:40:11 +0000 (20:40 +0000)]
For the transfer function of DeclStmt, for now initialize the values of
structs (local variables) to Unknown instead of Undefined.  (added FIXME to initialize *members* of struct to undefined)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47901 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFixed another obscure node-caching bug.
Ted Kremenek [Tue, 4 Mar 2008 19:52:15 +0000 (19:52 +0000)]
Fixed another obscure node-caching bug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47898 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImplemented "print" method for ValueState.
Ted Kremenek [Tue, 4 Mar 2008 18:30:35 +0000 (18:30 +0000)]
Implemented "print" method for ValueState.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47894 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoThe operand to the visibility attribute is required to be a quoted string, not a...
Chris Lattner [Tue, 4 Mar 2008 18:08:48 +0000 (18:08 +0000)]
The operand to the visibility attribute is required to be a quoted string, not a bare identifier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47893 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTargetInfo objects now own the TargetInfoImpl objects they refer to.
Ted Kremenek [Tue, 4 Mar 2008 17:47:18 +0000 (17:47 +0000)]
TargetInfo objects now own the TargetInfoImpl objects they refer to.
TargetInfo::AddSecondaryTarget is now private, as it is only used during
object construction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47891 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd transfer function support for the default initialization of static
Ted Kremenek [Tue, 4 Mar 2008 04:18:04 +0000 (04:18 +0000)]
Add transfer function support for the default initialization of static
variables that are pointers or integers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47880 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFixed insidious state propagation bug that would sometimes cause the state
Ted Kremenek [Tue, 4 Mar 2008 00:56:45 +0000 (00:56 +0000)]
Fixed insidious state propagation bug that would sometimes cause the state
to bifurcate at the wrong places and not propagate at others.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47876 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoEnhanced pretty-printing of undefined-argument errors.
Ted Kremenek [Tue, 4 Mar 2008 00:42:54 +0000 (00:42 +0000)]
Enhanced pretty-printing of undefined-argument errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47873 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agomove deprecated -> attributes.c
Chris Lattner [Mon, 3 Mar 2008 21:17:42 +0000 (21:17 +0000)]
move deprecated -> attributes.c

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47856 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTemporarily rename mmintrin.h so that it won't clash with the system header. It will...
Anders Carlsson [Mon, 3 Mar 2008 19:34:30 +0000 (19:34 +0000)]
Temporarily rename mmintrin.h so that it won't clash with the system header. It will be renamed back once the few remaining methods have been implemented.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47852 91177308-0d34-0410-b5e6-96231b3b80d8