Chris Lattner
9b7206eb4f
don't read off the front of the buffer. Thanks to Sam for pointing this out.
...
llvm-svn: 49535
2008-04-11 16:20:41 +00:00
Sam Bishop
703ae9624b
Stub out and start using a Decl::Destroy() method.
...
llvm-svn: 49532
2008-04-11 15:01:25 +00:00
Sam Bishop
4c088b766d
Use the ASTContext allocator when creating deserialized Decl objects.
...
llvm-svn: 49530
2008-04-11 14:49:10 +00:00
Chris Lattner
9950c80c83
two new files for previous patch, by Argiris Kirtzidis
...
llvm-svn: 49521
2008-04-11 07:06:57 +00:00
Chris Lattner
c5c95b52a8
Switch sema to maintaining its own scope chain information for variable
...
shadowing, instead of threading it through the AST. This patch contributed
by Argiris Kirtzidis!
llvm-svn: 49520
2008-04-11 07:00:53 +00:00
Chris Lattner
47fb9efa5d
Fix rdar://5843510 don't assert and die when an invalid output
...
file is specified, print a happy little error message.
llvm-svn: 49518
2008-04-11 06:14:11 +00:00
Ted Kremenek
4b77209694
Fixed some logic errors in the CF ref count checker; we now can detect simple
...
use-after-release errors. Added test case.
llvm-svn: 49509
2008-04-10 23:44:06 +00:00
Fariborz Jahanian
de615836f3
Patch for:
...
1) objc ivar processing is split out of ActOnField into its own ActOnIvar method.
2) the new objc ivar action takes visibility info directly, eliminating
AllVisibilities in ParseObjCClassInstanceVariables.
llvm-svn: 49506
2008-04-10 23:32:45 +00:00
Ted Kremenek
3c03d52d6e
Simplify CF ref. count checker state machine.
...
llvm-svn: 49505
2008-04-10 23:09:18 +00:00
Ted Kremenek
22bd628056
Fix some bonehead bugs in summary generation in CFRefCount.
...
llvm-svn: 49503
2008-04-10 22:58:08 +00:00
Ted Kremenek
969bb805f9
Used --checker-simple.
...
llvm-svn: 49501
2008-04-10 22:17:23 +00:00
Ted Kremenek
4a78c3ae11
Refactored all logic to run the GRSimpleVals and CFRef checker into a common
...
code path in the clang driver.
Renamed options --grsimple to -checker-simple and -check-cfref to -checker-cfref.
llvm-svn: 49500
2008-04-10 22:16:52 +00:00
Chris Lattner
5c7fce453d
reduce the amount of 'C++ magic' this code depends on :)
...
llvm-svn: 49489
2008-04-10 16:37:40 +00:00
Ted Kremenek
ea1bc3bec6
CFRefCount analysis now properly calls "EmitWarnings" after analyzing a function.
...
llvm-svn: 49488
2008-04-10 16:21:09 +00:00
Ted Kremenek
42d9db75f0
When not emitting path diagnostics in BugReporter::EmitWarning(), use the
...
BugReport-specific SourceRanges (when available).
llvm-svn: 49486
2008-04-10 16:12:38 +00:00
Ted Kremenek
83744ddbd9
Fixed regressions in error reporting due to copy-paste errors (using the "begin"
...
iterator instead of "end") and not implementing "getDescription()" for Nil
argument checks.
llvm-svn: 49485
2008-04-10 16:05:13 +00:00
Chris Lattner
a12405b0ef
refactor Parser::ParseStructDeclaration to return a vector of uninterpreted
...
declarators. This allows the clients (C structs, objc classes, objc
properties, [future] C++ classes) etc, to do custom processing before invoking
an action.
This has two benefits in the short term:
1) objc ivar processing should be split out of ActOnField into its own ActOn method.
2) the new objc ivar action can take visibility info directly, eliminating
AllVisibilities in ParseObjCClassInstanceVariables.
3) objc properties can pass their own special sauce down to sema as well.
llvm-svn: 49468
2008-04-10 06:46:29 +00:00
Chris Lattner
32295d344a
Simplify lifetime of location object.
...
llvm-svn: 49467
2008-04-10 06:15:14 +00:00
Eric Christopher
67d650508a
Fix typo.
...
llvm-svn: 49464
2008-04-10 05:23:15 +00:00
Chris Lattner
0e91b41902
typedef void T;
...
void f(T);
is only invalid in C++ mode, not C89 mode.
llvm-svn: 49460
2008-04-10 02:26:16 +00:00
Chris Lattner
58258246ec
Several improvements from Doug Gregor related to default
...
argument handling. I'll fix up the c89 (void) thing next.
llvm-svn: 49459
2008-04-10 02:22:51 +00:00
Ted Kremenek
c8bef6a076
Hooked up initial reference-count checks to the BugReporter interface.
...
llvm-svn: 49455
2008-04-09 23:49:11 +00:00
Ted Kremenek
7acc3a36ef
Major refactoring/cleanup of GRExprEngine, ExplodedGraph, and BugReporter.
...
Bugs are now reported using a combination of "BugType" (previously
BugDescription) and Bug "BugReport" objects, which are fed to BugReporter (which
generates PathDiagnostics). This provides a far more modular way of registering
bug types and plugging in diagnostics.
GRExprEngine now owns its copy of GRCoreEngine, and is not owned by the
ExplodedGraph.
ExplodedGraph is no longer templated on the "checker", but instead on the state
contained in the nodes.
llvm-svn: 49453
2008-04-09 21:41:14 +00:00
Ted Kremenek
43e0633048
The dtor CGObjCRuntime::~CGObjCRuntime() was implemented twice, once
...
in CGObjCGNU.cpp and once in CGObjCEtoile.cpp. Moved its definition to
CGObjC.cpp. This resolves a build error in Xcode, and also cleans things up.
llvm-svn: 49429
2008-04-09 15:51:31 +00:00
Ted Kremenek
1d511d3bae
Add SemaDeclCXX.cpp to Xcode project.
...
llvm-svn: 49428
2008-04-09 15:50:11 +00:00
Ted Kremenek
f17d5758fc
Micro-optimization: Don't use ostringstream when using a C-string literal
...
will work just fine.
llvm-svn: 49427
2008-04-09 15:40:40 +00:00
Ted Kremenek
ce8e881dc3
Added some boilerplate for emitting warnings from the CF-reference count checker.
...
llvm-svn: 49414
2008-04-09 01:10:13 +00:00
Ted Kremenek
3cef454e2e
Added new "BugReporterHelper" class which is used by BugReporter to emit
...
checker-specific diagnostics.
llvm-svn: 49412
2008-04-09 00:20:43 +00:00
Ted Kremenek
d4db4fa359
For -emit-html, use the Rewriter to expand tabs.
...
llvm-svn: 49409
2008-04-08 23:25:54 +00:00
Ted Kremenek
5f7ece0bff
Don't expand tabs in EscapeText, but rather expand them when writing out
...
the HTML file. This should reduce the amount of memory pressure on the
rewriter for files that have a lot of tabs.
llvm-svn: 49406
2008-04-08 22:37:58 +00:00
Ted Kremenek
5d1647daf9
Add HTMLRewrite.h to Xcode project.
...
llvm-svn: 49405
2008-04-08 22:31:28 +00:00
Ted Kremenek
b1f773ca98
When substituting tabs during HTMLification, only add " " when we are
...
"escaping" spaces.
llvm-svn: 49404
2008-04-08 22:28:15 +00:00
Ted Kremenek
d8256ed2fe
Improve range highlighting in HTMLDiagnostic to correctly highlight ranges
...
that span multiple lines by inserting multiple "</span>" and "<span>" tags.
llvm-svn: 49403
2008-04-08 21:29:14 +00:00
Ted Kremenek
dbd1c183b0
Make SourceManager::getFullFilePos() public.
...
llvm-svn: 49402
2008-04-08 21:26:35 +00:00
Sam Bishop
506215c708
Changed the Decl::Kind enum of the ObjCPropertyDecl class, so that it follows
...
the pattern of the other Decl classes.
llvm-svn: 49399
2008-04-08 20:49:25 +00:00
Ted Kremenek
ba0e4237aa
Set the location of ccc-analyzer to be the same directory as where scan-build
...
is located.
llvm-svn: 49397
2008-04-08 20:22:12 +00:00
Chris Lattner
4fdfbf7b89
silence some warnings when assertions are disabled.
...
llvm-svn: 49372
2008-04-08 05:52:18 +00:00
Chris Lattner
199abbcb26
Add support for C++ default arguments, and rework Parse-Sema
...
interaction for function parameters, fixing PR2046.
Patch by Doug Gregor!
llvm-svn: 49370
2008-04-08 05:04:30 +00:00
Chris Lattner
aa9c7aed0f
Add support for C++ default arguments, and rework Parse-Sema
...
interaction for function parameters, fixing PR2046.
Patch by Doug Gregor!
llvm-svn: 49369
2008-04-08 04:40:51 +00:00
Chris Lattner
2163265b53
Fix rdar://5846705: "clang -E foo.c -o foo.i" should remove foo.i on error.
...
llvm-svn: 49368
2008-04-08 04:16:20 +00:00
Ted Kremenek
a9077ab6b7
Add ids for line numbers, allowing us to jump to arbitrary line numbers within
...
an HTMLified source file.
llvm-svn: 49359
2008-04-07 23:53:30 +00:00
Ted Kremenek
a378fe0a2e
Left-justify text in report table.
...
llvm-svn: 49358
2008-04-07 23:50:07 +00:00
Ted Kremenek
bd1bd88423
Tweak message bubble color (gold)
...
llvm-svn: 49357
2008-04-07 23:43:44 +00:00
Ted Kremenek
e73006ee45
Improve BugReport diagnostics for loops and ? operator.
...
llvm-svn: 49356
2008-04-07 23:35:17 +00:00
Ted Kremenek
c0f15487c6
Fix analyzer breakage introduced by r49213: http://llvm.org/viewvc/llvm-project?rev=49213&view=rev
...
The problem is that some clients of gcc lookout at the stdout output of gcc;
this requires that all the analyzer diagnostics go to stderr to avoid polluting
stdout.
llvm-svn: 49355
2008-04-07 23:27:54 +00:00
Sam Bishop
e0680b7e7a
Pass the ASTContext object around when deserializing Decl and Stmt objects, so
...
they can be created using the same allocator as in the "from source code" case.
llvm-svn: 49353
2008-04-07 21:55:54 +00:00
Steve Naroff
fba3942438
Have Parser::FuzzyParseMicrosoftAsmStatement() return the null statement (';').
...
llvm-svn: 49349
2008-04-07 21:06:54 +00:00
Chris Lattner
4ba0cef93b
random whitespace fixes.
...
llvm-svn: 49328
2008-04-07 07:01:58 +00:00
Chris Lattner
fa00732562
fix a bug I introduced in my previous checkin.
...
llvm-svn: 49327
2008-04-07 06:58:21 +00:00
Chris Lattner
e6b27c6ecd
simplify array compatibility testing.
...
llvm-svn: 49326
2008-04-07 06:56:55 +00:00
Chris Lattner
7460fd297d
simplify reference handling.
...
llvm-svn: 49325
2008-04-07 06:52:53 +00:00
Chris Lattner
49af6a4beb
move some code around, no other change.
...
llvm-svn: 49324
2008-04-07 06:51:04 +00:00
Chris Lattner
ec646834e7
simplify compatibility testing for tag types.
...
llvm-svn: 49323
2008-04-07 06:49:41 +00:00
Chris Lattner
3c7961597f
merge compatibility testing of qualified/unqualified interfaces together
...
and fix a bug.
llvm-svn: 49322
2008-04-07 06:38:24 +00:00
Chris Lattner
64bf6ba308
Fix a really bad bug where type uniquing would merge a<x> with b<x> as the same
...
type, because it did not include a/b in the hash.
llvm-svn: 49321
2008-04-07 06:37:47 +00:00
Chris Lattner
c9062d01d7
MyOtherClass<MyProtocol>* is compatible with MyClass*
...
if MyClass is a superclass of MyOtherClass, there is no need for
an exact interface match.
llvm-svn: 49320
2008-04-07 06:06:56 +00:00
Chris Lattner
7bbd3d75ef
Remove a dead check for compatible builtin types
...
llvm-svn: 49319
2008-04-07 05:55:38 +00:00
Chris Lattner
90bef90ad4
futher simplify compatibility testing of objc interface types.
...
llvm-svn: 49318
2008-04-07 05:53:18 +00:00
Chris Lattner
9555466f7e
ocuvector and vector should be compatible. Fix ASQual compatibility.
...
llvm-svn: 49316
2008-04-07 05:43:21 +00:00
Chris Lattner
aee96c3a90
Fix comment typo, do reference eval at the correct type.
...
llvm-svn: 49315
2008-04-07 05:37:56 +00:00
Chris Lattner
f8a6b4d4fc
simplify vector type compatibility testing.
...
llvm-svn: 49314
2008-04-07 05:36:14 +00:00
Chris Lattner
2a3569b5d9
move ObjCQualifiedIdTypesAreCompatible out of ASTContext into Sema.
...
While it is similar to the other compatibility predicates in ASTContext,
it is not used by them and is different.
In addition, greatly simplify ObjCQualifiedIdTypesAreCompatible and
fix some canonical type bugs. Also, simplify my Type::getAsObjC* methods.
llvm-svn: 49313
2008-04-07 05:30:13 +00:00
Chris Lattner
ae947fe3f9
Replace an O(n^2) algorithm in areCompatObjCQualInterfaces with
...
an O(n) algorithm by taking advantage of the fact that the
protocol qualifier list is already guaranteed sorted.
llvm-svn: 49312
2008-04-07 05:05:41 +00:00
Chris Lattner
fde0761735
improve comments.
...
llvm-svn: 49311
2008-04-07 04:58:07 +00:00
Chris Lattner
e0ea37ace7
move sorting of qualifying protocols from the parser into
...
sema. This allows clients of the parser to have the unmolested
list if desired, and guarantees that noone can create an
ObjCQualifiedInterfaceType with an unsorted list.
llvm-svn: 49310
2008-04-07 04:56:42 +00:00
Chris Lattner
513494b32b
add an example.
...
llvm-svn: 49309
2008-04-07 04:47:29 +00:00
Chris Lattner
bd7981a978
eliminate getReferencedProtocols from
...
ObjCQualifiedIdType/ObjCQualifiedInterfaceType, adding an interator
interface instead.
llvm-svn: 49308
2008-04-07 04:44:08 +00:00
Chris Lattner
f96084ee73
make QualifiedInterfaceTypesAreCompatible a static function
...
and start simplifying it.
llvm-svn: 49307
2008-04-07 04:17:40 +00:00
Chris Lattner
ae1b6078e3
This predicate is just a generic "issuperclass" predicate, move it to the
...
ObjCInterfaceType as a method.
llvm-svn: 49306
2008-04-07 04:13:03 +00:00
Chris Lattner
ddfdaf9a69
Simplify some objc compatibility testing, make interfaceTypesAreCompatible
...
a static function named isCompatibleInterfaceAssign.
llvm-svn: 49305
2008-04-07 04:07:56 +00:00
Chris Lattner
f8c3e82897
simplify the logic in ASTContext::objcTypesAreCompatible
...
llvm-svn: 49302
2008-04-07 01:30:37 +00:00
Chris Lattner
ba5862e74c
clean up some logic in objc type handling. Specifically, make it so that
...
there are QualType::getAsObjc* type methods, and make isa<ObjCInterfaceType>
return true for ObjCQualifiedInterfaceType's.
llvm-svn: 49300
2008-04-07 00:27:04 +00:00
Chris Lattner
b9dfb03ddb
trivial changes to getFloatingTypeOfSizeWithinDomain, nothing significant.
...
llvm-svn: 49298
2008-04-06 23:58:54 +00:00
Chris Lattner
d4bacd68bf
simplify max type computation by making it return an integer (like
...
getFloatingTypeOrder) instead of a type. Fix a fixme.
llvm-svn: 49297
2008-04-06 23:55:33 +00:00
Chris Lattner
b90739d556
minor simplifications/cleanups to type comparisons.
...
llvm-svn: 49296
2008-04-06 23:38:49 +00:00
Chris Lattner
fc4379f916
remove the Decl::getCanonicalType() method.
...
llvm-svn: 49295
2008-04-06 23:10:54 +00:00
Chris Lattner
f1e4ec2898
remove a use of getCanonicalType.
...
llvm-svn: 49294
2008-04-06 23:09:52 +00:00
Chris Lattner
76a00cf3ff
Start switching clients over from CT.getCanonicalType() to Context.getCanonicalType(CT) for PR2189.
...
While I'm at it, clean up a bit of maxIntegerType.
llvm-svn: 49292
2008-04-06 22:59:24 +00:00
Chris Lattner
ed0d0795ff
introduce a new ASTContext::getCanonicalType method. This is the first
...
step towards fixing PR2189.
llvm-svn: 49291
2008-04-06 22:41:35 +00:00
Chris Lattner
56a7bf5a7e
remove the old non-parallel test system. 'make' in clang/test now runs
...
the tests in parallel.
llvm-svn: 49290
2008-04-06 22:32:01 +00:00
Chris Lattner
7d9b6a9d50
Use EnumType to simplify some code.
...
llvm-svn: 49289
2008-04-06 22:29:16 +00:00
Chris Lattner
8b23c25b21
make use of EnumType to simplify some code, eliminate warnings
...
when assertions are disabled.
llvm-svn: 49288
2008-04-06 22:05:18 +00:00
Chris Lattner
e07e912f5e
Make EnumType/RecordType classof predicates simpler and more efficient in
...
some cases.
llvm-svn: 49287
2008-04-06 22:04:54 +00:00
Chris Lattner
3fb61c1fbb
add a helper EnumType object for asking about tagtypes for enums.
...
llvm-svn: 49286
2008-04-06 21:58:47 +00:00
Gabor Greif
d36afd7d65
tracking API changes arising from r49277
...
llvm-svn: 49279
2008-04-06 20:42:52 +00:00
Chris Lattner
784903e4c1
move a semantic check out of the parser into sema.
...
llvm-svn: 49273
2008-04-06 07:49:57 +00:00
Chris Lattner
371ed4e7a9
now that identifier list parsing is split out, simplify handling of
...
normal typed argument lists.
llvm-svn: 49272
2008-04-06 06:57:35 +00:00
Chris Lattner
285a3e47be
reject 'int test(x, x) int x; {}'
...
llvm-svn: 49271
2008-04-06 06:50:56 +00:00
Chris Lattner
67b450cb48
reject 'typedef int y; int test(x, y)'.
...
llvm-svn: 49270
2008-04-06 06:47:48 +00:00
Chris Lattner
9186f556cc
simplify Parser::ParseFunctionDeclaratorIdentifierList
...
llvm-svn: 49269
2008-04-06 06:39:19 +00:00
Chris Lattner
6c940e6e6a
split parsing of identifier lists in function declarators out into
...
their own method.
llvm-svn: 49268
2008-04-06 06:34:08 +00:00
Chris Lattner
69740a60b6
minor simplification
...
llvm-svn: 49267
2008-04-06 06:03:03 +00:00
Chris Lattner
65dd843cb4
finish up throw parsing.
...
llvm-svn: 49266
2008-04-06 06:02:23 +00:00
Chris Lattner
c0a1c7d387
split code for handling grouping parens in declarators from code that
...
handles function argument parens in declarators.
llvm-svn: 49265
2008-04-06 05:45:57 +00:00
Chris Lattner
c439f0de6d
another minor simplification
...
llvm-svn: 49264
2008-04-06 05:27:21 +00:00
Chris Lattner
521ff2b430
Use token lookahead to simplify some code that is rarely executed.
...
Since it is rare, the cost is not significant and we enjoy the
simplification.
llvm-svn: 49263
2008-04-06 05:26:30 +00:00
Chris Lattner
713e6592be
Fix a bug I introduced in my const'ification patch.
...
llvm-svn: 49262
2008-04-06 05:25:03 +00:00
Chris Lattner
0a5ff0d34a
This patch contains these changes:
...
-Renamed ContextDecl -> DeclContext
-Removed DeclContext pointer from FieldDecl
-EnumDecl inherits from DeclContext, instead of TagDecl
Patch by Argiris Kirtzidis!
llvm-svn: 49261
2008-04-06 04:47:34 +00:00
Chris Lattner
e8e1e1131d
fix css font name, patch by Cédric Venet
...
llvm-svn: 49260
2008-04-06 04:37:21 +00:00
Chris Lattner
53adca6610
don't dereference hte end iterator when inserting at end of buffer.
...
Patch by Cédric Venet!
llvm-svn: 49259
2008-04-06 04:36:15 +00:00
Chris Lattner
1e830c07a2
templates can't be static.
...
llvm-svn: 49258
2008-04-06 04:22:39 +00:00
Chris Lattner
157dd0811e
fix a number of const qualification bugs.
...
llvm-svn: 49257
2008-04-06 04:11:27 +00:00
Chris Lattner
c4f02b6bed
add a missing #include
...
llvm-svn: 49256
2008-04-06 04:02:29 +00:00
Chris Lattner
9d51f2b9d4
Fix handling of implicit int, resolving PR2012 and reverting (and
...
subsuming) my patch for PR1999.
llvm-svn: 49251
2008-04-05 06:32:51 +00:00
Chris Lattner
94fc8063b4
Step #1 to fixing PR2012: c89 allows declspecs to be completely
...
missing from function definitions only. If we see a function
definiton with missing declspecs, just fudge in an int.
llvm-svn: 49250
2008-04-05 05:52:15 +00:00
Steve Naroff
4dbab8a49d
Avoid implicitly including any header files (requested by ckane).
...
llvm-svn: 49241
2008-04-04 22:58:22 +00:00
Steve Naroff
af91b9ae13
Rewrite @package (an ObjC 2.0 idiom).
...
llvm-svn: 49238
2008-04-04 22:34:24 +00:00
Steve Naroff
eae91700de
Fix MS-specific bug in RewriteTest::RewriteObjCMethodDecl().
...
llvm-svn: 49237
2008-04-04 22:23:44 +00:00
Steve Naroff
e421e97f1b
Add BugReporter.cpp to VC++ project file.
...
llvm-svn: 49233
2008-04-04 21:24:02 +00:00
Steve Naroff
a1f414517c
Support MS-specific integer suffixes (i8, i16, i32, i64, i128).
...
llvm-svn: 49229
2008-04-04 21:02:54 +00:00
Chris Lattner
579a05d767
Fix PR2049, updating Eli's patch that fixes to mainline. This produces incorrect
...
code, but the codegen doesn't crash. I'll file a bugzilla for the AST being wrong.
llvm-svn: 49226
2008-04-04 18:42:16 +00:00
Steve Naroff
c7d38433cd
Rename ScopedDecl::getContext() -> getContextDecl(). Two motivations:
...
#1 : To be consistent with FieldDecl::getContextDecl(), which serves the same purpose.
#2 : From my perspective, getContext() is too general (and used by several other classes for different purposes).
llvm-svn: 49224
2008-04-04 18:15:49 +00:00
Steve Naroff
8164ca61b1
Add DeclBase.h to Xcode project.
...
llvm-svn: 49223
2008-04-04 18:04:30 +00:00
Chris Lattner
f3bc75afcf
Since isComplexType() no longer returns true for _Complex integers, the code
...
generator needs to call isAnyComplexType(). This fixes PR1960.
llvm-svn: 49220
2008-04-04 16:54:41 +00:00
Chris Lattner
50ad37b6d9
add an isAnyComplexType() method, which returns true for both
...
integer and FP complexes.
llvm-svn: 49219
2008-04-04 16:51:46 +00:00
Chris Lattner
019193acea
updates from David.
...
llvm-svn: 49217
2008-04-04 15:59:59 +00:00
Chris Lattner
15c6b7c948
various bug fixes, add to xcode project.
...
llvm-svn: 49216
2008-04-04 15:47:22 +00:00
Chris Lattner
6175bbbee2
initial checkin of Étoilé runtime support, patch by David Chisnall
...
llvm-svn: 49215
2008-04-04 15:45:52 +00:00
Steve Naroff
3913ea4bfb
Add explicit support for diagnosing implicit function decls.
...
Without this, the diagnostic is very confusing. The diag is now consistent with gcc as well.
llvm-svn: 49214
2008-04-04 14:32:09 +00:00
Seo Sanghyeon
b7bf0f3e1e
- ccc: print generated command line to stdout instead of stderr
...
- ccc: quote shell metacharacters in command line to ease copy-and-paste
llvm-svn: 49213
2008-04-04 11:02:21 +00:00
Seo Sanghyeon
055c94f2f8
PR1963: Address of function is a constant expression
...
llvm-svn: 49212
2008-04-04 09:45:30 +00:00
Torok Edwin
602647aa70
fix build error: add missing braces.
...
llvm-svn: 49209
2008-04-04 06:16:25 +00:00
Chris Lattner
c5ffed4a66
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
llvm-svn: 49208
2008-04-04 06:12:32 +00:00
Chris Lattner
5506f8cf4c
Codegen assignment to self correctly, patch by David Chisnall!
...
llvm-svn: 49201
2008-04-04 04:07:35 +00:00
Nate Begeman
002e4bd158
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)
llvm-svn: 49199
2008-04-04 01:30:25 +00:00
Ted Kremenek
d1a2efadba
Added investigate patch for an occasionally failing assertion (heisenbug?)
...
llvm-svn: 49193
2008-04-03 21:44:24 +00:00
Ted Kremenek
bf191c76bd
Remove bogus check to prune out analyzing files.
...
llvm-svn: 49191
2008-04-03 21:29:11 +00:00
Ted Kremenek
4c32d1fcce
More reliably remove '\n' from queries of the location of ccc-analyzer
...
llvm-svn: 49189
2008-04-03 21:17:14 +00:00
Ted Kremenek
0dcd309044
Use full path to ccc-analyzer.
...
llvm-svn: 49187
2008-04-03 20:08:18 +00:00
Nate Begeman
11b6bb408e
Teach clang how to codegen punpcklbw and punpcklwd
...
llvm-svn: 49186
2008-04-03 19:58:06 +00:00
Ted Kremenek
d068813464
Make typedefs public.
...
llvm-svn: 49185
2008-04-03 19:52:45 +00:00
Ted Kremenek
10569cdd87
Better range highlight for undefined-argument checks.
...
llvm-svn: 49184
2008-04-03 18:52:25 +00:00
Ted Kremenek
5f5592062b
When reporting "bad receiver" warnings, highlight the receiver.
...
llvm-svn: 49183
2008-04-03 18:46:16 +00:00
Ted Kremenek
89575b7bcb
Use "getRanges" in default implementation of "getEndPath" to determine
...
the ranges of highlighted elements in the source code.
llvm-svn: 49181
2008-04-03 18:00:37 +00:00
Ted Kremenek
cb2dc8eca5
Hooked up GRSimpleAPICheck and the simple Objective-C Foundation checks to use
...
the new BugReporter interface.
llvm-svn: 49180
2008-04-03 17:57:38 +00:00
Ted Kremenek
c2546d6518
Mark nodes as sinks that GRAuditor says should be marked as sinks.
...
llvm-svn: 49179
2008-04-03 17:56:48 +00:00
Ted Kremenek
b5c8225320
Use logical line number for BUGLINE.
...
llvm-svn: 49178
2008-04-03 17:55:57 +00:00
Ted Kremenek
406192d163
Added "getLogicalLineNumber" and "getLogicalColumnNumber" to FullSourceLoc.
...
llvm-svn: 49177
2008-04-03 17:55:15 +00:00
Sam Bishop
30d70968fd
Remove handling of impossible "-?" option.
...
llvm-svn: 49161
2008-04-03 14:29:47 +00:00
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