Граф коммитов

4732 Коммитов

Автор SHA1 Сообщение Дата
Nuno Lopes 9039a69ab9 fix test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53802 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-19 22:11:43 +00:00
Ted Kremenek 17360d58e2 Updated latest checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53800 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-19 19:50:00 +00:00
Ted Kremenek 24af60f528 Patch by Kovarththanan Rajaratnam:
"When dumping the tokens (-dumptokens output type), the column numbers are not
correctly shown. This patch fixes that issue."


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53797 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-19 19:10:40 +00:00
Ted Kremenek 109949a5f5 Patch by
"When dumping the tokens (-dumptokens output type), the column numbers are not
correctly shown. This patch fixes that issue."



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53796 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-19 19:10:04 +00:00
Ted Kremenek fbeeca84dd Reimplement ccc-analyzer in a language I actually know, and implement some obvious optimizations when processing command line arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53783 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-19 06:11:04 +00:00
Ted Kremenek 2be1853a09 Remove typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53776 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-18 23:13:03 +00:00
Ted Kremenek a3ed36afa9 Quote invocation of clang in pipe to handle paths with spaces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53775 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-18 23:11:33 +00:00
Ted Kremenek c083b0dbdb Added test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53770 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-18 20:48:10 +00:00
Ted Kremenek 1bc90ad15d Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53769 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-18 20:22:22 +00:00
Ted Kremenek 1a80448f6f "currentHandler" is a nullary selector
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53763 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-18 18:14:26 +00:00
Ted Kremenek 2d1086cec0 Fix caching bug.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53759 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-18 17:39:56 +00:00
Ted Kremenek 70a733e64e Add panic support for NSAssertionHandler.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53758 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-18 17:24:20 +00:00
Daniel Dunbar c8aeb655c3 Prevent clang from emitting output when input has errors
+ test case
<rdar://problem/6080040>
http://llvm.org/bugs/show_bug.cgi?id=2280


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53756 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-18 16:38:05 +00:00
Ted Kremenek 7386d77217 Add panic function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53755 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-18 16:28:33 +00:00
Ted Kremenek 75b0a1ce3e Fix 80 col violation
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53754 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-18 15:59:33 +00:00
Ted Kremenek 40fc5c7e23 Fix regression by explicitly checking if we are negating a SymIntConstantVal.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53753 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-18 15:54:51 +00:00
Ted Kremenek 1e38f85dc0 Improve path-sensitivity when using the logical not operator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53752 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-18 15:46:06 +00:00
Ted Kremenek ad8329e58d Renamed deterministic EvalBinOp to DetermEvalBinOpNN. This name mangling is unfortunately needed because virtual methods with the same name can be hidden by subclasses.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53751 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-18 15:27:58 +00:00
Ted Kremenek 6297a8ec31 Created ValueStateSet class to manage the creation of multiple states by a method.
Modified the new EvalBinOpNN to generate states instead of nodes.  This is a much simpler interface and is what clients will want to do.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53750 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-18 05:53:58 +00:00
Ted Kremenek 4d9985ab39 Remove dead method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53748 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-18 04:55:41 +00:00
Mon P Wang 6c5df7f54f Add support shufpd
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53747 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-18 00:14:09 +00:00
Ted Kremenek 35912db2b1 Update signature of EvalAssume.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53745 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-17 23:33:10 +00:00
Ted Kremenek f2da7a06f6 Provide static methods in BinaryOperator to determine if an opcode is an equality opcode, a relational opcode, or a logical opcode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53744 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-17 23:24:36 +00:00
Ted Kremenek 729a9a276f Move GRTransferFunc* into ValueStateManager, and move the assumption logic there as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53743 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-17 23:15:45 +00:00
Ted Kremenek e597b19347 Added headers
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53742 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-17 22:41:39 +00:00
Ted Kremenek b48c6455dd Remove redundant logic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53740 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-17 21:36:43 +00:00
Ted Kremenek df7533b5e5 Begin major changes to EvalXXX methods in GRTransferFuncs. Currently some of the methods only return an RVal; we want them to be able to create an arbitrary number of states.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53739 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-17 21:27:31 +00:00
Daniel Dunbar 1f3846e301 Fix for codegen crash on multibit bool bitfield initialization
<rdar://problem/6078606>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53737 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-17 21:07:48 +00:00
Ted Kremenek f59bf48ee7 Moved RemoveDeadBindings logic for the contents of 'Store' to a virtual RemoveDeadBindings method in StoreManager.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53726 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-17 18:38:48 +00:00
Ted Kremenek f242218fb9 We now build universal binaries of the checker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53725 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-17 18:35:12 +00:00
Argyrios Kyrtzidis 90eb539bc3 Unify ctx_iterator/ctx_begin()/ctx_end() and iterator/begin()/end() so that a single iterator type is used for both traversing decls of the same declaration context *and* of the parent declaration contexts, depending on the value of the bool parameter 'LookInParentCtx' that is passed to IdentifierResolver::begin().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53724 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-17 17:49:50 +00:00
Steve Naroff f616ebb9b6 RewriteObjC::SynthMessageExpr(): Fix super rewrite (a fairly recent regression).
Fixes <rdar://problem/6046663> clang ObjC rewriter: Regression in handling of 'super' in latest build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53703 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-16 22:35:27 +00:00
Argyrios Kyrtzidis 0ff12f078c When in C++, make EnumConstant names hide tag names in the same scope, instead of colliding with them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53702 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-16 21:01:53 +00:00
Steve Naroff b2a39459f5 Remove a FIXME from RewriteObjC::RewriteObjCSynchronizedStmt().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53696 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-16 19:47:39 +00:00
Steve Naroff 59f05a48a7 RewriteObjC::Initialize(): add function decls used by @synchronized.
This fixes <rdar://problem/6040143> clang ObjC rewriter: @synchronized keyword inserts undeclared objc functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53695 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-16 18:58:11 +00:00
Steve Naroff 8f3b2654a9 Two fixes:
- Make sure ObjCIvarDecl propagates the bitfield width.
- RewriteObjC::SynthesizeIvarOffsetComputation(): Avoid using the __OFFSETOF__ mumbo jumbo for bitfields (since it isn't legal C). This fixes <rdar://problem/5986079> clang ObjC rewriter: bitfields and ivar access don't mix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53694 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-16 18:22:22 +00:00
Steve Naroff c9ba172447 RewriteObjC::RewriteObjCTryStmt():Don't synthesize a catch begin if there are 0 catch clauses.
This fixes <rdar://problem/5987211> clang ObjC rewriter: @try / @finally block produces unbalanced output.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53679 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-16 15:31:30 +00:00
Steve Naroff 76e429d781 Teach RewriteObjC::RewriteObjCMethodDecl() to deal with pointer to function return types.
This fixes <rdar://problem/6034961> clang ObjC rewriter: rewriting methods with function pointer return values does not work


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53678 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-16 14:40:40 +00:00
Argyrios Kyrtzidis b02ef242c7 When checking for name collision between a tag and a previously defined namespace, the collision occured even when the tag was in a different nested scope.
Fix it by taking into account the scope when checking for namespace-tag name collisions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53667 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-16 07:45:46 +00:00
Argyrios Kyrtzidis d7464be982 Add 'this' in the comments of Parser::ParseCastExpression to indicate that it is handled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53665 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-16 07:23:27 +00:00
Ted Kremenek 6271c5e01c Updated latest checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53664 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-16 02:39:15 +00:00
Ted Kremenek cd512dce55 Fix regression introduced by http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080714/006514.html.
The regression was the casts from integers to pointers where not being handled: they would just return UnknownVal.  This would greatly decrease path-sensitivity.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53659 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-16 00:23:49 +00:00
Ted Kremenek 9012599f4c Have scan-build control default analyses.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53654 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 23:41:32 +00:00
Ted Kremenek f496ee1710 Fix transfer function logic in GRSimpleVals for integer casts: only support casts from integers to integers.
This fixes a crash reported by Anders Carlsson!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53649 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 23:17:54 +00:00
Ted Kremenek ef42ca26ec Add -DIBOutlet=__attribute__((iboutlet)) to analyzer arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53648 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 23:09:14 +00:00
Ted Kremenek f4ebf42b06 For the MissingDealloc check, don't treat IBOutlet ivars as being needed to be released
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53647 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 23:04:27 +00:00
Ted Kremenek f1b4c42c49 Make iboutlet diagnostic lowercase
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53646 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 22:39:36 +00:00
Ted Kremenek f135e80b7b Use lowercase of attribute iboutlet to not conflict with the macro IBOutlet
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53645 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 22:38:34 +00:00
Ted Kremenek 96329d4e07 Added parsing/sema support for __attribute__ ((IBOutlet)), a clang-specific attribute that the static analyzer will use to recognize what ivars are IBOutlets.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53644 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 22:26:48 +00:00
Ted Kremenek 363dc3f40f Added --status-bugs option to scan-build. By default, the exit status of
scan-build is the same as the exit status of the executed build command. With
this option, the exit status of scan-build is 1 if the analyzer flagged any
bugs, and 0 otherwise.

This addresses: <rdar://problem/6075320>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53642 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 22:03:09 +00:00