Commit Graph

4210 Commits

Author SHA1 Message Date
Ted Kremenek fff4fc7e6d Bug fix in CFG construction: VisitCompoundStmt should return the last created block.
llvm-svn: 48460
2008-03-17 17:19:44 +00:00
Gabor Greif 5434053f6d Implemented verbose mode.
make test VERBOSE=1
should now produce the same output like
the Makefile normally does.
Without VERBOSE only the names of failed tests
are printed.

I am pretty comfortable with this version, and
I think it is time to switch over to Makefile.parallel
to be the default.

What do you think? Did I forget some piece of feedback?

llvm-svn: 48458
2008-03-17 16:29:58 +00:00
Gabor Greif 430efdb95b Simplify further by creating *.testresults files
inside of the Output/ directory.
The testclean target could be removed now.

llvm-svn: 48457
2008-03-17 15:58:58 +00:00
Gabor Greif 4892b3fd5b Get rid of the creation of secondary makefile "Makefile.tests".
This implements second part of
<http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080310/004727.html>.

llvm-svn: 48456
2008-03-17 15:37:09 +00:00
Gabor Greif 2fc473069d More review feedback implemented:
Get rid of "awk" dependence by using same "make"
functionality:

<http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080310/004727.html>

llvm-svn: 48455
2008-03-17 15:07:59 +00:00
Gabor Greif d8d1b60237 Actually expand the %t1 patterns (in RUN: lines) to a unique
filename.
This fixes (e.g.) CodeGen/struct-x86-darwin.c which
raced at writing to "%t1" with other tests when parallel
testing was specified with a high "-j XX" value.

Also gets rid of the file tools/clang/test/%t1
when doing an "svn st" after testing.

llvm-svn: 48454
2008-03-17 13:45:47 +00:00
Gabor Greif 8eea5b51b5 Second round of review feedback.
* print out message when tests start
* testrunner sets status now
* on failed test run print out test name

I tested these changes with the non-parallel makefile
and it did not break.

llvm-svn: 48453
2008-03-17 12:35:00 +00:00
Chris Lattner 2c532e1002 eliminate the last signed element count.
llvm-svn: 48436
2008-03-17 01:26:42 +00:00
Chris Lattner 5bb4ee20cd clean up iteration over propertydecls.
llvm-svn: 48435
2008-03-17 01:24:41 +00:00
Chris Lattner ed0e16404c clean up property memory allocation to move it into the ast classes
like the rest of the classes.

llvm-svn: 48434
2008-03-17 01:19:02 +00:00
Chris Lattner 41eec3d097 make property addition work list all other "add" methods. Do
the allocation in the class, not in sema.

llvm-svn: 48433
2008-03-16 21:23:50 +00:00
Chris Lattner 219b3e9c6c add the last two Create methods for decls, woo!
llvm-svn: 48432
2008-03-16 21:17:37 +00:00
Chris Lattner 8d1c04f53a Convert more counts to be zero based instead of -1 based, make them unsigned.
llvm-svn: 48429
2008-03-16 21:08:55 +00:00
Chris Lattner 36ac1cae1f add two more Create methods.
llvm-svn: 48428
2008-03-16 20:53:07 +00:00
Chris Lattner d77aff8232 simplify the way ObjCCategoryDecl's get their referenced protocols list
specified.  Previously, the ctor would allocate memory for the list and then
it would get filled in later.  Move the allocation+filling in to be more 
consistent with other stuff, e.g. the addMethods method.

llvm-svn: 48427
2008-03-16 20:47:45 +00:00
Chris Lattner 1dd77af9ce Add create methods for ObjCCategoryDecl, ObjCForwardProtocolDecl, ObjCClassDecl.
llvm-svn: 48426
2008-03-16 20:34:23 +00:00
Chris Lattner 793ca20e2d make some more 'counts' unsigned.
llvm-svn: 48425
2008-03-16 20:27:39 +00:00
Chris Lattner 09a2085249 make NumClassMethods unsigned in categories
llvm-svn: 48424
2008-03-16 20:22:07 +00:00
Chris Lattner acc04a9261 minor cleanups, make getNumInstanceMethods always return unsigned.
llvm-svn: 48423
2008-03-16 20:19:15 +00:00
Chris Lattner 5074f8f3ef fix a crasher where an invalid program that multiply defined
a protocol could smash more references in than are allocated.

llvm-svn: 48411
2008-03-16 01:25:17 +00:00
Chris Lattner f87ca0a7d1 Give ObjCProtocolDecl a Create method.
llvm-svn: 48410
2008-03-16 01:23:04 +00:00
Chris Lattner 2a52083efc hoist a bunch of casting.
llvm-svn: 48409
2008-03-16 01:16:52 +00:00
Chris Lattner 96c501ef7e Add create methods for ObjCIvarDecl and ObjCInterfaceDecl
llvm-svn: 48408
2008-03-16 01:15:50 +00:00
Chris Lattner 011b0f5c5a Make the parameter count of ObjCMethodDecl unsigned, you
can't have negative arguments.

llvm-svn: 48407
2008-03-16 01:07:14 +00:00
Chris Lattner c557947488 remove some dead arguments to ObjCMethodDecl.
llvm-svn: 48406
2008-03-16 00:58:16 +00:00
Chris Lattner 8d8829e225 Give ObjCMethodDecl a Create method.
llvm-svn: 48405
2008-03-16 00:49:28 +00:00
Chris Lattner 893751970a Split objc decl implementation out into DeclObjC.cpp
llvm-svn: 48404
2008-03-16 00:19:01 +00:00
Chris Lattner ee1284a6e2 switch the rest of the C decl classes to do their
allocation through ASTContext.

llvm-svn: 48403
2008-03-16 00:16:02 +00:00
Chris Lattner 7a51313d8a Make a major restructuring of the clang tree: introduce a top-level
lib dir and move all the libraries into it.  This follows the main
llvm tree, and allows the libraries to be built in parallel.  The
top level now enforces that all the libs are built before Driver,
but we don't care what order the libs are built in.  This speeds
up parallel builds, particularly incremental ones.

llvm-svn: 48402
2008-03-15 23:59:48 +00:00
Chris Lattner d3f989ccd3 Make a ctor protected
llvm-svn: 48401
2008-03-15 23:04:32 +00:00
Ted Kremenek 056fb6be98 Fixed 80 col. violations.
llvm-svn: 48400
2008-03-15 22:11:54 +00:00
Ted Kremenek f5227057b1 Disable creation of "ContentsOf" symbols. It was fundamentally broken on many
levels; eventually we will need a plug-in model (similar to GRTransferFuncs) to
represent symbolic memory.

llvm-svn: 48399
2008-03-15 22:07:05 +00:00
Chris Lattner 96c460d142 move the ASTContext argument to be first in the argument list of
all Create methods.

llvm-svn: 48398
2008-03-15 21:32:50 +00:00
Chris Lattner 5072bae709 Switch over functiondecl. This makes it obvious that the ASTContext
argument to Create should be first, not last.

llvm-svn: 48397
2008-03-15 21:24:04 +00:00
Chris Lattner 4b08ca8f2e switch the VarDecl allocation model to go through ASTContext.
llvm-svn: 48396
2008-03-15 21:10:16 +00:00
Gabor Greif 2c7f144ab7 implement a bit of feedback: print dots
llvm-svn: 48394
2008-03-15 08:11:35 +00:00
Ted Kremenek 0d579b1c1e Added initialization to ErrorDiag to silence gcc's warning of the variable
potentially being used uninitialized (which it cannot be).

llvm-svn: 48393
2008-03-15 07:58:36 +00:00
Ted Kremenek cab47bdb37 Small bug fix in CFG construction: the active block for LabelStmts comes
from "Block", not the CFGBlock* returned from visiting its subexpression.

llvm-svn: 48392
2008-03-15 07:45:02 +00:00
Gabor Greif 322f055e05 First draft of a parallelized test methodology. Improvements soon.
llvm-svn: 48391
2008-03-15 07:26:41 +00:00
Chris Lattner a7b3287760 start switching decls over to using an allocator controlled by ASTContext.
Right now only some ctors are switched over.  I need to switch them all
over so I can change the dtor over.

This lets us experiment with region allocation and other things in the 
future.

llvm-svn: 48390
2008-03-15 06:12:44 +00:00
Chris Lattner 88f70d69c6 various minor cleanups.
llvm-svn: 48389
2008-03-15 05:43:15 +00:00
Ted Kremenek 02e24b6976 Handle StmtExprs whose last contained statement is not an expression.
llvm-svn: 48388
2008-03-15 03:27:30 +00:00
Ted Kremenek 88ba750f74 Compute alignment in bytes, not bits.
llvm-svn: 48387
2008-03-15 03:13:55 +00:00
Ted Kremenek ae5b78615c Implement transfer function logic for alignof operator (types).
llvm-svn: 48386
2008-03-15 03:13:20 +00:00
Ted Kremenek 5c98d1d641 Added transfer function support in GRExprEngine for __extension__.
llvm-svn: 48385
2008-03-15 03:05:30 +00:00
Steve Naroff dad80ba9b1 Link against the correct ObjC string class (__CFConstantStringClassReference) and fix length computation (removing a FIXME).
llvm-svn: 48384
2008-03-15 01:36:04 +00:00
Steve Naroff ce8e886731 Remove ObjC rewriter dependency on GCC's __builtin___CFStringMakeConstantString.
llvm-svn: 48383
2008-03-15 00:55:56 +00:00
Ted Kremenek 9e0461cd6e "panic" has 5 letters, not 4. Bug pointed out by Nuno Lopes!
llvm-svn: 48377
2008-03-14 23:25:49 +00:00
Ted Kremenek 9318f68ad4 Hack to hardwire in some panic functions that are not marked noreturn.
llvm-svn: 48374
2008-03-14 21:58:42 +00:00
Ted Kremenek 9abb59f9cc Emit warnings for undefined control-flow.
llvm-svn: 48368
2008-03-14 18:14:50 +00:00
Nate Begeman b561de7455 Correctly error on arrays with automatic storage full of objects with
non-default address space, and fix comment.
Add a test for this.

llvm-svn: 48366
2008-03-14 18:07:10 +00:00
Ted Kremenek 7b00d15bc5 Path-sensitive analyses no longer take a FunctionDecl, but any Decl representing
a block of "code".

Patched various ASTConsumers (such as ASTDumper) to have more support for
processing ObjCMethodDecl. CFGVisitor now builds CFGs for ObjCMethodDecls.

llvm-svn: 48363
2008-03-14 17:31:00 +00:00
Chris Lattner 5ff2d5defa add initial support for generating an llvm.globalctors list. Patch by David Chisnall
llvm-svn: 48362
2008-03-14 17:18:18 +00:00
Chris Lattner e8ec280627 Only compute targetinfo once and don't leak it. Patch by Sam Bishop!
llvm-svn: 48358
2008-03-14 06:12:05 +00:00
Chris Lattner 221929310b Make the preprocessor own its PPCallbacks, fixing a memory leak.
Patch by Sam Bishop!

llvm-svn: 48357
2008-03-14 06:07:05 +00:00
Nate Begeman 144625ef9b ISO/IEC TR 18037
An address space name cannot be used to qualify an object that has automatic
storage duration.  Still not catching ASQual'd allocas of array type, just 
scalars at the moment.

llvm-svn: 48350
2008-03-14 00:22:18 +00:00
Nate Begeman 65b0a6423f Fix comment
llvm-svn: 48347
2008-03-13 23:56:36 +00:00
Ted Kremenek 1fdd0a480e The LiveVariables analysis no longer requires a FunctionDecl&; this allows it
to be run on other declarations of blocks of code (e.g., Objective-C methods.)

llvm-svn: 48339
2008-03-13 16:55:07 +00:00
Chris Lattner fdc0748940 handle __extension__ properly at block scope.
llvm-svn: 48332
2008-03-13 06:32:11 +00:00
Chris Lattner b943aa8c6c instead of passing in null end location info, pass in the same as start.
This still isn't right, but is slightly nicer.

llvm-svn: 48331
2008-03-13 06:29:54 +00:00
Chris Lattner 2e23209df1 improve DeclStmt to be able to store SourceRange info correctly.
Set the start of DeclStmt range.  Right now the end is meaningless 
though.

llvm-svn: 48330
2008-03-13 06:29:04 +00:00
Anders Carlsson 8ec6a6ffe9 Add note about asm constraints.
llvm-svn: 48324
2008-03-13 03:45:48 +00:00
Ted Kremenek b64d183803 Added bandaid support in CFG construction for ObjCForEachStmt and ObjCAtTryStmt:
we gracefully back out and return NULL for the CFG, allowing clients to skip
analyzing functions with these CFGs. We will add support later.

Modified base ASTConsumer "CFGVisitor" to detect when a CFG is not constructed
and to emit a warning.

llvm-svn: 48322
2008-03-13 03:04:22 +00:00
Steve Naroff 35cb7960e3 Two fixes to RewriteTest::RewriteObjCIvarRefExpr():
- For explicit ivar refers, make sure the cast is propagated to the AST.
- Don't free the base (since it is still in use).
This fixes the recent regression to test/Rewriter/objc-ivar-receiver-1.m.

llvm-svn: 48309
2008-03-12 23:15:19 +00:00
Ted Kremenek e2f6d6cdb8 Changed CallRetValSymbol to SymbolConjured to allow "conjured" symbols to be created for any expression, not just CallExprs.
Added experimental support for conjuring symbols during assingments where the RHS is "unknown".  This allows more value tracking for path-sensitivity.
Fixed bug in "assumption" logic when processing symbolic constraints; we would improperly mark constraints we didn't support as infeasible.

llvm-svn: 48306
2008-03-12 21:45:47 +00:00
Steve Naroff ffb5f9ad93 Minor aesthetic improvement (after I reviewed my last commit).
llvm-svn: 48304
2008-03-12 21:22:52 +00:00
Steve Naroff 9f33bd2c34 Avoid using the "unnamed struct field" extension (enabled with -fms-extensions). This feature/extension silently does the wrong thing in g++. As far as I can tell, g++ simply throws the field away entirely (note that it works fine with gcc). Since I am now always casting the object (for other reasons), accessing protected/public fields simply requires the cast refer to the defining class. This solution is simpler all around (thanks to Chris for suggesting it).
llvm-svn: 48302
2008-03-12 21:09:20 +00:00
Ted Kremenek 626bd2d33e Added generation of symbolic values for the return values of functions that have
no summaries (useful for false-path pruning).

llvm-svn: 48301
2008-03-12 21:06:49 +00:00
Ted Kremenek 86f1d0cd80 In GRSimpleVals, added the generation of symbolic values for the return values
of function calls. This is useful in pruning paths.

llvm-svn: 48299
2008-03-12 21:04:07 +00:00
Chris Lattner 28842b7c0d Update to reflect changes in parameter attribute api.
llvm-svn: 48290
2008-03-12 17:46:07 +00:00
Steve Naroff b327e49047 Use the "used" attribute. Without it, g++ removes all the meta-data:-( This doesn't happen when compiling straight C code.
llvm-svn: 48287
2008-03-12 17:18:30 +00:00
Ted Kremenek 576b76a794 Improved ExplodedGraph::Trim to only show nodes reachable from a reverse BFS
from the sources, and to try and generate only a single path from sources
to roots.

llvm-svn: 48286
2008-03-12 17:18:20 +00:00
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
Chris Lattner e4a6b18c2e secondary targets are gone, simplify this.
llvm-svn: 48067
2008-03-09 01:36:43 +00:00
Chris Lattner 22ad07ca07 simplify triple processing code now that there can be only one arch specified.
llvm-svn: 48066
2008-03-09 01:35:13 +00:00
Chris Lattner 1e178ea988 be more quiet when building headers.
llvm-svn: 48065
2008-03-09 01:29:23 +00:00
Chris Lattner a66222366e add some comments.
llvm-svn: 48053
2008-03-08 09:00:55 +00:00
Chris Lattner 1df278669d make float format handling more regular.
llvm-svn: 48052
2008-03-08 08:59:43 +00:00
Chris Lattner 7570e9c518 simplify all the type info accessors in TargeTInfo to return scalars,
which is simpler to use and provide.

llvm-svn: 48051
2008-03-08 08:52:55 +00:00
Chris Lattner 2dca6ff505 Fix a fixme by allowing pointers in different address spaces to have
different widths.  Start simplifying TargetInfo accessor methods.

llvm-svn: 48050
2008-03-08 08:34:58 +00:00
Chris Lattner c3a669ba63 eliminate the TargetInfoImpl stuff, simplifying the target implementations.
llvm-svn: 48049
2008-03-08 08:24:01 +00:00
Chris Lattner a0c0c35190 eliminate ComputeWCharInfo.
llvm-svn: 48048
2008-03-08 08:07:34 +00:00
Ted Kremenek 0440494b66 Increased worklist limit for GRSimpleVals.
llvm-svn: 48037
2008-03-07 22:59:32 +00:00
Ted Kremenek 2bdd77696e 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.

llvm-svn: 48036
2008-03-07 22:58:01 +00:00
Ted Kremenek 6947a79d6b Improved graph visualization of ExplodedGraphs to include source line and column
information.

llvm-svn: 48031
2008-03-07 20:57:30 +00:00
Ted Kremenek 910e9de131 Renamed ValueManager to BasicValueFactory.
llvm-svn: 48025
2008-03-07 20:13:31 +00:00
Nate Begeman be6bb8efac Add new test
llvm-svn: 48018
2008-03-07 20:04:49 +00:00
Nate Begeman 0a6192cfb8 Add fastcall/stdcall attribute support
Generate CallingConv::Fast when fastcall attribute is present

llvm-svn: 48017
2008-03-07 20:04:22 +00:00
Ted Kremenek 40bc74fde7 Refined divide-by-zero checking to distinguish between must and may
divide-by-zero errors.

llvm-svn: 48013
2008-03-07 19:04:53 +00:00
Ted Kremenek 7bdd630334 Patch by Nuno Lopes:
Added more comments for code processing attribute "format".
  Added more checks for corner cases, test cases, and warnings.

llvm-svn: 48011
2008-03-07 18:43:49 +00:00
Gabor Greif 3a8edd8536 fix typos
llvm-svn: 47995
2008-03-06 10:40:09 +00:00
Ted Kremenek f458289484 Fixed mismatched deallocation in GRBlockCounter::Factory::~Factory.
Reported by Zhongxing Xu!

llvm-svn: 47991
2008-03-06 08:09:22 +00:00
Chris Lattner 54ee63886e remove two obsolete tests, not sure why my previous commit didn't commit the removal.
llvm-svn: 47986
2008-03-06 05:47:17 +00:00
Ted Kremenek ea6507fe04 Added boilerplate to execute the CF reference count checker (which isn't yet implemented).
llvm-svn: 47982
2008-03-06 00:08:09 +00:00
Ted Kremenek 82d506de29 Added "CheckerState" field to ValueState.
llvm-svn: 47979
2008-03-05 23:32:23 +00:00
Ted Kremenek 4c38955dab Added transfer function support for __builtin_expect.
llvm-svn: 47971
2008-03-05 22:59:42 +00:00
Ted Kremenek 9743b3913f Small bug fix when handling CallExprs that generate sink nodes.
llvm-svn: 47970
2008-03-05 22:49:16 +00:00
Steve Naroff 93bcc7a6d2 Update vcproj files.
llvm-svn: 47967
2008-03-05 22:16:33 +00:00
Ted Kremenek 7034236366 Fixed bug that could case unwanted bifurcation of states when evaluating calls.
llvm-svn: 47964
2008-03-05 21:15:02 +00:00
Ted Kremenek 0c04606d1f Fixed bogus assumption mistakenly introduced in r47955.
llvm-svn: 47958
2008-03-05 19:26:46 +00:00
Ted Kremenek c156f1ffc6 Fixed a horribly insidious bit-masking bug in the implementation of
ExplodedNode that would occasionally result in heap corruption.

llvm-svn: 47956
2008-03-05 19:08:55 +00:00