Commit Graph

42331 Commits

Author SHA1 Message Date
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
Dale Johannesen 5316aebeb6 Testcase for EH with functions whose names are stripped.
llvm-svn: 49111
2008-04-02 20:16:41 +00:00
Dale Johannesen 491557712a Make EH work with unnamed functions. Reenable running
StripSymbols when EH is on.

llvm-svn: 49110
2008-04-02 20:10:52 +00:00
Dan Gohman 39d8b26322 Partial CBackend support for 128-bit integers. This is needed
now that llvm-gcc is lowering appropriately-sized struct returns
to i128 on x86-64.

llvm-svn: 49109
2008-04-02 19:40:14 +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
David Greene 586740f401 Iterators folloring a SmallVector erased element are invalidated so
don't access cached iterators from after the erased element.

Re-apply 49056 with SmallVector support.

llvm-svn: 49106
2008-04-02 18:24:46 +00:00
Evan Cheng d8616064d8 Now that I am told MachineRegisterInfo also tracks physical register uses / defs, I can do away with the horribleness I introduced a while back. It's impossible to detect if there is any use of a physical register below an instruction (and before any def of the register) with some cheap book keeping.
llvm-svn: 49105
2008-04-02 18:04:08 +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
Evan Cheng be3d44c3cb Remove #include<map> from LiveVariables.h. Not referenced.
llvm-svn: 49099
2008-04-02 17:23:50 +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
Dale Johannesen 8780ecbbac Cosmetic changes per EH patch review feedback.
llvm-svn: 49096
2008-04-02 17:04:45 +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
Torok Edwin 21b8bed571 Add new file Support/DataFlow.h.
It allows Use-Def and Def-Use relations to be treated as graphs.

llvm-svn: 49088
2008-04-02 14:57:52 +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
Anton Korobeynikov 20c9e4cbee Add new CC lowering rule: provide a list of registers, which can be 'shadowed',
when some another register is used for argument passing.
Currently is used on Win64.

llvm-svn: 49079
2008-04-02 05:23:57 +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
Owen Anderson 2412158111 In some situations, we need to check for local interferences between the PHI
node and its inputs.

llvm-svn: 49070
2008-04-02 03:00:13 +00:00
Owen Anderson edfc2eb558 Correctly mark a valno that was previous defined by a PHI node as having an
unknown defining inst after PHI elimination.

llvm-svn: 49069
2008-04-02 02:12:45 +00:00