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

3118 Коммитов

Автор SHA1 Сообщение Дата
Ted Kremenek 344f7e3759 Use logical line number for BUGLINE.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49178 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 17:55:57 +00:00
Ted Kremenek 1758b07ef7 Added "getLogicalLineNumber" and "getLogicalColumnNumber" to FullSourceLoc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49177 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 17:55:15 +00:00
Sam Bishop 2f2418eacf Remove handling of impossible "-?" option.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49161 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 14:29:47 +00:00
Sam Bishop 0f9c72f505 trivial whitespace fix
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49160 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 14:20:28 +00:00
Ted Kremenek 70d1722c90 Handle the case when getEndPath() returns NULL.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49155 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 07:33:55 +00:00
Ted Kremenek 9c600ff132 Don't run the analyzer on files whose language is "unknown"
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49152 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 07:14:59 +00:00
Ted Kremenek 7e76944c26 Added guard for printing out PathDiagnostics whose last element ends with
a piece with a SourceLocation that does not have a FileID.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49151 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 07:13:10 +00:00
Ted Kremenek 49cd6354d5 Some cleanups in EscapeText and AddLineNumbers. Still investigating performance
issues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49150 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 07:12:29 +00:00
Ted Kremenek 10f883fe7e Remove impossible "-?" option.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49149 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 07:11:44 +00:00
Ted Kremenek ec5d81b73f Added "isFileID()" to FullSourceLoc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49148 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 07:11:38 +00:00
Ted Kremenek bba1cf5500 CSS/HTML generation tweaks for index.html: Remove special "classes" for <td>
elements in table so that sorttable can sort them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49145 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 05:50:51 +00:00
Chris Lattner fce71b8ea5 Fix PR2081 (problems codegen'ing some recursive structures) patch
by Lauro Venancio!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49144 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 05:50:42 +00:00
Sam Bishop 71de20ef8b Created a destructor so that the top-level decls can be deleted.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49142 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 05:35:20 +00:00
Sam Bishop 7dd1cf4031 Temporarily make the Decl virtual destructor public, so that calls to "delete"
can be tested on derived classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49141 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 05:29:20 +00:00
Ted Kremenek 1c1924525d Add back bug name to PathDiagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49139 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 05:23:19 +00:00
Chris Lattner bc896f58c7 Fix a bug where we didn't check the RHS for null, we checked
the LHS for null twice.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49138 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 05:07:25 +00:00
Chris Lattner 988ee6ef54 qualifier comparisons should be done on canonical types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49137 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 05:07:04 +00:00
Sam Bishop 4ccea1a2e9 Call delete on the deserialized TranslationUnit object.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49136 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 05:03:34 +00:00
Sam Bishop 8266d7f620 Call "delete" on the body of FunctionDecls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49135 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 05:01:04 +00:00
Ted Kremenek 94826a7910 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49133 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 04:59:14 +00:00
Ted Kremenek 7ebde953bb Added node_iterator to ExplodedGraph to allow iteration over all nodes in
the graph.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49132 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 04:58:29 +00:00
Ted Kremenek d45d268b29 Updated Xcode project to include BugReporter.[cpp,h].
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49128 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 04:43:40 +00:00
Ted Kremenek 61f3e05805 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49127 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 04:42:52 +00:00
Ted Kremenek d065d6080f Added missing #ifndef...#define...#endif directives to protect against
double includes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49126 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 04:38:39 +00:00
Ted Kremenek 9e628a02f4 CSS tweaking on blue boxes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49121 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 22:50:50 +00:00
Ted Kremenek 07b39fc389 80 col violation
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49120 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 22:08:09 +00:00
Ted Kremenek 87abc03d3d Added more PathDiagnostic rendering for terminators: switch, goto, loops.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49119 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 22:03:53 +00:00
Ted Kremenek f23621f1fc Blue diagnostic boxes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49117 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 21:14:04 +00:00
Ted Kremenek 718ceb13e0 Added path sequence numbers in HTML output of PathDiagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49116 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 21:04:20 +00:00
Ted Kremenek 3352fbab86 Fix initialization bug.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49115 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 20:44:27 +00:00
Ted Kremenek b94763963d Embed BUGLINE, BUGFILE, BUGPATHLENGTH in the emitted HTML file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49114 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 20:44:16 +00:00
Ted Kremenek 22d6a639ce Made bug index tables sortable.
Added line number, file information, path length, for each bug report.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49113 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 20:43:36 +00:00
Ted Kremenek 725779aa8f Added "back()" method to PathDiagnostic to access the last piece in a path.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49112 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 20:35:01 +00:00
Ted Kremenek 7f8a32572e Initial work on CSS in generated index.html.
Added "-V/--view" option to view index.html after it has been generated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49108 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 18:42:49 +00:00
Steve Naroff 3110251f13 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:-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49107 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 18:30:49 +00:00
Ted Kremenek 5744dc294e Initial support for generating index.html file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49104 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 18:03:36 +00:00
Ted Kremenek 86b4381356 Put "BUGDESC" comment tag on its own line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49103 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 18:03:20 +00:00
Ted Kremenek 3cc9fdc8c9 Shorted bug-description.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49102 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 18:02:54 +00:00
Chris Lattner 423a3c9c27 simplify some code by using PointerLikeType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49101 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 17:45:06 +00:00
Chris Lattner bdcd637c29 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 :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49100 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 17:35:06 +00:00
Chris Lattner 987798ad1d properly handle array decay in objc message exprs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49098 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 17:17:33 +00:00
Chris Lattner 26b7661b1d improve error to be something end users will actually understand :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49097 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 17:15:17 +00:00
Ted Kremenek 2f54af4821 Added path-sensitive null dereference test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49095 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 16:54:39 +00:00
Ted Kremenek 39eefde0ae More wording cleanups in --help text.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49094 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 16:47:27 +00:00
Ted Kremenek f02e8dbf7e More wording fixes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49093 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 16:41:25 +00:00
Ted Kremenek 0062ad4f47 Added error message for unrecognized options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49092 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 16:35:01 +00:00
Ted Kremenek af08f64abc Wording cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49091 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 16:31:58 +00:00
Ted Kremenek 7442ca6b27 Implemented "-k" support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49090 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 16:04:51 +00:00
Ted Kremenek 6a43ba9cd2 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!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49089 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 15:34:12 +00:00
Steve Naroff b327ce0295 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. 



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49087 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 14:35:35 +00:00