Sam Bishop
2f8a31ca92
trivial whitespace fix
...
llvm-svn: 49160
2008-04-03 14:20:28 +00:00
Ted Kremenek
ca40664275
Handle the case when getEndPath() returns NULL.
...
llvm-svn: 49155
2008-04-03 07:33:55 +00:00
Ted Kremenek
4d26d194e4
Don't run the analyzer on files whose language is "unknown"
...
llvm-svn: 49152
2008-04-03 07:14:59 +00:00
Ted Kremenek
b73d6dda84
Added guard for printing out PathDiagnostics whose last element ends with
...
a piece with a SourceLocation that does not have a FileID.
llvm-svn: 49151
2008-04-03 07:13:10 +00:00
Ted Kremenek
c599179267
Some cleanups in EscapeText and AddLineNumbers. Still investigating performance
...
issues.
llvm-svn: 49150
2008-04-03 07:12:29 +00:00
Ted Kremenek
ffc1147323
Remove impossible "-?" option.
...
llvm-svn: 49149
2008-04-03 07:11:44 +00:00
Ted Kremenek
78e30c17bc
Added "isFileID()" to FullSourceLoc.
...
llvm-svn: 49148
2008-04-03 07:11:38 +00:00
Ted Kremenek
d4bee176b6
CSS/HTML generation tweaks for index.html: Remove special "classes" for <td>
...
elements in table so that sorttable can sort them.
llvm-svn: 49145
2008-04-03 05:50:51 +00:00
Chris Lattner
e799eb5daa
Fix PR2081 (problems codegen'ing some recursive structures) patch
...
by Lauro Venancio!
llvm-svn: 49144
2008-04-03 05:50:42 +00:00
Sam Bishop
2289459bf6
Created a destructor so that the top-level decls can be deleted.
...
llvm-svn: 49142
2008-04-03 05:35:20 +00:00
Sam Bishop
5981404289
Temporarily make the Decl virtual destructor public, so that calls to "delete"
...
can be tested on derived classes.
llvm-svn: 49141
2008-04-03 05:29:20 +00:00
Ted Kremenek
e4c029e7aa
Add back bug name to PathDiagnostic.
...
llvm-svn: 49139
2008-04-03 05:23:19 +00:00
Chris Lattner
3a0702e631
Fix a bug where we didn't check the RHS for null, we checked
...
the LHS for null twice.
llvm-svn: 49138
2008-04-03 05:07:25 +00:00
Chris Lattner
efdc7685d4
qualifier comparisons should be done on canonical types.
...
llvm-svn: 49137
2008-04-03 05:07:04 +00:00
Sam Bishop
03e662d5be
Call delete on the deserialized TranslationUnit object.
...
llvm-svn: 49136
2008-04-03 05:03:34 +00:00
Sam Bishop
ca6226628e
Call "delete" on the body of FunctionDecls.
...
llvm-svn: 49135
2008-04-03 05:01:04 +00:00
Ted Kremenek
4e9cc3f272
When creating PathDiagnostics, created a trimmed graph first and report the
...
BFS path to the root. This also avoids problems with loops in the ExplodedGraph.
llvm-svn: 49133
2008-04-03 04:59:14 +00:00
Ted Kremenek
588dcdd58b
Added node_iterator to ExplodedGraph to allow iteration over all nodes in
...
the graph.
llvm-svn: 49132
2008-04-03 04:58:29 +00:00
Ted Kremenek
572875c43f
Updated Xcode project to include BugReporter.[cpp,h].
...
llvm-svn: 49128
2008-04-03 04:43:40 +00:00
Ted Kremenek
505a36afc6
Created new path-sensitive bug-reporting scheme based on the classes
...
"BugReporter" and "BugDescription". BugDescription is used to describe
a bug and provide pieces of the PathDiagnostic, and BugReporter creates
the actual PathDiagnostic by crawling through the ExplodedGraph.
Migrated checks done by GRSimpleVals to be reported using the new BugReporter
mechanism.
llvm-svn: 49127
2008-04-03 04:42:52 +00:00
Ted Kremenek
7c7616cf29
Added missing #ifndef...#define...#endif directives to protect against
...
double includes.
llvm-svn: 49126
2008-04-03 04:38:39 +00:00
Ted Kremenek
84041843af
CSS tweaking on blue boxes.
...
llvm-svn: 49121
2008-04-02 22:50:50 +00:00
Ted Kremenek
33d03a52f0
80 col violation
...
llvm-svn: 49120
2008-04-02 22:08:09 +00:00
Ted Kremenek
744fb6d9e7
Added more PathDiagnostic rendering for terminators: switch, goto, loops.
...
llvm-svn: 49119
2008-04-02 22:03:53 +00:00
Ted Kremenek
ab2a52c4bf
Blue diagnostic boxes.
...
llvm-svn: 49117
2008-04-02 21:14:04 +00:00
Ted Kremenek
258493c188
Added path sequence numbers in HTML output of PathDiagnostics.
...
llvm-svn: 49116
2008-04-02 21:04:20 +00:00
Ted Kremenek
3e38d6ad3c
Fix initialization bug.
...
llvm-svn: 49115
2008-04-02 20:44:27 +00:00
Ted Kremenek
3276af4c1a
Embed BUGLINE, BUGFILE, BUGPATHLENGTH in the emitted HTML file.
...
llvm-svn: 49114
2008-04-02 20:44:16 +00:00
Ted Kremenek
00ab318cf2
Made bug index tables sortable.
...
Added line number, file information, path length, for each bug report.
llvm-svn: 49113
2008-04-02 20:43:36 +00:00
Ted Kremenek
260fc46000
Added "back()" method to PathDiagnostic to access the last piece in a path.
...
llvm-svn: 49112
2008-04-02 20:35:01 +00:00
Ted Kremenek
c57139e104
Initial work on CSS in generated index.html.
...
Added "-V/--view" option to view index.html after it has been generated.
llvm-svn: 49108
2008-04-02 18:42:49 +00:00
Steve Naroff
778927532d
Change ObjCInterfaceDecl to inherit from NamedDecl (not TypeDecl). While ObjCInterfaceDecl is arguably a TypeDecl, it isn't a ScopedDecl. Since TypeDecl's are scoped, it makes sense to simply treat them as NamedDecl's. I could have fiddled a bit more with the hierarchy (in terms of creating a non-scoped TypeDecl), however this probably isn't worth the effort.
...
I also finished unifying access to scope decl change by converting Sema::getObjCInterfaceDecl() to use Sema::LookupDecl(). This is much cleaner now:-)
llvm-svn: 49107
2008-04-02 18:30:49 +00:00
Ted Kremenek
2cd0d63d30
Initial support for generating index.html file.
...
llvm-svn: 49104
2008-04-02 18:03:36 +00:00
Ted Kremenek
13c0885a8d
Put "BUGDESC" comment tag on its own line.
...
llvm-svn: 49103
2008-04-02 18:03:20 +00:00
Ted Kremenek
383bfd27d0
Shorted bug-description.
...
llvm-svn: 49102
2008-04-02 18:02:54 +00:00
Chris Lattner
182f660d8d
simplify some code by using PointerLikeType.
...
llvm-svn: 49101
2008-04-02 17:45:06 +00:00
Chris Lattner
db5f1fa3d8
add a common base class "PointerLikeType" for PointerType and ReferenceType,
...
allowing them to be treated the same in some contexts. A suggestion for a
better name is welcome :)
llvm-svn: 49100
2008-04-02 17:35:06 +00:00
Chris Lattner
b1f7398b1c
properly handle array decay in objc message exprs.
...
llvm-svn: 49098
2008-04-02 17:17:33 +00:00
Chris Lattner
6f6d226f63
improve error to be something end users will actually understand :)
...
llvm-svn: 49097
2008-04-02 17:15:17 +00:00
Ted Kremenek
018ba60f8e
Added path-sensitive null dereference test case.
...
llvm-svn: 49095
2008-04-02 16:54:39 +00:00
Ted Kremenek
3016cdd569
More wording cleanups in --help text.
...
llvm-svn: 49094
2008-04-02 16:47:27 +00:00
Ted Kremenek
dfd204e133
More wording fixes.
...
llvm-svn: 49093
2008-04-02 16:41:25 +00:00
Ted Kremenek
1cf35de3cb
Added error message for unrecognized options.
...
llvm-svn: 49092
2008-04-02 16:35:01 +00:00
Ted Kremenek
c5f113f52e
Wording cleanups.
...
llvm-svn: 49091
2008-04-02 16:31:58 +00:00
Ted Kremenek
977b644427
Implemented "-k" support.
...
llvm-svn: 49090
2008-04-02 16:04:51 +00:00
Ted Kremenek
37e908a6f0
Do equality testing, not regex, when the build command is gcc. This matches
...
better with what compiler invocations that ccc-analyzer actually intercepts.
Fixes suggested by Sam Bishop!
llvm-svn: 49089
2008-04-02 15:34:12 +00:00
Steve Naroff
2fc93f5c43
Two changes to Sema::LookupDecl() interface.
...
(1) Remove IdLoc (it's never used).
(2) Add a bool to enable/disable lazy builtin creaation (defaults to true).
This enables us to use LookupDecl() in Sema::isTypeName(), which is also part of this commit.
To make this work, I changed isTypeName() to be a non-const member function. I'm not happy with this, however I fiddled with making LookupDecl() and friends const and it got ugly pretty quickly. We can certainly add it back if/when someone has time to fiddle with it. For now, I thought this simplification was more important than retaining the const-ness.
llvm-svn: 49087
2008-04-02 14:35:35 +00:00
Ted Kremenek
d12d21c000
Beginning of some cleanups; start generating path diagnostics using objects
...
that describe a bug.
llvm-svn: 49086
2008-04-02 07:05:46 +00:00
Ted Kremenek
e1b52ff726
Minor wording changes.
...
llvm-svn: 49085
2008-04-02 07:05:07 +00:00
Ted Kremenek
e6eed29125
Embed "DESC" tag in HTML reports.
...
llvm-svn: 49084
2008-04-02 07:04:46 +00:00
Ted Kremenek
a7fa4d446a
Added "description" field to PathDiagnostic.
...
llvm-svn: 49083
2008-04-02 07:03:43 +00:00
Chris Lattner
b3a176da9f
Various parts of the standard require something to be an "incomplete or
...
object type". Add a predicate that checks exactly this, as it is equivalent
to checking ot see if the type is *not* a function type, which is faster
to check.
llvm-svn: 49082
2008-04-02 06:59:01 +00:00
Chris Lattner
daaa8ba77e
1) Enforce C99 6.7.3p2: "Types other than pointer types derived from
...
object or incomplete types shall not be restrict-qualified."
2) Warn about qualifiers on function types: C99 6.7.3p8: "If the
specification of a function type includes any type qualifiers, the
behavior is undefined."
3) Implement restrict on C++ references.
4) fix some locations for various C++ reference diagnostics.
llvm-svn: 49081
2008-04-02 06:50:17 +00:00
Chris Lattner
53be405c3a
Add a citation.
...
llvm-svn: 49080
2008-04-02 06:06:35 +00:00
Chris Lattner
a21ad8058a
Fix several bugs in array -> pointer decomposition.
...
First, we got several CVR propagation cases wrong, which Eli pointed
out in PR2039.
Second, we didn't propagate address space qualifiers correctly, leading
to incorrect lowering of code in CodeGen/address-space.c.
Third, we didn't uniformly propagate the specifier in the array to the
pointer ("int[restrict 4]" -> "int *restrict").
This adds an ASTContext::getArrayDecayedType member that handles the
non-trivial logic for this seemingly simple operation.
llvm-svn: 49078
2008-04-02 05:18:44 +00:00
Ted Kremenek
2c71d51513
Added initial hacked support for display path diagnostics with
...
GRSimpleVals warnings. Cleaning up, but now we get multiple bubbles (branches are annotated).
llvm-svn: 49077
2008-04-02 05:15:22 +00:00
Ted Kremenek
52595d7551
Fix copy-paste error.
...
llvm-svn: 49076
2008-04-02 05:13:10 +00:00
Chris Lattner
800817bf6d
remove blank line.
...
llvm-svn: 49075
2008-04-02 05:09:38 +00:00
Chris Lattner
091718d300
print cvr qualifiers on simplified typedefs
...
llvm-svn: 49074
2008-04-02 05:06:23 +00:00
Ted Kremenek
cb75937198
Added special handling when the build command is "gcc", "cc", or "llvm-gcc";
...
in these cases we directly call ccc-analyzer.
llvm-svn: 49073
2008-04-02 04:43:42 +00:00
Chris Lattner
24d5bfe0b2
rename some variables, fix 80 col violation. No
...
functionality change.
llvm-svn: 49072
2008-04-02 04:24:33 +00:00
Sam Bishop
02f78df76b
a bunch of random cleanups
...
llvm-svn: 49071
2008-04-02 03:35:43 +00:00
Chris Lattner
81cb9e8637
Fix PR2017 and silence some bogus errors.
...
llvm-svn: 49068
2008-04-02 01:05:10 +00:00
Steve Naroff
9b94b17806
Fix a comment typo and add a couple suggestions from Chris.
...
llvm-svn: 49066
2008-04-02 00:39:51 +00:00
Steve Naroff
257520b1b4
Fairly large "cleaup" related to changing ObjCCompatibleAliasDecl superclass (to inherit from NamedDecl, instead of ScopedDecl).
...
- Added a DenseMap to associate an IdentifierInfo with the ObjCCompatibleAliasDecl.
- Renamed LookupScopedDecl->LookupDecl and changed it's return type to Decl. Also added lookup for ObjCCompatibleAliasDecl's.
- Removed Sema::LookupInterfaceDecl(). Converted clients to used LookupDecl().
- Some minor indentation changes.
Will deal with ObjCInterfaceDecl and getObjCInterfaceDecl() in a separate commit...
llvm-svn: 49058
2008-04-01 23:04:06 +00:00
Ted Kremenek
94896e17bb
Patch by Argiris Kirtzidis: Fix a dangling pointer error!
...
llvm-svn: 49057
2008-04-01 22:35:58 +00:00
Ted Kremenek
ce4f31d3ce
Minor cleanups.
...
llvm-svn: 49052
2008-04-01 21:36:28 +00:00
Ted Kremenek
33187168ab
Added help text for scan-build.
...
llvm-svn: 49051
2008-04-01 21:22:03 +00:00
Ted Kremenek
bf1a7c6440
Initial checking of 'scan-build' script, a script used to wrap builds and
...
interpose calls to gcc with calls to the analyzer.
llvm-svn: 49049
2008-04-01 20:47:38 +00:00
Chris Lattner
595cf9ff81
Update to match simplified llvm MemoryBuffer interfaces for files.
...
llvm-svn: 49042
2008-04-01 18:04:30 +00:00
Chris Lattner
4f6002c79a
prune dead #includes
...
llvm-svn: 49033
2008-04-01 06:08:11 +00:00
Chris Lattner
47448288ee
MemoryBuffer::getFile got smarter, obviating the need for readfilefast.
...
The new MemoryBuffer doesn't "leak" file descriptors and handles the
small file case efficiently.
llvm-svn: 49032
2008-04-01 06:06:37 +00:00
Ted Kremenek
a9590d1c0d
Embed linkable IDs in message bubbles.
...
llvm-svn: 49005
2008-03-31 23:30:12 +00:00
Chris Lattner
34cf70ede4
improve comma consistency, yes I'm anal
...
llvm-svn: 49004
2008-03-31 23:25:25 +00:00
Ted Kremenek
3bcfc6edc0
Better handling for tabs with message bubbles.
...
llvm-svn: 49001
2008-03-31 23:14:05 +00:00
Ted Kremenek
01fa5d2a1e
When emitting HTML messages, take into account margin fusing due to tabs.
...
llvm-svn: 48998
2008-03-31 21:40:14 +00:00
Ted Kremenek
b8cb8e8f90
Do not abort ccc-analyzer script if an HTML directory is not specified.
...
llvm-svn: 48997
2008-03-31 21:20:32 +00:00
Ted Kremenek
e9f2a90d1f
Do not prepend the keyword "[CHECKER]" to checker messages when using
...
a PathDiagnosticClient.
llvm-svn: 48996
2008-03-31 20:42:43 +00:00
Steve Naroff
93eea6e1a0
Hack ReadFileFast() to raise the threshold of memory mapped files (from 4->12 pages).
...
This is a temporary solution to avoid running out of file descriptors (which defaults to 256).
Need to benchmark to understand the speed benefit. If the benefit is small, the simple solution is to avoid memory mapping files. If the benefit is significant, more thought is necessary.
llvm-svn: 48991
2008-03-31 18:44:59 +00:00
Ted Kremenek
bb7f03f926
Include ranges in GRSimpleVals diagnostics.
...
llvm-svn: 48990
2008-03-31 18:44:32 +00:00
Ted Kremenek
c27815ca82
Inlined clang/Analysis/Analyses/GRSimpleVals.h into LocalCheckers.h and removed
...
GRSimpleVals.h
Added a PathDiagnosticClient option to the driver functions for the
CFRefCountChecker and the GRSimpleVals analysis. Both analyses now accept a "-o"
argument from the driver that specifies where HTML reports should be dumped.
llvm-svn: 48989
2008-03-31 18:26:32 +00:00
Ted Kremenek
612d34641b
The ccc-analyzer script now interrogates environment variables to determine
...
where to dump HTML reports.
llvm-svn: 48987
2008-03-31 18:25:05 +00:00
Ted Kremenek
491dc9f4a0
Added variation of the "Report" method in the class Diagnostic that takes
...
an optional DiagnosticClient argument that differs from the client stored
internally in the Diagnostic object.
llvm-svn: 48986
2008-03-31 18:23:15 +00:00
Ted Kremenek
9c7deb8d25
Disable timing diagnostics for GRSimpleVals.
...
llvm-svn: 48981
2008-03-31 16:00:32 +00:00
Ted Kremenek
f646774f32
Added path-sensitive check for return statements that return the address
...
of a stack variable. This is the path-sensitive version of a check that
is already done during semantic analysis.
llvm-svn: 48980
2008-03-31 15:02:58 +00:00
Chris Lattner
59a2594f3f
rename Decl::CompatibleAlias -> ObjCCompatibleAlias.
...
Fix objc ivar lookup. Ivar lookup should occur between lookup
of method-local values and lookup of globals. Emulate this with
some logic in the handling of Sema::ActOnIdentifierExpr.
Two todo's left:
1) sema shouldn't turn a bare reference to an ivar into "self->ivar"
in the AST. This is a hack.
2) The new ScopedDecl::isDefinedOutsideFunctionOrMethod method does
not correctly handle typedefs and enum constants yet.
llvm-svn: 48972
2008-03-31 00:36:02 +00:00
Chris Lattner
c00c35a857
some cleanups on top of David's patch. There are still two
...
remaining open issues I've communicated to him:
1) self can be assigned to, and his patch didn't handle it correctly.
2) CollectObjCIvarTypes is N^2 (because each subclass reprocesses
all parent class ivars) and flattens classes. If A derives from B,
and both have an int, I'd expect to get { {i32}, i32}, not { i32, i32}.
David, please review.
llvm-svn: 48970
2008-03-30 23:25:33 +00:00
Chris Lattner
4bd5596d08
Add initial support for objc codegen for methods, ivars, and the
...
etoile runtime, patch by David Chisnall!
llvm-svn: 48969
2008-03-30 23:03:07 +00:00
Steve Naroff
f9e7c90129
Only have the rewriter produce a file when there are no errors.
...
llvm-svn: 48926
2008-03-28 22:26:09 +00:00
Steve Naroff
0de4199ca0
Make sure Sema::ActOnClassMessage() correctly diagnoses "super".
...
llvm-svn: 48924
2008-03-28 21:37:05 +00:00
Ted Kremenek
c719424caa
Added skeleton checking for NSString's method initWithFormat: (do not pass nil). This won't be useful in most cases right now
...
because the analyzer isn't tracking expected types for an object, and [NSString alloc] just runs "id".
llvm-svn: 48917
2008-03-28 16:09:38 +00:00
Steve Naroff
60a9ef67e2
Add some of Ted's recent work to the VC++ project file.
...
Fix a couple bozo bugs in the rewriter.
llvm-svn: 48903
2008-03-27 22:59:54 +00:00
Steve Naroff
00a317694b
Collect all the preamble code and don't insert it until the end.
...
llvm-svn: 48899
2008-03-27 22:29:16 +00:00
Ted Kremenek
276278e5d2
Expanded NSString checking to check for nil for a few more methods.
...
llvm-svn: 48898
2008-03-27 22:05:32 +00:00
Ted Kremenek
2e4e7ccb22
Add line SourceLocation to NSString checks.
...
Added test case to test warning about passing 'nil' to NSString's compare: method.
llvm-svn: 48896
2008-03-27 21:23:57 +00:00
Ted Kremenek
27156c8c9f
Hooked up initial NSString interface checking to GRSimpleVals.
...
llvm-svn: 48895
2008-03-27 21:15:17 +00:00
Ted Kremenek
c8948c77f7
ProgramPoint is just a smart pointer; no reason to return a constant reference.
...
llvm-svn: 48891
2008-03-27 18:11:59 +00:00
Ted Kremenek
64b95a024e
Minor CSS tweaking (smaller h1 tags).
...
Bug fix in EscapeText (for std::string) where spaces were not properly emitted.
llvm-svn: 48889
2008-03-27 17:28:58 +00:00
Ted Kremenek
30560caa3d
For HTMLDiagnostics, when emitting the name of the directory, substitute the current working directory for "."
...
llvm-svn: 48888
2008-03-27 17:25:28 +00:00
Ted Kremenek
296b4c1bc6
Update Xcode project: add BasicObjCFoundationChecks.h
...
llvm-svn: 48887
2008-03-27 17:17:51 +00:00
Ted Kremenek
a4d60b6de3
Add creation of BasicObjCFoundationChecks when running GRSimpleVals from the driver.
...
llvm-svn: 48886
2008-03-27 17:17:22 +00:00
Ted Kremenek
f89469e392
Add default ctor implementation.
...
llvm-svn: 48885
2008-03-27 17:16:06 +00:00
Ted Kremenek
561dfe3153
Add html::EscapeText for std::string; use this function to escape text in message bubbles.
...
llvm-svn: 48884
2008-03-27 17:15:29 +00:00
Ted Kremenek
ed9f054a9c
Don't emit any timings for GRSimple if the CFG is not going to be built.
...
llvm-svn: 48882
2008-03-27 17:14:42 +00:00
Ted Kremenek
8d5491f40c
Output directory as well as file name.
...
llvm-svn: 48870
2008-03-27 07:39:04 +00:00
Ted Kremenek
8cc4842a76
Added <h3> tag in HTML file output that contains the name of the source file.
...
llvm-svn: 48869
2008-03-27 07:35:49 +00:00
Ted Kremenek
9b7843124e
Added AnnotatedPath.h, GRAuditor.h, GRSimpleAPICheck.h and BasicObjCFoundationChecks.cpp to Xcode project.
...
llvm-svn: 48868
2008-03-27 07:26:42 +00:00
Ted Kremenek
c04149299c
Added "GRAuditor" and "GRSimpleAPICheck" interface to allow simple stateless checkers to be injected into the analyzer.
...
Added "AnnotatedPath" class to record an annotated path that will be useful for inspecting paths.
Added some boilerplate code for simple checks of Apple's Foundation API.
llvm-svn: 48867
2008-03-27 07:25:52 +00:00
Ted Kremenek
f6d2919a3e
Updated Xcode project with HTMLDiagnostics.[h,cpp]
...
llvm-svn: 48866
2008-03-27 06:18:34 +00:00
Ted Kremenek
6efb026623
Added "HTMLDiagnostic", a generic DiagnosticClient (that also implements PathDiagnostic)
...
so that all diagnostics can be piped to HTML files instead of as text diagnostics using --html-diags.
llvm-svn: 48865
2008-03-27 06:17:42 +00:00
Ted Kremenek
710714c365
PathDiagnosticPiece no longer contains a vector of strings; just one string.
...
PathDiagnostic no longer contains a diagnostic ID or diagnostic level.
llvm-svn: 48864
2008-03-27 06:16:40 +00:00
Ted Kremenek
c875201ee1
Fixed copy-paste error.
...
llvm-svn: 48863
2008-03-27 05:52:45 +00:00
Ted Kremenek
9c27b057da
Added PathDiagnostic.[h,cpp] to Xcode project.
...
llvm-svn: 48862
2008-03-27 03:50:10 +00:00
Ted Kremenek
4fa20c9bba
Added classes "PathDiagnosticPiece", "PathDiagnostic", and "PathDiagnosticClient", which encapsulate diagnostic reporting for paths.
...
llvm-svn: 48861
2008-03-27 03:49:32 +00:00
Ted Kremenek
afa66e246e
In ObjCMessageExpr: getSelector() const should just return "Selector", not "const Selector&" because Selector is just a smart pointer.
...
llvm-svn: 48860
2008-03-27 03:47:43 +00:00
Steve Naroff
c10c2e339f
Fix rewriter tests to work with new output file logic. This changes forces the output to standard out (rather than generate a .cpp file, which is the new default for the rewriter).
...
llvm-svn: 48847
2008-03-26 22:28:40 +00:00
Ted Kremenek
ea128437b3
Bug fix: use GetRVal instead of GetLVal (were getting the value of a DeclRefExpr, not it's address).
...
llvm-svn: 48846
2008-03-26 22:21:58 +00:00
Ted Kremenek
9dd6ddec63
Added test case for static analysis to warn about passing uninitialized values as arguments (not the receiver) in message expressions.
...
llvm-svn: 48845
2008-03-26 22:00:11 +00:00
Ted Kremenek
a1d9ed137a
Added test case for static analyzer to detect uses of uninitialized pointers as receivers in Objective-C message expressions.
...
Added test case directory "Analysis-Apple" which is only run on Apple (darwin) machines.
llvm-svn: 48844
2008-03-26 21:51:44 +00:00
Ted Kremenek
cb047289a8
Bug fix in transfer function for ObjCMessageExpr: Visit the receiver expression as an ordinary expression, not using VisitLVal.
...
llvm-svn: 48842
2008-03-26 21:36:08 +00:00
Steve Naroff
c06ee808d7
Alloc redeclaration of typedefs within ExternCSystemHeaderDir's AND SystemHeaderDir's.
...
llvm-svn: 48841
2008-03-26 21:27:00 +00:00
Nuno Lopes
623207d603
allow the format attribute to be specified in function pointer prototypes
...
# this is my first commit here, so please be gentle :)
llvm-svn: 48807
2008-03-25 23:01:48 +00:00
Ted Kremenek
5efdf8457f
Added hacked version of ccc script used to invoke the static analyzer. This
...
will gradually get pruned down, as it doesn't need to be as functional as
'ccc'.
llvm-svn: 48806
2008-03-25 22:35:32 +00:00
Nate Begeman
c506c78117
Extend QualType::getAddressSpace to do the right thing for array types, and in
...
the future, RecordTypes.
llvm-svn: 48784
2008-03-25 18:36:32 +00:00
Nate Begeman
03851eb91f
Add missing files
...
llvm-svn: 48783
2008-03-25 18:31:12 +00:00
Ted Kremenek
4b55badc39
GRSimple analysis now outputs additional diagnostic warnings about
...
passing an uninitialized value to a message expresion.
llvm-svn: 48776
2008-03-25 16:40:05 +00:00
Ted Kremenek
3335120f69
Tweak to transfer function for ObjCMessageExpr: handle both instance methods
...
and message expressions with a specified receiver.
llvm-svn: 48773
2008-03-25 16:07:41 +00:00
Ted Kremenek
945a246ad8
Added logic to check for uninitialized values as the receivers for message expressions
...
and uninitialized values passed-by-value as arguments to message expressions.
llvm-svn: 48760
2008-03-25 02:10:28 +00:00
Ted Kremenek
64100da427
Added initial transfer function support for ObjCMessageExpr.
...
llvm-svn: 48757
2008-03-25 00:34:37 +00:00
Ted Kremenek
7082a61074
Added "arg_iterators" to ObjCMessageExpr (for iterating over the arguments of a message expression)
...
llvm-svn: 48756
2008-03-25 00:16:48 +00:00
Ted Kremenek
b2f4d3138f
Minor CSS tweaking: use webkit style CSS properties for shadows/rounded edges
...
for message bubbles.
llvm-svn: 48754
2008-03-24 23:38:32 +00:00
Steve Naroff
65838bb2d5
Add a couple files to VC++ project and cleanup an "#if 0".
...
llvm-svn: 48748
2008-03-24 22:03:25 +00:00
Andrew Lenharth
10051b97fd
debian amd64 testing
...
llvm-svn: 48745
2008-03-24 21:39:05 +00:00
Andrew Lenharth
d8cde6f45d
debian ia32 testing
...
llvm-svn: 48742
2008-03-24 21:25:48 +00:00
Chris Lattner
22fc992f59
Avoid overflowing buffer, patch by Algeris Kirtzidis!
...
llvm-svn: 48741
2008-03-24 21:14:55 +00:00
Sam Bishop
ac92a13c86
The newest version of valgrind, 3.3.0, no longer appends PIDs to log filenames
...
by default. Adding a %p works with this new version and is backwards
compatible, though it looks a little funny.
llvm-svn: 48698
2008-03-23 03:42:18 +00:00
Ted Kremenek
fb475ec504
Changed merge operation for uninitialized values analysis to "intersect" (previous union).
...
The effect is that if a variable is uninitialized along a branch (but initialized along another), at merge points it is considered uninitialized. Previously we had the opposite behavior. The new behavior is more conservative, and more in line with gcc's behavior.
llvm-svn: 48689
2008-03-22 20:11:00 +00:00
Chris Lattner
97d496c182
Teach the rewriter how to respect the -o option.
...
llvm-svn: 48669
2008-03-22 00:08:40 +00:00
Chris Lattner
4f55259237
fix this test.
...
llvm-svn: 48668
2008-03-22 00:07:50 +00:00
Ted Kremenek
181f72369f
Rename "Nodify" to "MakeNode"
...
llvm-svn: 48659
2008-03-21 21:30:14 +00:00
Sam Bishop
f4303edfa3
Only invoke the preprocessor; it's the only thing being tested. Also, check
...
the output to make sure that the macros and comments are being treated as such.
llvm-svn: 48638
2008-03-21 08:05:55 +00:00
Sam Bishop
27654983dc
Plug a memory leak in the "this macro expands into a single trivially-
...
expanded token" case.
llvm-svn: 48637
2008-03-21 07:13:02 +00:00
Sam Bishop
558447416d
Use the -E option when invoking clang. Only the preprocessor is
...
required to perform this test.
llvm-svn: 48636
2008-03-21 07:02:04 +00:00
Gabor Greif
56c563ad3f
Add ability to run clang tests under valgrind. Patch by Sam Bishop.
...
llvm-svn: 48621
2008-03-20 22:50:54 +00:00
Ted Kremenek
b7151c7ca8
LiveVariables analysis now uses intersect for the merge of block-level expression liveness information.
...
The rationale is that a block-level expression cannot be live in a parent block unless it is live in all of the successor blocks.
llvm-svn: 48618
2008-03-20 21:46:49 +00:00
Gabor Greif
fc39f15802
Use make's -C option to enter directories.
...
Also, do not try to remove build/ dir when
cleaning, this does not exist any more.
llvm-svn: 48599
2008-03-20 14:43:48 +00:00
Gabor Greif
f5eb286707
reduce chattyness of makefiles
...
llvm-svn: 48597
2008-03-20 14:28:22 +00:00
Gabor Greif
4fa19e4047
scan testdirs only once, patch by Mike Stump, thanks!
...
llvm-svn: 48589
2008-03-20 08:09:10 +00:00
Ted Kremenek
bc24962566
Added HTML highlighting for ranges.
...
llvm-svn: 48572
2008-03-19 23:55:53 +00:00
Steve Naroff
157c403cb8
Fix typo.
...
llvm-svn: 48571
2008-03-19 23:46:26 +00:00