Ted Kremenek
2a56b23c3a
Make "View Report" just a normal link again.
...
llvm-svn: 56442
2008-09-22 17:39:18 +00:00
Ted Kremenek
a026fd3c01
Don't print out the path length.
...
llvm-svn: 56441
2008-09-22 17:38:23 +00:00
Ted Kremenek
b76a3f44ec
Output "REPORTHEADER" and "REPORTSUMMARYEXTRA" tags for use with scan-view.
...
llvm-svn: 56440
2008-09-22 17:33:32 +00:00
Nuno Lopes
47e46ed3da
not executable
...
llvm-svn: 56439
2008-09-22 17:26:14 +00:00
Steve Naroff
25709eca44
Remove unused slot/reference and update Sema::ActOnIdentifierExpr().
...
llvm-svn: 56438
2008-09-22 15:31:56 +00:00
Steve Naroff
cd5e782bce
Fix http://llvm.org/bugs/show_bug.cgi?id=2816 .
...
llvm-svn: 56433
2008-09-22 10:28:57 +00:00
Ted Kremenek
a3fe93b688
Use scan-view to view reports. Opening index.html is deprecated.
...
llvm-svn: 56431
2008-09-22 06:47:01 +00:00
Ted Kremenek
dd186c638e
Updated checker build
...
llvm-svn: 56430
2008-09-22 06:11:08 +00:00
Daniel Dunbar
ed4e3210da
scan-view: Add links from bug reporting forms to report & summary pages.
...
llvm-svn: 56427
2008-09-22 03:08:32 +00:00
Daniel Dunbar
2ef3142b92
scan-view: Search for available port if default is unavailable.
...
llvm-svn: 56426
2008-09-22 02:53:12 +00:00
Daniel Dunbar
34525a91fa
scan-view: Store bug reporter defaults in ~/.scanview.cfg
...
llvm-svn: 56424
2008-09-22 02:27:45 +00:00
Daniel Dunbar
4aed7dede7
scan-view tweak
...
- Require index.html in provided results directory.
llvm-svn: 56423
2008-09-22 01:42:08 +00:00
Daniel Dunbar
8d139d3d40
scan-view tweaks
...
- Use more correct HTTP error codes on (unexpected) errors.
- Use onLoad to set ensure bug submission method gets set correctly.
llvm-svn: 56422
2008-09-22 01:40:14 +00:00
Ted Kremenek
d01c408b71
Patch from Richard Godbee:
...
Improve scan-build results to include the user's host name, the working
directory of the analyzed project, and the date the analysis run took place.
llvm-svn: 56421
2008-09-22 01:35:58 +00:00
Daniel Dunbar
553fdc6bc7
Improve scan-view report bug (submitted) interface.
...
Give more meaningful error messages / fail gracefully on bad form
input or SMTP errors.
Use button for Report Bug link (where available).
llvm-svn: 56420
2008-09-22 01:21:30 +00:00
Daniel Dunbar
49351e7eb9
Improve scan-view report bug interface.
...
- Pulled css out into Resources/scanview.css
llvm-svn: 56416
2008-09-22 00:11:51 +00:00
Daniel Dunbar
19af4ea47b
scan-view tweaks:
...
- Add simple favicon
- Allow resolving source file paths (should be rethought)
llvm-svn: 56414
2008-09-21 23:02:25 +00:00
Daniel Dunbar
daa26f879e
scan-view tweaks:
...
- Update for scan-build table change.
- Add --auto-reload option (for development, avoids need to restart
server).
- Always send Last-Modified, with a reasonable value for dynamic content.
llvm-svn: 56409
2008-09-21 20:34:58 +00:00
Ted Kremenek
0b7ae724a7
Add webkit styles using Javascript (detect for AppleWebKit)
...
llvm-svn: 56408
2008-09-21 20:10:46 +00:00
Ted Kremenek
23432d4c7b
Unbreak using abs_path.
...
llvm-svn: 56407
2008-09-21 19:56:14 +00:00
Daniel Dunbar
b9c42108d9
scan-view: Add more information to default bug description and use
...
iframe to embed bug view (for easy reference).
llvm-svn: 56406
2008-09-21 19:08:54 +00:00
Ted Kremenek
76f79ba890
Change casing of bug type.
...
llvm-svn: 56405
2008-09-21 19:08:31 +00:00
Daniel Dunbar
a00b7a8240
Don't add Bugzilla reporter (not yet implemented)
...
llvm-svn: 56404
2008-09-21 19:06:51 +00:00
Ted Kremenek
638e280c32
The checks in BasicObjCFoundationChecks now have a category: "API Misuse (Apple)"
...
llvm-svn: 56403
2008-09-21 19:01:39 +00:00
Ted Kremenek
ba9781dcfc
The "unused ivar" check now has a category: "Optimization"
...
llvm-svn: 56402
2008-09-21 18:58:22 +00:00
Ted Kremenek
1b6997ed5e
Built-in checks now have a category: "Logic Errors"
...
llvm-svn: 56401
2008-09-21 18:57:28 +00:00
Ted Kremenek
80b2b16540
Added experimental "intelligent-sizing" of HTML message bubbles based on the contents of the message.
...
llvm-svn: 56400
2008-09-21 18:52:59 +00:00
Ted Kremenek
9eca6af2f2
Remove debugging message.
...
llvm-svn: 56398
2008-09-21 18:26:58 +00:00
Ted Kremenek
ca8ac081af
Unbreak ccc-analyzer: getcwd is from package Cwd
...
llvm-svn: 56397
2008-09-21 18:26:19 +00:00
Ted Kremenek
32c1181468
Patch by Richard Godbee:
...
Output to .info files the absolute paths to files that were rejected by the
parser or crashed the analyzer.
llvm-svn: 56396
2008-09-21 18:04:49 +00:00
Ted Kremenek
172f04dfe6
scan-build now prints out bug categories.
...
llvm-svn: 56395
2008-09-21 06:58:09 +00:00
Ted Kremenek
33663885c3
Add a bug category for NSError** checks.
...
llvm-svn: 56394
2008-09-21 06:57:40 +00:00
Ted Kremenek
ebb4245b84
Have ScanView.py generate a "<td></td>" pair in the output HTML instead of having scan-build output an empty (and possibly unused) <td>.
...
llvm-svn: 56393
2008-09-21 03:55:51 +00:00
Cedric Venet
b074a21b08
Update VS projects.
...
llvm-svn: 56390
2008-09-20 18:03:16 +00:00
Ted Kremenek
de195e2100
Add "category" to BugTypes, allowing bugs to be grouped.
...
Changed casing of many bug names. The convention will be to have bug names (mostly) lower cased, and categories use some capitalization.
llvm-svn: 56385
2008-09-20 04:23:38 +00:00
Ted Kremenek
bc15d8539d
Add PostStore, a new ProgramPoint to distinguish between 'stores' and other PostStmts.
...
GRExprEngine:
Use PostStore in EvalStore.
Use a second version of EvalStore in EvalBinaryOperator to associate the store with the expression on the LHS.
llvm-svn: 56383
2008-09-20 01:50:34 +00:00
Daniel Dunbar
025b48dd6e
Make scan-view more robust / friendly when bug reporting fails.
...
llvm-svn: 56382
2008-09-20 01:43:16 +00:00
Daniel Dunbar
d4c2337ef5
Add initial implementation of scan-view
...
- Web based interface to static analyzer.
llvm-svn: 56375
2008-09-19 23:32:11 +00:00
Daniel Dunbar
669632bf9a
Add REPORTBUG marker to scan-build.
...
llvm-svn: 56373
2008-09-19 23:18:44 +00:00
Ted Kremenek
8cdc71859c
Test case for transfer function logic of const casts.
...
llvm-svn: 56369
2008-09-19 20:53:52 +00:00
Ted Kremenek
31a15f8ba2
Bug fix: for the base transfer function logic for casts, handle const casts as just propagating the value.
...
llvm-svn: 56368
2008-09-19 20:51:22 +00:00
Ted Kremenek
37202acdff
Update checker build
...
llvm-svn: 56367
2008-09-19 20:20:09 +00:00
Ted Kremenek
34bfd8a490
Fixed logic error in BasicConstraintManager pointed out by Zhongxing Xu.
...
For checking if a symbol >= value, we need to check if symbol == value || symbol
> value. When checking symbol > value and we know that symbol != value, the path
is infeasible only if value == maximum integer.
For checking if a symbol <= value, we need to check if symbol == value || symbol
< value. When checking symbol < value and we know that symbol != value, the path
is infeasible only if value == minimum integer.
Updated test case exercising this logic: we only prune paths if the values are
unsigned.
llvm-svn: 56354
2008-09-19 18:00:36 +00:00
Chris Lattner
a7b034463e
Fix rdar://6222856: the receiver of a message expr is an
...
arbitrary expr, not just a assign expr. The grammar comment
was right, the code was just wrong.
llvm-svn: 56353
2008-09-19 17:44:00 +00:00
Ted Kremenek
a5bf9cb4be
When we have a binary expression 'int operator symbol', properly rewrite this as
...
'symbol operator-reverse int'. This patch is a combination of code from
Zhongxing Xu and myself (Zhongxing noticed this bug for the cases of
relational operators).
llvm-svn: 56351
2008-09-19 17:31:13 +00:00
Zhongxing Xu
a8e88ecda6
Add an omitted case for AssumeSymInt.
...
llvm-svn: 56334
2008-09-19 06:07:59 +00:00
Ted Kremenek
9a7e2efec0
Updated checker build.
...
llvm-svn: 56333
2008-09-19 05:14:13 +00:00
Ted Kremenek
55bec4d511
Added test case for PR 2600: proper use of NSError**
...
llvm-svn: 56332
2008-09-19 04:56:32 +00:00
Ted Kremenek
a417c0e80a
Add panic function "__assert_fail".
...
llvm-svn: 56327
2008-09-19 02:30:47 +00:00
Ted Kremenek
6a1a334b6c
Register the implicit null-dereferenced object as a notable symbol.
...
llvm-svn: 56319
2008-09-18 23:23:19 +00:00
Ted Kremenek
b42f482c91
Implement second part of PR 2600: NSError** parameter may be null, and should be checked before being dereferenced.
...
llvm-svn: 56318
2008-09-18 23:09:54 +00:00
Ted Kremenek
c38b3fbc4c
Update Xcode project.
...
llvm-svn: 56317
2008-09-18 23:08:24 +00:00
Ted Kremenek
6633871cb3
Analysis option -warn-objc-nserror-methods is no longer available. (check is done automatically with -checker-cfref)
...
llvm-svn: 56313
2008-09-18 21:25:58 +00:00
Ted Kremenek
f0673e4eb6
Change implementation of NSError** coding-style check to be invoked at the end of the retain/release analysis.
...
llvm-svn: 56312
2008-09-18 21:25:13 +00:00
Steve Naroff
3405a73ab8
Finish pushing blocks attribute through the clang attribute machinery.
...
Also added a couple simple tests from the "gcc.apple" test suite.
llvm-svn: 56309
2008-09-18 16:44:58 +00:00
Steve Naroff
9779e92fa4
Add driver support for invoking block rewriter.
...
Also tweaked the create function to take an explicit output file.
llvm-svn: 56305
2008-09-18 14:10:13 +00:00
Ted Kremenek
be061e2a19
Enable '-warn-objc-nserror-methods' by default.
...
llvm-svn: 56298
2008-09-18 06:34:16 +00:00
Ted Kremenek
fc3abeb1e5
Implemented one of the checks requested in PR 2600:
...
"Method accepting NSError** argument should have non-void return value to indicate that an error occurred."
Test case written, but the header needs to be delta-debugged reduced. Will commit shortly.
llvm-svn: 56297
2008-09-18 06:33:41 +00:00
Ted Kremenek
137fc0ea01
Added CFNumberCreate test case to illustrate a 32-bit/64-bit arch issue.
...
llvm-svn: 56295
2008-09-18 00:28:23 +00:00
Ted Kremenek
24bef31597
Add path-sensitivity test case.
...
llvm-svn: 56294
2008-09-17 22:24:13 +00:00
Daniel Dunbar
86d97c7985
Improve x86 ABI compatibility.
...
- Enables use of ABIArgInfo::Expand when needed. This greatly
improves our x86 ABI compatibility.
- As the infrastructure for target specific ABI handling isn't built
yet, this change means ABI compatibility on other platforms is once
again broken in a different way than before.
- Upcoming: Figure out how to refactor ABI handling into
targets. More documentation.
llvm-svn: 56293
2008-09-17 21:22:33 +00:00
Daniel Dunbar
d9d1f5f522
Print current function on verification failures.
...
llvm-svn: 56291
2008-09-17 21:13:22 +00:00
Daniel Dunbar
d34d6dc458
Drop CodeGenTypes parameter to classifyArgumentType.
...
Ensure that ABIArgInfo::Default implementation for aggregrate types
is sensible (StructRet on return and ByVal on arguments).
No functionality change.
llvm-svn: 56289
2008-09-17 20:11:04 +00:00
Steve Naroff
43bafa78b3
Remove BlockStmtExpr.
...
Block literals are now represented by the concrete BlockExpr class.
This is cleanup (removes a FIXME).
No functionality change.
llvm-svn: 56288
2008-09-17 18:37:59 +00:00
Daniel Dunbar
6ff95305e6
Another attempt to make test/Makefile return correct error code.
...
llvm-svn: 56285
2008-09-17 18:08:07 +00:00
Steve Naroff
a5629376e8
Fix http://llvm.org/bugs/show_bug.cgi?id=2760 .
...
llvm-svn: 56280
2008-09-17 14:05:40 +00:00
Ted Kremenek
45a928b956
Updated checker build.
...
llvm-svn: 56274
2008-09-17 04:22:09 +00:00
Zhongxing Xu
7b7394c8ec
Fix comment typo.
...
llvm-svn: 56271
2008-09-17 02:35:50 +00:00
Daniel Dunbar
8fc81b02e2
Add support for ABIArgInfo::Expand
...
- No functionality change.
llvm-svn: 56269
2008-09-17 00:51:38 +00:00
Steve Naroff
2da868e9c2
Add support for rewriting blocks...
...
llvm-svn: 56266
2008-09-17 00:13:27 +00:00
Daniel Dunbar
86169d6d0d
Ignore XFAIL tests when checking for make failure in test/
...
llvm-svn: 56262
2008-09-16 23:43:13 +00:00
Ted Kremenek
025f83534c
Fix copy-paste error in test case.
...
llvm-svn: 56261
2008-09-16 23:25:28 +00:00
Ted Kremenek
8782716c4a
Minor pass-sensitivity improvement:
...
if we know that 'len != 0' and know that 'i == 0' then we know that
'i < len' must evaluate to true and cannot evaluate to false
llvm-svn: 56260
2008-09-16 23:24:45 +00:00
Ted Kremenek
2b4b3b13a9
Update Xcode project.
...
llvm-svn: 56259
2008-09-16 23:21:45 +00:00
Steve Naroff
7a147c6a3c
Remove support for BlockExprExpr. For example...
...
^(expression) or ^(int arg1, float arg2)(expression)
...is no longer supported.
All block literals now require a compound statement.
llvm-svn: 56257
2008-09-16 23:11:46 +00:00
Steve Naroff
3b1e172d7e
Sema::ActOnBlockReturnStmt(): Need to perform the UsualUnaryConversions on the return type.
...
Sema::CheckReturnStackAddr(): Make sure we skip over implicit casts.
Added some more test cases...
llvm-svn: 56254
2008-09-16 22:25:10 +00:00
Ted Kremenek
0ecb53a421
ProgramPoint now takes the space of two pointers instead of one. This change was
...
motivated because it became clear that the number of subclasses of ProgramPoint
would expand and we ran out of bits to represent a pointer variant. As a plus of
this change, BlockEdge program points can now be represented explicitly without
using a cache of CFGBlock* pairs in CFG.
llvm-svn: 56245
2008-09-16 18:44:52 +00:00
Zhongxing Xu
5912c6e6f0
Fixed an offset calculation error.
...
llvm-svn: 56242
2008-09-16 07:58:21 +00:00
Ted Kremenek
2d470fc0ba
Patch by Csaba Hruska!
...
"Here is a patch what replaces std::ostream with llvm::raw_ostream. This patch
covers the AST library, but ignores Analysis lib."
llvm-svn: 56185
2008-09-13 05:16:45 +00:00
Ted Kremenek
5f09b1dece
Updated checker build.
...
llvm-svn: 56177
2008-09-13 00:23:41 +00:00
Ted Kremenek
907921f753
Include links to stderr output of clang in the table of files that clang rejects.
...
llvm-svn: 56173
2008-09-12 22:49:36 +00:00
Daniel Dunbar
2880158a20
Add ccc support for -e and -sectorder.
...
- llvmc2, save me!
llvm-svn: 56169
2008-09-12 19:42:28 +00:00
Daniel Dunbar
da41a14ce0
Round out object size checking builtins (fprintf ones disabled as we
...
have no mapping to FILE*). We are also missing printf format
attributes for the printf style ones.
llvm-svn: 56168
2008-09-12 18:39:42 +00:00
Daniel Dunbar
229121df87
Add website links to testing coverage & specification references.
...
llvm-svn: 56167
2008-09-12 18:33:44 +00:00
Ted Kremenek
ef2b3a71bb
Add missing spaces in path diagnostics.
...
llvm-svn: 56166
2008-09-12 18:17:46 +00:00
Daniel Dunbar
be12fd1f4f
Teach FindSpecRefs how to link to C++ spec.
...
llvm-svn: 56164
2008-09-12 18:10:49 +00:00
Daniel Dunbar
84b70f7f0f
Add --suppress-system-warnings (on by default, use =0 to disable)
...
- For investigating warnings in system headers / builtins.
- Currently also enables the behavior that allows silent redefinition
of types in system headers. Conceptually these are separate but I
didn't feel it was worth two options (or changing LangOptions).
llvm-svn: 56163
2008-09-12 18:10:20 +00:00
Ted Kremenek
d3f0d9b07c
Updated checker build.
...
llvm-svn: 56142
2008-09-12 04:56:58 +00:00
Douglas Gregor
aa1e21dcbd
Give string literals const element typesin C++, and cope with the deprecated C++ conversion from a string literal to a pointer-to-non-const-character
...
llvm-svn: 56137
2008-09-12 00:47:35 +00:00
Daniel Dunbar
484603be40
Iterate on sema for :? in Objective-C:
...
- Follow C99 behavior of using other operand type when one of
operands is a null pointer constant.
- Fix overenthusiastic devolving of any Objective-C types to id:
o If either operand has an Objective-C object type then:
- If both operands are interfaces and either operand can be
assigned to the other, use that type as the composite type.
- Otherwise, if either type is id, use id as the composite type.
- Otherwise, warn about incompatible types and use id as the
composite type.
- Return handling of qualified idea to separate test following
general pointer type checking.
o Upgraded from old code to allow devolving to id (without warning,
which matches GCC).
- <rdar://problem/6212771>
Add test case for issues fixed above, XFAIL though because it exposed
a new issue in property handling.
llvm-svn: 56135
2008-09-11 23:12:46 +00:00
Argyrios Kyrtzidis
47f9865182
Add comments about C++ clause 3.3.2p4 that mentions that the condition declaration should be local to an if/switch/while/for statement.
...
llvm-svn: 56134
2008-09-11 23:08:39 +00:00
Ted Kremenek
4ab81cbe2f
Echo stderr/stdout from clang subprocess to both the stderr of ccc-analyzer and
...
to an output file. This way users can both see the output of 'clang' as well as
enable background logging of files that clang encounters problems on.
llvm-svn: 56130
2008-09-11 23:05:26 +00:00
Ted Kremenek
28d1dc50b8
Bug fix: <rdar://problem/6164367>
...
scan-build now correctly processes path prefixes that contain multiple '+'
characters or other regex control characters.
llvm-svn: 56121
2008-09-11 21:15:10 +00:00
Mon P Wang
08fedcbcbb
Added SSE41 pminsd, pmaxsd, roundps and a few others
...
llvm-svn: 56114
2008-09-11 19:22:31 +00:00
Ted Kremenek
81ced5c472
Check if the environment variable TERM is defined before using it.
...
This fixes: <rdar://problem/6164279> scan-build gives error when invoked without TERM variable
llvm-svn: 56110
2008-09-11 18:17:51 +00:00
Ted Kremenek
c4488441da
Update Xcode project.
...
llvm-svn: 56109
2008-09-11 18:14:22 +00:00
Steve Naroff
4adbe3116e
Fix <rdar://problem/6210791> clang ObjC rewriter: @try / @catch block with no @finally does not call objc_exception_try_exit.
...
Need a couple tweaks to RewriteObjCTryStmt(). Need to deal with implicit finally clauses (to make sure objc_exception_try_exit is called). Also fixed a related bug where we need to generate an implicit @catch else clause (to again make sure objc_exception_try_exit is called).
llvm-svn: 56104
2008-09-11 15:29:03 +00:00
Douglas Gregor
27a907eb8c
bool is not an extension in C++
...
llvm-svn: 56103
2008-09-11 12:06:59 +00:00
Anders Carlsson
9396a89899
Make sure to store the exception in the catch parameter.
...
llvm-svn: 56102
2008-09-11 09:15:33 +00:00
Anders Carlsson
b5130d8588
Make sure to emit the catch parameter as well as the catch body.
...
llvm-svn: 56101
2008-09-11 08:21:54 +00:00