Ted Kremenek
6f2c46a275
Update checker build.
...
llvm-svn: 53769
2008-07-18 20:22:22 +00:00
Ted Kremenek
f41b1c45fa
"currentHandler" is a nullary selector
...
llvm-svn: 53763
2008-07-18 18:14:26 +00:00
Ted Kremenek
f7faa42c6c
Fix caching bug.
...
llvm-svn: 53759
2008-07-18 17:39:56 +00:00
Ted Kremenek
3b2294c7e6
Add panic support for NSAssertionHandler.
...
llvm-svn: 53758
2008-07-18 17:24:20 +00:00
Daniel Dunbar
155ed24359
Prevent clang from emitting output when input has errors
...
+ test case
<rdar://problem/6080040>
http://llvm.org/bugs/show_bug.cgi?id=2280
llvm-svn: 53756
2008-07-18 16:38:05 +00:00
Ted Kremenek
d785465167
Add panic function.
...
llvm-svn: 53755
2008-07-18 16:28:33 +00:00
Ted Kremenek
36f6b04295
Fix 80 col violation
...
llvm-svn: 53754
2008-07-18 15:59:33 +00:00
Ted Kremenek
b1c91bfc45
Fix regression by explicitly checking if we are negating a SymIntConstantVal.
...
llvm-svn: 53753
2008-07-18 15:54:51 +00:00
Ted Kremenek
6a62d908c3
Improve path-sensitivity when using the logical not operator.
...
llvm-svn: 53752
2008-07-18 15:46:06 +00:00
Ted Kremenek
91614e6fe6
Renamed deterministic EvalBinOp to DetermEvalBinOpNN. This name mangling is unfortunately needed because virtual methods with the same name can be hidden by subclasses.
...
llvm-svn: 53751
2008-07-18 15:27:58 +00:00
Ted Kremenek
8d6b42e096
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.
llvm-svn: 53750
2008-07-18 05:53:58 +00:00
Ted Kremenek
072429320a
Remove dead method.
...
llvm-svn: 53748
2008-07-18 04:55:41 +00:00
Mon P Wang
194c58f56d
Add support shufpd
...
llvm-svn: 53747
2008-07-18 00:14:09 +00:00
Ted Kremenek
e330aacbed
Update signature of EvalAssume.
...
llvm-svn: 53745
2008-07-17 23:33:10 +00:00
Ted Kremenek
2fe3afca04
Provide static methods in BinaryOperator to determine if an opcode is an equality opcode, a relational opcode, or a logical opcode.
...
llvm-svn: 53744
2008-07-17 23:24:36 +00:00
Ted Kremenek
9c32a1ecf5
Move GRTransferFunc* into ValueStateManager, and move the assumption logic there as well.
...
llvm-svn: 53743
2008-07-17 23:15:45 +00:00
Ted Kremenek
9976888190
Added headers
...
llvm-svn: 53742
2008-07-17 22:41:39 +00:00
Ted Kremenek
a79d9a9c79
Remove redundant logic.
...
llvm-svn: 53740
2008-07-17 21:36:43 +00:00
Ted Kremenek
bc9118b165
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.
...
llvm-svn: 53739
2008-07-17 21:27:31 +00:00
Daniel Dunbar
1f32c759dc
Fix for codegen crash on multibit bool bitfield initialization
...
<rdar://problem/6078606>
llvm-svn: 53737
2008-07-17 21:07:48 +00:00
Ted Kremenek
88a6b7fa80
Moved RemoveDeadBindings logic for the contents of 'Store' to a virtual RemoveDeadBindings method in StoreManager.
...
llvm-svn: 53726
2008-07-17 18:38:48 +00:00
Ted Kremenek
9ace803308
We now build universal binaries of the checker.
...
llvm-svn: 53725
2008-07-17 18:35:12 +00:00
Argyrios Kyrtzidis
ef34aed1f9
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().
...
llvm-svn: 53724
2008-07-17 17:49:50 +00:00
Steve Naroff
97adf60418
RewriteObjC::SynthMessageExpr(): Fix super rewrite (a fairly recent regression).
...
Fixes <rdar://problem/6046663> clang ObjC rewriter: Regression in handling of 'super' in latest build.
llvm-svn: 53703
2008-07-16 22:35:27 +00:00
Argyrios Kyrtzidis
bd25998a45
When in C++, make EnumConstant names hide tag names in the same scope, instead of colliding with them.
...
llvm-svn: 53702
2008-07-16 21:01:53 +00:00
Steve Naroff
d7ebc05476
Remove a FIXME from RewriteObjC::RewriteObjCSynchronizedStmt().
...
llvm-svn: 53696
2008-07-16 19:47:39 +00:00
Steve Naroff
8dd1525b9a
RewriteObjC::Initialize(): add function decls used by @synchronized.
...
This fixes <rdar://problem/6040143> clang ObjC rewriter: @synchronized keyword inserts undeclared objc functions.
llvm-svn: 53695
2008-07-16 18:58:11 +00:00
Steve Naroff
de7d0f69ba
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.
llvm-svn: 53694
2008-07-16 18:22:22 +00:00
Steve Naroff
ce2dca186b
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.
llvm-svn: 53679
2008-07-16 15:31:30 +00:00
Steve Naroff
b067bbd019
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
llvm-svn: 53678
2008-07-16 14:40:40 +00:00
Argyrios Kyrtzidis
7da34d050b
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.
llvm-svn: 53667
2008-07-16 07:45:46 +00:00
Argyrios Kyrtzidis
16c04102ed
Add 'this' in the comments of Parser::ParseCastExpression to indicate that it is handled.
...
llvm-svn: 53665
2008-07-16 07:23:27 +00:00
Ted Kremenek
de3725367b
Updated latest checker build.
...
llvm-svn: 53664
2008-07-16 02:39:15 +00:00
Ted Kremenek
ae543148bc
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.
llvm-svn: 53659
2008-07-16 00:23:49 +00:00
Ted Kremenek
803d9ef9d6
Have scan-build control default analyses.
...
llvm-svn: 53654
2008-07-15 23:41:32 +00:00
Ted Kremenek
f46dddac5b
Fix transfer function logic in GRSimpleVals for integer casts: only support casts from integers to integers.
...
This fixes a crash reported by Anders Carlsson!
llvm-svn: 53649
2008-07-15 23:17:54 +00:00
Ted Kremenek
3be3401303
Add -DIBOutlet=__attribute__((iboutlet)) to analyzer arguments.
...
llvm-svn: 53648
2008-07-15 23:09:14 +00:00
Ted Kremenek
ed1f72b67c
For the MissingDealloc check, don't treat IBOutlet ivars as being needed to be released
...
llvm-svn: 53647
2008-07-15 23:04:27 +00:00
Ted Kremenek
72da4ff4f3
Make iboutlet diagnostic lowercase
...
llvm-svn: 53646
2008-07-15 22:39:36 +00:00
Ted Kremenek
10c8d7653b
Use lowercase of attribute iboutlet to not conflict with the macro IBOutlet
...
llvm-svn: 53645
2008-07-15 22:38:34 +00:00
Ted Kremenek
8e3704d35a
Added parsing/sema support for __attribute__ ((IBOutlet)), a clang-specific attribute that the static analyzer will use to recognize what ivars are IBOutlets.
...
llvm-svn: 53644
2008-07-15 22:26:48 +00:00
Ted Kremenek
3879c5f6e4
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>
llvm-svn: 53642
2008-07-15 22:03:09 +00:00
Ted Kremenek
48ea92965b
Per Sam Bishop's excellent suggestion, use "system" instead of backticks to invoke sub-commands used by scan-build. This avoids meta-character translation issues caused by a shell subprocess.
...
llvm-svn: 53640
2008-07-15 20:18:21 +00:00
Ted Kremenek
c7cd410657
Quote file names to better handle paths with spaces.
...
llvm-svn: 53635
2008-07-15 18:28:16 +00:00
Ted Kremenek
28762a5e49
Incremented latest checker build.
...
llvm-svn: 53631
2008-07-15 18:15:51 +00:00
Ted Kremenek
81bfc074c9
Distinguish between dead stores and dead initializations.
...
llvm-svn: 53628
2008-07-15 18:06:32 +00:00
Ted Kremenek
176e2c519d
isRetain() and isRelease() now only returns true if "Retain"/"Release" appears in the suffix of a function's name.
...
llvm-svn: 53621
2008-07-15 17:43:41 +00:00
Ted Kremenek
78e9c0d697
scan-build now propagates up the exit status of the build command.
...
llvm-svn: 53620
2008-07-15 17:09:28 +00:00
Ted Kremenek
e5165722ed
Do not enable -warn-objc-missing-dealloc by default.
...
llvm-svn: 53619
2008-07-15 17:06:44 +00:00
Ted Kremenek
3a787bf977
scan-build now interrogates clang for a list of available analyses, and presents
...
these as options to the user of scan-build.
llvm-svn: 53618
2008-07-15 17:06:13 +00:00
Ted Kremenek
fa89e2f09c
Support retain/release tracking for CoreGraphics (CGxxxRef) objects.
...
llvm-svn: 53617
2008-07-15 16:50:12 +00:00
Ted Kremenek
41aeef5205
Update radar component to file static analyzer bugs against.
...
llvm-svn: 53589
2008-07-15 03:51:09 +00:00
Ted Kremenek
9731a97220
Removed disclaimer about checker-36, which is old news.
...
llvm-svn: 53588
2008-07-15 03:49:15 +00:00
Ted Kremenek
fd7efdf20d
Provide an "Analysis Scope" for Analyses so checks can either be run on code declarations (bodies) or Objective-C @implementation blocks.
...
llvm-svn: 53584
2008-07-15 00:46:02 +00:00
Ted Kremenek
5470e0c7e1
Re-enable missing -dealloc check.
...
llvm-svn: 53578
2008-07-14 23:56:31 +00:00
Ted Kremenek
70fe0ca126
Update Xcode project.
...
llvm-svn: 53577
2008-07-14 23:42:26 +00:00
Ted Kremenek
2fa70832e4
Using new clang option to invoke the type-signature check of Objective-C instance methods.
...
llvm-svn: 53576
2008-07-14 23:41:49 +00:00
Ted Kremenek
3063b73773
Break off declaration of Analysis enum into Analyses.def. The driver options in
...
clang.cpp now #include these definitions to create the command line options, and
AnalysisConsumer #includes this file to generate the switch statement to create
actions.
Renamed -check-objc-methodsigs to -warn-objc-methodsigs.
The "missing -dealloc" check is now optional: -warn-objc-missing-dealloc
llvm-svn: 53575
2008-07-14 23:41:13 +00:00
Ted Kremenek
c18255d80f
Refactor Dead Stores error reporting to use the simplified BugReporter::EmitBasicReport interface.
...
llvm-svn: 53573
2008-07-14 20:56:04 +00:00
Nate Begeman
191a6b1f1b
http://llvm.org/bugs/show_bug.cgi?id=2523
...
Add some code to handle vector comparisons, which is the language side
of the llvm vicmp/vfcmp instructions. Also make the vector-vector and
vector-scalar asign checks a bit more sane under the presence of lax vector
conversions.
llvm-svn: 53565
2008-07-14 18:02:46 +00:00
Ted Kremenek
0255531dd3
Added method "EmitBasicReport" to BugReporter to simplify the emission of simple bug diagnostics.
...
Refactored error reporting in CheckObjCDealloc and CheckObjCInstMethSignature to use this new bug reporting interface (major code simplification).
llvm-svn: 53560
2008-07-14 17:40:50 +00:00
Chris Lattner
6d1a3c2e2b
remove CGObjCEtoile until it compiles.
...
llvm-svn: 53552
2008-07-14 16:54:05 +00:00
Ted Kremenek
a696ca66e9
Fix minor mistake in clang checkout instructions.
...
llvm-svn: 53550
2008-07-14 14:40:22 +00:00
Cedric Venet
455298f2d6
test commit. Remove previously added line.
...
llvm-svn: 53524
2008-07-13 19:42:06 +00:00
Cedric Venet
1e43f55933
test commit. Add a blank line.
...
llvm-svn: 53522
2008-07-13 19:34:37 +00:00
Argyrios Kyrtzidis
07b8b63f9f
Use of NextToken() makes ParseIdentifierStatement unnecessary.
...
Simplify the parser by removing Parser::ParseIdentifierStatement.
llvm-svn: 53520
2008-07-12 21:04:42 +00:00
Argyrios Kyrtzidis
715eabcef5
Convert CRLF -> LF line endings.
...
llvm-svn: 53519
2008-07-12 20:28:04 +00:00
Cedric Venet
71262487c3
Added two new files to VC++ project.
...
llvm-svn: 53518
2008-07-12 19:24:14 +00:00
Chris Lattner
477c4be1e9
expand casts to handle what isIntegerConstantExpr handles.
...
Casts from pointers remain a problem. :)
llvm-svn: 53501
2008-07-12 01:15:53 +00:00
Chris Lattner
7174bf3722
Add support for __builtin_type_compatible_p, enums, etc.
...
llvm-svn: 53500
2008-07-12 00:38:25 +00:00
Chris Lattner
9941570ce9
start remembering diagnostics for various cases, add some missing
...
code. Switch to Eli's getIntWidth method.
llvm-svn: 53499
2008-07-12 00:14:42 +00:00
Ted Kremenek
20704a0ce8
Updated latest checker build. This build includes the new check for type-compatibility of the return types of ObjC methods.
...
llvm-svn: 53496
2008-07-11 23:29:43 +00:00
Ted Kremenek
e5b5953672
Tidy up error message.
...
llvm-svn: 53493
2008-07-11 23:17:01 +00:00
Ted Kremenek
ba1196298a
Add CSS for word wrapping of long message bubbles.
...
llvm-svn: 53492
2008-07-11 23:13:22 +00:00
Chris Lattner
cdf34e7668
Provide a structure for passing down 'is evaluated' and passing up
...
diagnosic+loc info for i-c-e evaluation.
llvm-svn: 53490
2008-07-11 22:52:41 +00:00
Ted Kremenek
dfc7b3d329
Update Xcode project.
...
llvm-svn: 53488
2008-07-11 22:48:58 +00:00
Ted Kremenek
afe2c0be34
Run by default: -check-objc-methodsigs
...
llvm-svn: 53483
2008-07-11 22:41:43 +00:00
Ted Kremenek
3bfb314c25
Add new check: -check-objc-methodsigs. This check scans methods in
...
ObjCImplementationDecls and sees if a ancestor class defines a method with the
same selector but with a different type signature. Right now it just compares
return types, and mainly looks at differences in primitive values. The checking
will be expanded in the future.
llvm-svn: 53482
2008-07-11 22:40:47 +00:00
Chris Lattner
f09ad16cfc
simplify some code a bit.
...
llvm-svn: 53477
2008-07-11 22:15:16 +00:00
Chris Lattner
f8d7f72956
share code between sizeof(expr) and sizeof(type)
...
llvm-svn: 53475
2008-07-11 21:24:13 +00:00
Ted Kremenek
aced3ad4b8
Fix comment.
...
llvm-svn: 53473
2008-07-11 20:53:14 +00:00
Chris Lattner
b062dcc17b
implement support for __extension__, make sure the result of a
...
comparison has the right width.
llvm-svn: 53469
2008-07-11 19:29:32 +00:00
Chris Lattner
ae8cc15977
add a new getIntTypeSizeInBits method.
...
llvm-svn: 53468
2008-07-11 19:24:49 +00:00
Chris Lattner
2bd2e028ca
rename "SInt" methods to "Int" in APValue.
...
llvm-svn: 53467
2008-07-11 19:19:21 +00:00
Ted Kremenek
36f8212299
scan-build now also prints the HTML directory reports were emitted to at the end of the build.
...
llvm-svn: 53466
2008-07-11 19:15:05 +00:00
Chris Lattner
e13042c04f
make the new evaluator avoid conversions APValue<->APSInt in some cases.
...
Add some accessors to APValue.
llvm-svn: 53465
2008-07-11 19:10:17 +00:00
Ted Kremenek
c50e1a196e
Refactored auditor interface within GRExprEngine and GRCoreEngine to use a "batch auditor" to dispatch to specialized auditors instead of having a separate vector for each audited Expr*. This not only provides a much cleaner implementation, but also allows us to install auditors for any expression.
...
llvm-svn: 53464
2008-07-11 18:37:32 +00:00
Chris Lattner
05706e8859
rearrange some code, no functionality changes.
...
llvm-svn: 53463
2008-07-11 18:11:29 +00:00
Ted Kremenek
252d03c598
Patch by Csaba Hruska and Peter Neumark:
...
"adds support (de)serialization (from)to (in memory) buffer."
llvm-svn: 53425
2008-07-10 22:10:48 +00:00
Ted Kremenek
c78ce1840a
Updated Xcode project.
...
llvm-svn: 53424
2008-07-10 22:04:37 +00:00
Ted Kremenek
a7b8ffb05b
Refactored most of the "Store" piece of ValueState into a Store type. The
...
current store implementation is now encapsulated by BasicStore.
These changes prompted some long due constification of ValueState. Much of the
diffs in this patch include adding "const" qualifiers.
llvm-svn: 53423
2008-07-10 22:03:41 +00:00
Ted Kremenek
976d1e0ea8
Remove unused class AnnotatedPath.
...
llvm-svn: 53413
2008-07-10 17:25:03 +00:00
Ted Kremenek
ad4a7e4a69
Move some environment methods from ValueState/ValueStateManager to Environment/EnvironmentManager.
...
llvm-svn: 53412
2008-07-10 17:19:18 +00:00
Chris Lattner
cfba0fade8
Add a new distcc status page, which is currently empty and not
...
linked from anywhere. It will be linked when content is filled in.
Page by Csaba Hruska!
llvm-svn: 53392
2008-07-10 05:32:43 +00:00
Chris Lattner
a580a92508
Add an accessor, patch by Csaba Hruska.
...
llvm-svn: 53391
2008-07-10 05:26:30 +00:00
Argyrios Kyrtzidis
832e898803
Simplify the parser a bit by looking at the next token without consuming it (by Preprocessor::LookNext):
...
-Remove ParseExpressionWithLeadingIdentifier and ParseAssignmentExprWithLeadingIdentifier.
-Separate ParseLabeledStatement from ParseIdentifierStatement.
llvm-svn: 53376
2008-07-09 22:53:07 +00:00
Argyrios Kyrtzidis
80b77ac394
Add Preprocessor::LookNext method, which implements an efficient way to 'take a peek' at the next token without consuming it.
...
llvm-svn: 53375
2008-07-09 22:46:46 +00:00
Ted Kremenek
a3f878dcab
More information on filing bug reports.
...
llvm-svn: 53373
2008-07-09 22:20:56 +00:00
Ted Kremenek
5f996d5a06
Remove getParentMap() from GRExprEngine.
...
llvm-svn: 53343
2008-07-09 19:46:42 +00:00
Ted Kremenek
bf98eed4ef
Updated checker build.
...
llvm-svn: 53339
2008-07-09 18:26:32 +00:00