Seo Sanghyeon
63f067f5a7
PR1963: Address of function is a constant expression
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49212 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-04 09:45:30 +00:00
Torok Edwin
730f2c13e8
fix build error: add missing braces.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49209 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-04 06:16:25 +00:00
Chris Lattner
0ed844b04e
Introduce ContextDecl, patch by Argiris Kirtzidis!
...
-Added ContextDecl (no TranslationUnitDecl)
-ScopedDecl class has a ContextDecl member
-FieldDecl class has a ContextDecl member, so that a Field or a ObjCIvar can be traced back to their RecordDecl/ObjCInterfaceDecl easily
-FunctionDecl, ObjCMethodDecl, TagDecl, ObjCInterfaceDecl inherit from ContextDecl. With TagDecl as ContextDecl, enum constants have a EnumDecl as their context.
-Moved Decl class to a "DeclBase.h" along with ContextDecl class
-CurContext is handled by Sema
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49208 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-04 06:12:32 +00:00
Chris Lattner
c8aa5f1f26
Codegen assignment to self correctly, patch by David Chisnall!
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49201 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-04 04:07:35 +00:00
Nate Begeman
1330b0e6e4
Ignore qualifiers when checking vector operands, just like scalar operands.
...
This prevents things like
a += b[0]; where a is a float4 and b is a float4 * (address_space 1)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49199 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-04 01:30:25 +00:00
Ted Kremenek
7956f754f8
Added investigate patch for an occasionally failing assertion (heisenbug?)
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49193 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 21:44:24 +00:00
Ted Kremenek
8cb53fb1e9
Remove bogus check to prune out analyzing files.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49191 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 21:29:11 +00:00
Ted Kremenek
f5221b0803
More reliably remove '\n' from queries of the location of ccc-analyzer
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49189 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 21:17:14 +00:00
Ted Kremenek
4f4b17da43
Use full path to ccc-analyzer.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49187 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 20:08:18 +00:00
Nate Begeman
dbebb73b86
Teach clang how to codegen punpcklbw and punpcklwd
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49186 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 19:58:06 +00:00
Ted Kremenek
b22d589e2c
Make typedefs public.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49185 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 19:52:45 +00:00
Ted Kremenek
a2fdbf5245
Better range highlight for undefined-argument checks.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49184 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 18:52:25 +00:00
Ted Kremenek
a7bf7e79cc
When reporting "bad receiver" warnings, highlight the receiver.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49183 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 18:46:16 +00:00
Ted Kremenek
de7161fa68
Use "getRanges" in default implementation of "getEndPath" to determine
...
the ranges of highlighted elements in the source code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49181 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 18:00:37 +00:00
Ted Kremenek
f1ae705460
Hooked up GRSimpleAPICheck and the simple Objective-C Foundation checks to use
...
the new BugReporter interface.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49180 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 17:57:38 +00:00
Ted Kremenek
84867e60a4
Mark nodes as sinks that GRAuditor says should be marked as sinks.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49179 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 17:56:48 +00:00
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