Ted Kremenek
046845e842
Make CF retain diagnostics more succinct.
...
In a leak's "name", indicate GC or non-GC bugs.
llvm-svn: 50680
2008-05-05 23:16:31 +00:00
Ted Kremenek
f15cd14a3d
Emit dead store warnings for ++ and -- operators.
...
llvm-svn: 50679
2008-05-05 23:12:21 +00:00
Chris Lattner
4dd2710222
Fix rdar://5905347 a crash on invalid builtin, due to the
...
params not getting installed for builtins when synthesized.
llvm-svn: 50676
2008-05-05 22:18:14 +00:00
Ted Kremenek
00daccdd2a
Initial work on refactoring the CFRefCount checker so that it is more
...
generic and handles reference counts for NSObjects.
llvm-svn: 50674
2008-05-05 22:11:16 +00:00
Chris Lattner
00e2607de2
Add support for -Wimplicit-function-declaration, rdar://5907433
...
llvm-svn: 50672
2008-05-05 21:18:06 +00:00
Chris Lattner
ca2b318233
Fix typo, improve comment.
...
llvm-svn: 50666
2008-05-05 20:09:27 +00:00
Chris Lattner
db65ff7223
Fix a few more bugs in preprocessor expressions w.r.t. ?:. Now I
...
think it is really right. :) This fixes PR2284.
llvm-svn: 50665
2008-05-05 20:07:41 +00:00
Fariborz Jahanian
8d91686b0d
percolate @optional/@required protocols down to ASTs for
...
properties declared in the protocol.
llvm-svn: 50662
2008-05-05 18:51:55 +00:00
Ted Kremenek
627c3074dd
Improve leak diagnostics to not report a leak on the same line where
...
the object was last used. This can be confusing to users.
For example:
// 'y' is leaked
x = foo(y);
instead:
x = foo(y);
// 'y' is leaked
llvm-svn: 50661
2008-05-05 18:50:19 +00:00
Ted Kremenek
3917b82e85
Improved leak diagnostics.
...
llvm-svn: 50657
2008-05-05 17:53:17 +00:00
Ted Kremenek
875db81301
Minor refactorings/cleanups in CF retain checker and added support for NSMakeCollectable.
...
Added test case for NSMakeCollectable.
llvm-svn: 50653
2008-05-05 16:51:50 +00:00
Ted Kremenek
db04a9e967
When reporting branch conditions that evaluate to an uninitialized value,
...
highlight the most nested subexpression that appears most responsible (giving
the user better diagnostic feedback).
Updated test cases to illustrate this feature.
Implements: <rdar://problem/5880443>
llvm-svn: 50647
2008-05-05 15:56:53 +00:00
Chris Lattner
7f5b4fcafa
Fix a bug from when this was a pointer instead of vector.
...
llvm-svn: 50639
2008-05-05 07:03:40 +00:00
Chris Lattner
3565c8e343
Neil pointed out that clang doesn't generate ranges from diagnostics
...
related to pp-expressions. Doing so is pretty simple and this
patch implements it, yielding nice diagnostics like:
t.c:2:7: error: division by zero in preprocessor expression
#if 1 / (0 + 0)
~ ^ ~~~~~~~
t.c:5:14: error: expected ')' in preprocessor expression
#if (412 + 42
~~~~~~~~^
t.c:5:5: error: to match this '('
#if (412 + 42
^
t.c:10:10: warning: left side of operator converted from negative value to unsigned: -42 to 18446744073709551574
#if (-42 + 0U) / -2
~~~ ^ ~~
t.c:10:16: warning: right side of operator converted from negative value to unsigned: -2 to 18446744073709551614
#if (-42 + 0U) / -2
~~~~~~~~~~ ^ ~~
5 diagnostics generated.
llvm-svn: 50638
2008-05-05 06:45:50 +00:00
Chris Lattner
3c57f7ebab
fix a bug handling right associative operators that Neil noticed, hopefully
...
the final part of PR2279
llvm-svn: 50635
2008-05-05 04:10:51 +00:00
Chris Lattner
de977c0a5c
Fix PR2281: these two warnings should be promoted to error on
...
pedantic error. Perhaps I should add a class of 'extension' that is
'extension that warns by default', which would be cleaner.
llvm-svn: 50633
2008-05-04 23:52:02 +00:00
Chris Lattner
ca671b0e51
||/&& do not do UAC's either. This silences a bogus warning on #if -1 || 4U.
...
llvm-svn: 50632
2008-05-04 23:46:17 +00:00
Chris Lattner
4af72c76dd
Neil points out that commas don't do UACs either.
...
llvm-svn: 50631
2008-05-04 23:38:48 +00:00
Chris Lattner
d89e458ce0
Fix the rest of PR2279:
...
a) correct rejection of ',' in pp expressions.
b) the precedence of ',' was wrong w.r.t. ?:.
Thanks again to Neil for finding these and providing testcases.
llvm-svn: 50625
2008-05-04 18:36:18 +00:00
Chris Lattner
a08f869c22
Fix PR2279 part C: shifts don't perform the UACs, thanks to Neil
...
for pointing this out.
llvm-svn: 50624
2008-05-04 18:25:32 +00:00
Chris Lattner
1e151816b2
use simplified API for making fp constants.
...
llvm-svn: 50623
2008-05-04 18:23:51 +00:00
Chris Lattner
0a9718eab0
fix a nasty bug that Neil identifier in pp-expr parsing (this is PR2279 part D).
...
llvm-svn: 50617
2008-05-04 07:15:21 +00:00
Chris Lattner
7b9293ba20
Simplify FunctionDecl::AddRedeclaration a bit by using std::swap.
...
Fix 'swapping' of attributes to not insert null values into the
DeclAttrs map.
llvm-svn: 50612
2008-05-04 02:29:49 +00:00
Chris Lattner
bc22b5b327
if a decl is both 'static' and weak or static and inline, its linkage
...
type should be internal, not weak/linkonce.
llvm-svn: 50611
2008-05-04 01:44:26 +00:00
Chris Lattner
cfcabaeb7f
add testcase for pr2050 which is now fixed.
...
llvm-svn: 50610
2008-05-04 01:13:36 +00:00
Chris Lattner
c8cb4ca202
improve array type comments.
...
llvm-svn: 50609
2008-05-04 01:11:46 +00:00
Chris Lattner
033352b036
add a testcase
...
llvm-svn: 50608
2008-05-04 00:56:25 +00:00
Ted Kremenek
1108d6eef3
Remove debugging statement.
...
llvm-svn: 50598
2008-05-02 23:40:49 +00:00
Ted Kremenek
a5e2df015a
Rename member variable.
...
llvm-svn: 50597
2008-05-02 23:21:21 +00:00
Ted Kremenek
5f56cbbf7d
Output better paths to display in bug reports and compute a common
...
prefix for all files.
llvm-svn: 50592
2008-05-02 22:04:53 +00:00
Fariborz Jahanian
9964c9c64d
Another test case for properties in protocols.
...
llvm-svn: 50589
2008-05-02 21:09:40 +00:00
Ted Kremenek
983be7cee6
Improved diagnostics for leaks: now we report which variable was leaked.
...
llvm-svn: 50588
2008-05-02 20:53:50 +00:00
Fariborz Jahanian
98a6c4fa77
This patch is about merging ObjC2's properties declared in class
...
protocols into class's property list and performing semantics
on them for while doing so.
llvm-svn: 50587
2008-05-02 19:17:30 +00:00
Ted Kremenek
3b33e2544a
Fixed bug in ObjCIVarExpr: the child iterator now iterates over the Base expression.
...
llvm-svn: 50585
2008-05-02 18:40:22 +00:00
Ted Kremenek
789942cfda
When running the reference count checker twice (GC and non-GC mode), only emit
...
basic warnings (dead stores, null dereferences) on the first pass.
llvm-svn: 50584
2008-05-02 18:01:49 +00:00
Ted Kremenek
a06e7120bb
Bug fix in StmtPrinter to handle pretty-printing ObjCMessageExprs involving variadic methods (also did some cosmetic cleanups in the printing output).
...
llvm-svn: 50583
2008-05-02 17:32:38 +00:00
Ted Kremenek
86237c3774
testcase cleanup
...
llvm-svn: 50581
2008-05-02 17:14:07 +00:00
Ted Kremenek
5102a25bf8
Static analysis test case for noreturn on exceptions.
...
llvm-svn: 50580
2008-05-02 17:13:14 +00:00
Ted Kremenek
bb7386aff5
Really noreturn on exceptions.
...
llvm-svn: 50579
2008-05-02 17:12:56 +00:00
Ted Kremenek
0a87d5a0b3
Lexicographically order enum declarations in AttributeList::Kind.
...
llvm-svn: 50577
2008-05-02 16:50:46 +00:00
Ted Kremenek
63d76df236
Fix copy-paste bug.
...
llvm-svn: 50557
2008-05-01 23:38:35 +00:00
Ted Kremenek
2722f36465
Remove no longer valid assertion.
...
llvm-svn: 50556
2008-05-01 23:28:56 +00:00
Ted Kremenek
1097b4c61f
Added line number diagnostics to indicate the allocation site of the leaked object.
...
llvm-svn: 50553
2008-05-01 23:13:35 +00:00
Ted Kremenek
fabfb4677d
Do not highlight bogus ranges for leaks.
...
llvm-svn: 50549
2008-05-01 22:50:36 +00:00
Steve Naroff
f8ecff2a94
Replace Sema::CheckInitializerListTypes() with a helper class (InitListChecker) that synthesizes implicit InitListExpr's when appropriate (see InitListExpr comments in Expr.h for more details). I also moved the code to SemaInit.cpp, to help reduce clutter in SemaDecl.cpp.
...
NOTE: This work is incomplete and still fails many tests (as a result, it isn't enabled yet). Nevertheless, I wanted to check it in so I can work on it from home.
llvm-svn: 50544
2008-05-01 22:18:59 +00:00
Argyrios Kyrtzidis
2be96ae68b
Convert CRLF to LF.
...
llvm-svn: 50542
2008-05-01 21:44:34 +00:00
Ted Kremenek
8a56b06b5c
Correctly invalidate reference count state when passing objects by reference in message expressions we don't understand.
...
llvm-svn: 50541
2008-05-01 21:31:50 +00:00
Ted Kremenek
4f3d7cd12e
Add missing "-" that prefix arguments to forward to clang.
...
llvm-svn: 50540
2008-05-01 21:26:22 +00:00
Argyrios Kyrtzidis
694dda1e4e
Implicitly defined functions were getting the DeclContext of the function where they appeared, causing the bug: http://llvm.org/bugs/show_bug.cgi?id=2266 .
...
Fix it by making implicitly defined functions get the DeclContext of translation unit.
llvm-svn: 50538
2008-05-01 21:04:16 +00:00
Ted Kremenek
7f824734e0
Added temporary fix for Obj-C exception handling in the static analyzer: treat these as panic functions.
...
llvm-svn: 50535
2008-05-01 18:33:28 +00:00
Ted Kremenek
88f8ebdf76
Added default ctor to Selector.
...
REASON: Without a default ctor we cannot do "new Selector[xxx]" and similar
operations with ADTs that need to default constructor selectors.
llvm-svn: 50534
2008-05-01 18:32:59 +00:00
Ted Kremenek
f0b0f2edfe
Renamed static method.
...
llvm-svn: 50533
2008-05-01 18:31:44 +00:00
Fariborz Jahanian
f303bdabdf
Patch to match and issue diagnostics on property type mismatch.
...
llvm-svn: 50532
2008-05-01 18:05:01 +00:00
Ted Kremenek
b99d01269a
Added __assert_rtn to list of panic functions.
...
llvm-svn: 50530
2008-05-01 17:52:49 +00:00
Ted Kremenek
b8861a6ccf
Use pointer swizziling to unify in ObjCMessageExpr the receiver and classname "fields". This saves us a pointer.
...
Implemented serialization for ObjCMessageExpr.
llvm-svn: 50528
2008-05-01 17:26:20 +00:00
Ted Kremenek
ed36e4b9a4
Added ziperr as a panic function. Eventually inter-procedural analysis
...
should catch this one easily.
llvm-svn: 50526
2008-05-01 15:55:59 +00:00
Ted Kremenek
aec2b6e360
Added comments to ObjCMessageExpr.
...
llvm-svn: 50525
2008-05-01 15:55:24 +00:00
Ted Kremenek
9f696852c4
When processing "release", "retain", and "autorelease" messages return the
...
lval passed as an argument.
Fix: Inverted diagnostic messages.
llvm-svn: 50513
2008-05-01 04:02:04 +00:00
Ted Kremenek
4828aa3152
Added support for "autorelease" message in CF ref. count checker.
...
llvm-svn: 50512
2008-05-01 02:18:37 +00:00
Steve Naroff
20348b5653
Extend InitListExpr API/IMPL to support arbitrary add/remove (in support of the initializer rewrite I am doing).
...
llvm-svn: 50511
2008-05-01 02:04:18 +00:00
Fariborz Jahanian
7cf18862c2
More ObjC2 property semantics work. Work in progress.
...
llvm-svn: 50508
2008-05-01 00:03:38 +00:00
Ted Kremenek
b0f87c48cb
added preliminary diagnostics in scan-build results to denote whether
...
a CF memory leak occurred with GC enabled, etc.
llvm-svn: 50507
2008-04-30 23:47:44 +00:00
Ted Kremenek
0ae9ed7fab
scan-build: Disable distributed builds for xcodebuild
...
llvm-svn: 50506
2008-04-30 23:47:12 +00:00
Ted Kremenek
f20e2285c9
More cleanups with ObjCQualifiedIdType in the static analyzer.
...
llvm-svn: 50503
2008-04-30 22:48:21 +00:00
Ted Kremenek
a16dacb6aa
Add placeholder code in the static analyzer for MemberExprs involving struct temporaries.
...
llvm-svn: 50502
2008-04-30 22:17:15 +00:00
Ted Kremenek
ca67cab1e8
Add workaround for __builtin_offsetof in the static analyzer.
...
llvm-svn: 50500
2008-04-30 21:45:55 +00:00
Ted Kremenek
99057462aa
Provide SizeOfAlignTypeExpr workaround in the static analyzer for taking the sizeof of a ObjCInterfaceType.
...
llvm-svn: 50499
2008-04-30 21:31:12 +00:00
Ted Kremenek
e0e8b535cf
Support implicit casts from pointers to references.
...
llvm-svn: 50498
2008-04-30 21:10:19 +00:00
Ted Kremenek
84dea154fc
When creating LVals for array entries, canonicalize entries with a 0 index.
...
llvm-svn: 50497
2008-04-30 21:05:35 +00:00
Ted Kremenek
20d8006e93
Teach more of the static analyzer about ObjCQualifiedIdType.
...
llvm-svn: 50494
2008-04-30 20:17:27 +00:00
Ted Kremenek
0940b99e3b
Teach the static analysis engine about ObjCQualifiedIdType.
...
llvm-svn: 50493
2008-04-30 20:01:29 +00:00
Ted Kremenek
5ce35cc514
Add conjured symbols for decl initializations.
...
Add db_error as panic function.
llvm-svn: 50489
2008-04-30 17:54:04 +00:00
Ted Kremenek
39a736f723
Handle lval::ArrayOffset and lval::FieldOffset in EvalNE and EvalEQ.
...
llvm-svn: 50486
2008-04-30 16:07:22 +00:00
Chris Lattner
dd477ce32b
Verify the whole module after codegen to catch silly IR bugs.
...
llvm-svn: 50485
2008-04-30 16:05:42 +00:00
Chris Lattner
e16406d2b1
fix 'var unused' warning.
...
llvm-svn: 50484
2008-04-30 16:04:01 +00:00
Ted Kremenek
772d9f0aae
Added test case for the static analyzer.
...
llvm-svn: 50467
2008-04-30 04:40:48 +00:00
Ted Kremenek
5cc9e60a5f
Invalidate old subexpression bindings when binding UnknownVal.
...
llvm-svn: 50466
2008-04-30 04:23:07 +00:00
Ted Kremenek
9700bd42f0
Simplify RemoveDeadBindings.
...
llvm-svn: 50458
2008-04-29 23:58:03 +00:00
Ted Kremenek
10bad41159
Added test case to test null dereference checking with lval::ArrayOffset.
...
llvm-svn: 50454
2008-04-29 23:25:09 +00:00
Ted Kremenek
10246e8bfa
Add lval::ArrayOffset, which represent the locations of entries in an array.
...
llvm-svn: 50453
2008-04-29 23:24:44 +00:00
Fariborz Jahanian
2dfcec129f
Default visbility for instance variables is protected.
...
Patch by Emerson Murhpy-Hill.
llvm-svn: 50452
2008-04-29 23:03:51 +00:00
Ted Kremenek
0d2ccffa83
Added lval::FieldOffset, which represents symbolic lvalues for field offsets from other Lvalues.
...
This removes the failure in null-deref-ps.c (test suite).
llvm-svn: 50449
2008-04-29 22:17:41 +00:00
Ted Kremenek
fa5a3d0fe7
Major rewrite/refactoring of static analysis engine. We now use
...
EvalStore/EvalLoad to handle all loads/stores from symbolic memory, allowing us
to do checks for null dereferences, etc., at any arbitrary load/store (these
were missed checks before). This also resulted in some major cleanups, some
conceptual, and others just in the structure of the code.
This temporarily introduces a regression in the test suite (null-deref-ps.c)
before I add a new LVal type for structure fields.
llvm-svn: 50443
2008-04-29 21:04:26 +00:00
Ted Kremenek
a8197366db
Pass fobjc-gc-only and fobjc-gc options down to clang.
...
llvm-svn: 50426
2008-04-29 16:24:23 +00:00
Ted Kremenek
a374ea9a35
Update typestate logic to support GC-mode.
...
llvm-svn: 50396
2008-04-29 05:44:10 +00:00
Ted Kremenek
4b7ca776cf
Implement semantics of CFMakeCollectable for the CF-reference count checker.
...
llvm-svn: 50395
2008-04-29 05:33:51 +00:00
Ted Kremenek
4d1f422c6f
Provide the option to run the CF-retain checker in GC enabled mode.
...
The transfer functions for the checker don't do anything special yet in GC mode.
llvm-svn: 50394
2008-04-29 05:13:59 +00:00
Ted Kremenek
25a3b878e5
Convert CFLF to LF. CRLF was causing this test to fail under Mac OS X.
...
llvm-svn: 50388
2008-04-29 04:43:50 +00:00
Ted Kremenek
d796c18d7b
Add -fobjc-gc and -fobjc-gc-only options to the driver.
...
Add corresponding enum in LangOptions.
llvm-svn: 50387
2008-04-29 04:37:03 +00:00
Ted Kremenek
6065ef6b9b
Bug fix in CFG::getBlockEdgeImpl(): Use a BumpPtrAllocator to allocate
...
std::pair<CFGBlock*, CFGBlock*> that have an 8-byte alignment for use with
ProgramPoint. This fixes a bug reported by Argiris where using std::set<> on
Windows would result in a 4-byte alignment, not an 8-byte alignment.
Fixes: <rdar://problem/5892265>
llvm-svn: 50364
2008-04-28 18:00:46 +00:00
Argyrios Kyrtzidis
8eab584388
Call ExitScope before ActOnFinishNamespaceDef.
...
This is the same for functions and it's preferable to have the namespace as DeclContext during ActOnPopScope.
llvm-svn: 50322
2008-04-27 14:10:57 +00:00
Argyrios Kyrtzidis
081148986a
Parsing of namespaces:
...
-NamespaceDecl for the AST
-Checks for name clashes between namespaces and tag/normal declarations.
This commit doesn't implement proper name lookup for namespaces.
llvm-svn: 50321
2008-04-27 13:50:30 +00:00
Argyrios Kyrtzidis
ed1eec4812
Use PushOnScopeChains to introduce a decl into scope.
...
llvm-svn: 50320
2008-04-27 13:30:35 +00:00
Argyrios Kyrtzidis
fa2d2f2886
Make assertions for all addresses passed to ProgramPoint that they have at least an 8-byte alignment.
...
llvm-svn: 50310
2008-04-26 15:19:51 +00:00
Ted Kremenek
e5aa10cec4
Pass down more -iXXX options that clang supports
...
llvm-svn: 50304
2008-04-25 21:28:20 +00:00
Ted Kremenek
d71ba91a7d
fix broken tag
...
llvm-svn: 50299
2008-04-25 20:31:58 +00:00
Ted Kremenek
c7dde7a25b
Another link fix.
...
llvm-svn: 50298
2008-04-25 20:30:34 +00:00
Ted Kremenek
d6db434162
Fix links.
...
llvm-svn: 50297
2008-04-25 20:29:37 +00:00
Ted Kremenek
dd38e0bd0d
Fix bug in BugReporter where we didn't handle emitting diagnostics for
...
empty CFGBlocks that only contained a terminator.
Added improved diagnostics for break and continue statements and default branches in switch statements.
This fixes <rdar://problem/5889244>.
llvm-svn: 50286
2008-04-25 19:01:27 +00:00
Ted Kremenek
6d2eeddff5
Added some notes about the LLVM "checker". This isn't a public link yet; still refining.
...
llvm-svn: 50283
2008-04-25 18:44:36 +00:00
Chris Lattner
73669defed
remove the 'unused static' diagnostic from codegen. This should be
...
reimplemented in Sema someday. This is tracked in PR2236. Until then
disabling it removes some bogus diagnostics (see 2236).
llvm-svn: 50263
2008-04-25 15:47:13 +00:00
Nuno Lopes
0276933b4b
initial support for recognizing __transparent_union__ attributes
...
comments on the ML will follow
llvm-svn: 50262
2008-04-25 09:32:00 +00:00
Ted Kremenek
99131c9f5a
Handle dereferences of function pointers (which return a handle to the function).
...
llvm-svn: 50246
2008-04-25 01:56:50 +00:00
Ted Kremenek
2e5092320e
Don't abort on GetRVal when the LVal is a StringLiteralVal.
...
llvm-svn: 50245
2008-04-25 01:45:38 +00:00
Ted Kremenek
4dd412e022
Don't emit empty strings for path diagnostics when taking the default branch of a switch statement that has no label.
...
llvm-svn: 50242
2008-04-25 01:29:56 +00:00
Ted Kremenek
ecbdf75049
Do a better job at computing dead symbols.
...
Implemented support for better localized leaks in the CF reference count checker.
Now leaks should be flagged close to where they occur.
This should implement the desired functionality in <rdar://problem/5879592>, although the diagnostics still need to be improved.
llvm-svn: 50241
2008-04-25 01:25:15 +00:00
Ted Kremenek
b0daf2f6f5
Add preliminary support for flagging leaks around when they happen (doesn't work yet).
...
llvm-svn: 50237
2008-04-24 23:57:27 +00:00
Ted Kremenek
64fa3beccc
Better handling for directory names in HTML diagnostics. Work in progress.
...
llvm-svn: 50234
2008-04-24 23:37:03 +00:00
Ted Kremenek
ae8014cb7e
More boilerplate for handling specialized-transfer function logic for dead symbols.
...
llvm-svn: 50233
2008-04-24 23:35:58 +00:00
Fariborz Jahanian
0a070ff570
Patch to diagnose inconsistancies between properties declared in current and
...
its super class. This patch is incomplete.
llvm-svn: 50228
2008-04-24 19:58:34 +00:00
Ted Kremenek
3812b7676c
Added initial boilerplate in GRExprEngine to allow checker-specific transfer
...
function logic to act when symbols become dead.
llvm-svn: 50221
2008-04-24 18:31:42 +00:00
Ted Kremenek
6e06f91085
Added uninitialized-values (path-sensitive) test case as a regression test
...
for the fix in r50178 (http://llvm.org/viewvc/llvm-project?rev=50178&view=rev ).
This fix was for <rdar://problem/5881148>.
llvm-svn: 50220
2008-04-24 18:28:14 +00:00
Ted Kremenek
78120c8b3a
Added test case for functionality fix in rdar://problem/5886141 (handle variadic CF Create functions).
...
llvm-svn: 50219
2008-04-24 18:17:14 +00:00
Ted Kremenek
f7141597e8
CF reference count checker: handle variadic functions that allocate CF objects.
...
This fixes <rdar://problem/5886141>.
Part of this change resulted in creating sparser summaries. I also added
some more comments and did some minor code cleanups.
llvm-svn: 50214
2008-04-24 17:22:33 +00:00
Ted Kremenek
b44485b835
Have ValidateOutputConstraint return false instead of firing an assertion
...
when processing a constraint we don't understand. This allows the frontend
to gracefully fail.
llvm-svn: 50213
2008-04-24 16:36:38 +00:00
Ted Kremenek
21bf6006b0
For case statements involving enums, BugReporter now generates PathDiagnostics
...
that say that we are jumping to "case a" instead of "case 0".
This is a feature implementation for <rdar://problem/5880430>.
llvm-svn: 50197
2008-04-23 23:35:07 +00:00
Ted Kremenek
05e6267466
Fix minor regression in bug report generation.
...
llvm-svn: 50195
2008-04-23 23:04:32 +00:00
Ted Kremenek
f26bc55b9a
When building PathDiagnostics for bug reports, generate a trimmed ExplodedGraph with a single path that BugReport objects can safely walk and introspect.
...
llvm-svn: 50194
2008-04-23 23:02:12 +00:00
Ted Kremenek
dd43aeee54
Fixed: <rdar://problem/5881148>
...
Problem:
In the recently refactored VisitDeref (which processes dereferences), we
were incorrectly skipping the node just generated for the subexpression
of the dereference. This was a horrible regression.
llvm-svn: 50176
2008-04-23 20:12:28 +00:00
Ted Kremenek
467297ab48
TranslationUnit now owns IdentifierTable, TargetInfo, and Selectors objects
...
when it is constructed via deserialization. This is done by recording a flag
indicating that this is the case, and it deletes these objects by getting
the references stored in the ASTContext object. This fixes some memory
leaks that occurs when we deserialize translation units from bitcode files.
The rationale between having TranslationUnit sometimes own these objects and
sometimes not is that a TranslationUnit object can be constructed from
state generated by the parser (Preprocessor; semantic analyzer, etc.), and thus
in these cases won't own the IdentifierTable or Selectors, etc. During
deserialization, there is no Preprocessor, so somebody needs to own these
objects in order for them to be properly reclaimed.
llvm-svn: 50149
2008-04-23 16:25:39 +00:00
Ted Kremenek
d2419a0730
Remove false path where the default branch in a switch statement would
...
always be taken even if it was not feasible.
llvm-svn: 50132
2008-04-23 05:03:18 +00:00
Chris Lattner
68a27fac9d
fix a rewriter crash on zero length files.
...
llvm-svn: 50126
2008-04-23 03:21:50 +00:00
Ted Kremenek
ef9af73887
Added panic function "assfail".
...
llvm-svn: 50119
2008-04-23 00:41:25 +00:00
Fariborz Jahanian
6efdf1ddab
Patch to build AST for property implementation declarations and
...
to print declaration from its AST.
llvm-svn: 50117
2008-04-23 00:06:01 +00:00
Ted Kremenek
0224ac57e0
For default branches in switch statements with no default label, print out
...
the line we are going to.
llvm-svn: 50113
2008-04-22 22:29:46 +00:00
Ted Kremenek
3b42715930
Rewrote VisitDeclStmt to properly handle initializers that can do anything.
...
llvm-svn: 50112
2008-04-22 22:25:27 +00:00
Ted Kremenek
c79c0591d6
Added lval type (and tracking) for StringLiterals.
...
llvm-svn: 50109
2008-04-22 21:39:21 +00:00
Ted Kremenek
eccf3e5821
Added "nonlval::LValAsInteger" to represent abstract LVals casted to integers, allowing us to track lvals when they are casted back to pointers.
...
llvm-svn: 50108
2008-04-22 21:10:18 +00:00
Chris Lattner
bec41348e2
"This patch renames
...
DeclContext *CtxDecl -> DeclContext *DeclCtx
DeclContext *CD -> DeclContext *DC
It makes the code more consistent."
Patch by Zhongxing Xu!
llvm-svn: 50105
2008-04-22 18:39:57 +00:00
Ted Kremenek
9718c9e8ee
PathDiagnosticClients now retain ownership of passed PathDiagnostics, requiring
...
them to not be stack-allocated.
HTMLDiagnostics now batches PathDiagnostics before emitting HTML in its dtor.
This is a workaround for a problem when we trampled the Preprocessor state
when highlighting macros (sometimes resulting in an assertion failure).
llvm-svn: 50102
2008-04-22 16:15:03 +00:00
Argyrios Kyrtzidis
901a4e406b
Use back() instead of end()-1
...
llvm-svn: 50098
2008-04-22 07:37:18 +00:00
Ted Kremenek
80f2c111bd
Added panic function "dtrace_assfail".
...
llvm-svn: 50091
2008-04-22 06:09:33 +00:00
Ted Kremenek
24d4888a85
Add VisitArraySubscriptExpr.
...
llvm-svn: 50090
2008-04-22 05:40:28 +00:00
Ted Kremenek
a2cca7dbdf
Hardcode "Assert" as a no-return function (panic).
...
llvm-svn: 50089
2008-04-22 05:37:33 +00:00
Nate Begeman
2908fa0715
Add some basic ARM asm constraints
...
llvm-svn: 50085
2008-04-22 05:03:19 +00:00
Ted Kremenek
6fdd3b35dc
Added null dereference test involving arrays.
...
llvm-svn: 50084
2008-04-22 04:56:55 +00:00
Ted Kremenek
da5cdda248
Added null-dereference check for ArraySubscriptExpr.
...
llvm-svn: 50083
2008-04-22 04:56:29 +00:00
Nate Begeman
f0168bd208
Don't double-increment counter for -arch and -isysroot
...
llvm-svn: 50082
2008-04-22 04:47:32 +00:00
Fariborz Jahanian
a591a12ea5
Allow property in base class to be implemented in a
...
derived class.
llvm-svn: 50074
2008-04-21 23:57:08 +00:00
Ted Kremenek
efa92f1dfc
Added missing expected-warning.
...
llvm-svn: 50073
2008-04-21 23:45:26 +00:00
Ted Kremenek
503924bb9c
Added null dereference test case looking for null dereferences involving MemberExpr.
...
llvm-svn: 50072
2008-04-21 23:44:17 +00:00
Ted Kremenek
38213f9573
Added support for detected bad dereferences involving MemberExprs, e.g. x->f where "x" is NULL.
...
llvm-svn: 50071
2008-04-21 23:43:38 +00:00
Ted Kremenek
405cf2daf9
Remove unused "verbose" argument to compile(). Also unbreaks ccc-analyzer.
...
llvm-svn: 50066
2008-04-21 21:58:05 +00:00
Fariborz Jahanian
c6bec7b6dc
More semantics checks of properties. Property implementation can implicitly use
...
ivar of same name.
Better diagnostics to bring home this point.
llvm-svn: 50065
2008-04-21 21:57:36 +00:00
Fariborz Jahanian
f2a7d7c949
Support for @dynamic AST build.
...
More property semantics checking.
First test case for ObjC2's property implementation.
llvm-svn: 50057
2008-04-21 21:05:54 +00:00
Ted Kremenek
74a58d780a
Pass "-arch" down to clang.
...
llvm-svn: 50056
2008-04-21 20:28:01 +00:00
Chris Lattner
0dcd9aa8fd
Fix pasto, thanks to Anders for pointing this out.
...
llvm-svn: 50055
2008-04-21 20:19:54 +00:00
Fariborz Jahanian
a054e99fa8
Continuation of work on ObjC2's properties.
...
Added iterators, methods to find property and categories.
Use them in doing semantic analysis on property implementation
declarations. Fixed typos.
llvm-svn: 50050
2008-04-21 19:04:53 +00:00
Chris Lattner
17df24e736
add arm support
...
llvm-svn: 50049
2008-04-21 18:56:49 +00:00
Douglas Gregor
89f238cbe1
Clean up handling of function redeclarations
...
llvm-svn: 50021
2008-04-21 02:02:58 +00:00
Ted Kremenek
5fa90e49a9
Fix improper dereference of end() iterator. Patch by Argiris Kirtzidis!
...
llvm-svn: 50012
2008-04-20 23:54:24 +00:00
Nate Begeman
1c906206b8
Fix PR2236
...
Add test
Implement feedback from Chris re: PR1998
llvm-svn: 50001
2008-04-20 20:38:08 +00:00
Chris Lattner
14cd1ee95f
Two improvements to initializer parsing:
...
1. If we hit a semantic error, try harder to recover to emit
diagnostics for later initializer errors (PR2241).
2. Don't leak parsed initializers on an error.
llvm-svn: 49998
2008-04-20 19:07:56 +00:00
Chris Lattner
4885b97664
for exponent-related errors, emit the diagnostic on the 'e' or 'p'.
...
llvm-svn: 49997
2008-04-20 18:47:55 +00:00
Chris Lattner
48a9b9beeb
when emitting diagnostics about some character in a numeric
...
literal, indicate what character the error is about or where
it would be. For example:
pr2241.c:1:17: error: exponent has no digits
float f[] = { 1e , 1ee0 };
^
llvm-svn: 49996
2008-04-20 18:41:46 +00:00
Nate Begeman
8e8d498d34
Only generate code for static functions and global variables that are actually used.
...
Warn about unused static functions and variables.
This fixes PR1998.
llvm-svn: 49987
2008-04-20 06:29:50 +00:00
Chris Lattner
2cc4e23252
Restructure and simplify Sema::ObjCQualifiedIdTypesAreCompatible,
...
deleting dead code, making other code more obvious, and fixing a
bug. This fixes these (bogus) warnings in release mode:
SemaExprObjC.cpp:383: warning: 'RHSProtoE' may be used uninitialized in this function
SemaExprObjC.cpp:383: warning: 'RHSProtoI' may be used uninitialized in this function
llvm-svn: 49984
2008-04-20 02:09:31 +00:00
Ted Kremenek
076d13387d
html::EscapeText (using the Rewriter) now replaces tabs by default.
...
llvm-svn: 49982
2008-04-20 01:02:33 +00:00
Chris Lattner
ff2367c0c9
implement a fixme, add support for ++/-- on long double.
...
llvm-svn: 49980
2008-04-20 00:50:39 +00:00
Chris Lattner
1886e71e47
use simplified ConstantFP:get method.
...
llvm-svn: 49979
2008-04-20 00:45:53 +00:00
Chris Lattner
1e517a78a8
replace form feeds with an <hr> tag.
...
llvm-svn: 49975
2008-04-19 23:56:30 +00:00
Chris Lattner
1a44f7fce9
simplify the return of InitializePreprocessor to be bool instead of a fileid
...
llvm-svn: 49974
2008-04-19 23:25:44 +00:00
Chris Lattner
ba1f37bfdf
simplify ownership of the predefines buffer.
...
llvm-svn: 49973
2008-04-19 23:09:31 +00:00
Ted Kremenek
575f24ef73
Gracefully handle when the receiver of a message expression is not a pointer type.
...
llvm-svn: 49959
2008-04-19 19:12:50 +00:00
Ted Kremenek
31d2176d1e
Pass "-isysroot" option down to clang.
...
llvm-svn: 49956
2008-04-19 18:42:26 +00:00
Ted Kremenek
6267835f57
Fix spelling/grammar in comment.
...
llvm-svn: 49955
2008-04-19 18:07:44 +00:00
Ted Kremenek
b0fa31cefb
Use Digest::MD5 (a Perl module that should come bundled standard with Perl) to compute file digests instead of using the external program "sha1sum" (which may not be present).
...
llvm-svn: 49954
2008-04-19 18:05:48 +00:00
Nate Begeman
faae081131
Generate code for annotation attributes.
...
llvm-svn: 49951
2008-04-19 04:17:09 +00:00
Nate Begeman
7fab578b0d
Add support to module codegen for adding and emitting annotations
...
llvm-svn: 49944
2008-04-18 23:43:57 +00:00
Nate Begeman
46bd037c07
Ignore qualifiers when attempting to match arguments to parameter types for
...
__builtin_overload
llvm-svn: 49943
2008-04-18 23:35:14 +00:00
Nate Begeman
ce4d7fce6b
OCUVector -> ExtVector, shorthand for extended vector, per feedback from Chris.
...
llvm-svn: 49942
2008-04-18 23:10:10 +00:00
Ted Kremenek
423edc2384
Another bug fix in emitting warnings without a path: construct a unit PathDiagnostic as we did
...
before. This allows the HTMLDiagnostic object to retrieve the bug type, bug description, etc.
llvm-svn: 49939
2008-04-18 22:56:53 +00:00
Nuno Lopes
42dd577238
fix __attribute__(format) for struct function pointer fields
...
llvm-svn: 49938
2008-04-18 22:43:39 +00:00
Steve Naroff
472cf88ef2
Remove bogus cast (<rdar://problem/5874848> clang objc-rewriter: structure with list of protocols has wrong cast).
...
llvm-svn: 49935
2008-04-18 22:15:15 +00:00
Ted Kremenek
bf27dc9659
Reenable using the PathDiagnosticClient for BugReports without paths.
...
llvm-svn: 49934
2008-04-18 22:11:59 +00:00
Ted Kremenek
cf9e9c5554
Use 'clang' binary in the same dir as scan-build; if it isn't there use the one in the path
...
llvm-svn: 49933
2008-04-18 22:00:56 +00:00
Steve Naroff
24840f6748
Implement FIXME discoved by <rdar://problem/5874876> Rewriter: Explicit ivar refs outside a method are being rewritten
...
llvm-svn: 49932
2008-04-18 21:55:08 +00:00
Ted Kremenek
8886b3021e
Turn on CF reference count checker.
...
llvm-svn: 49931
2008-04-18 21:53:01 +00:00
Steve Naroff
dcdcdcdfef
Fix <rdar://problem/5874697> Rewriter: method arguments with complex types not being rewritten properly.
...
llvm-svn: 49925
2008-04-18 21:13:19 +00:00
Ted Kremenek
31484b2477
Generalize caching mechanism for bugs reports. Now individual BugTypes
...
can decide the policy on how to cache related bugs. This allows us to
properly to handle warning about multiple leaks in the same location in the
ref count checker (not yet done).
llvm-svn: 49918
2008-04-18 20:54:29 +00:00
Ted Kremenek
c072b820cf
Fixed more caching bugs related to the one fixed in r49914. Silence
...
compiler warning introduced by a recent patch of mine.
llvm-svn: 49917
2008-04-18 20:35:30 +00:00
Ted Kremenek
acefba896c
Fixed elusive caching bug that led to false positives.
...
llvm-svn: 49914
2008-04-18 19:34:16 +00:00
Ted Kremenek
4d83728a57
Added "GetErrorNodes()" to BugType so that -trim-egraph can recognize errors
...
from registered BugTypes. This helps with debugging.
Add detection of NULL values in ref count checker; this suppresses false positives.
llvm-svn: 49912
2008-04-18 19:23:43 +00:00
Ted Kremenek
3388381993
Added "EvalAssume" virtual method to GRTransferFuncs; this is for evaluating
...
the checker-specific logic of symbolic assumptions.
llvm-svn: 49910
2008-04-18 17:20:23 +00:00
Nate Begeman
65bea23674
Tabs -> spaces
...
llvm-svn: 49909
2008-04-18 17:17:24 +00:00
Ted Kremenek
532ba14fdb
Spelling fix.
...
llvm-svn: 49908
2008-04-18 16:58:34 +00:00
Ted Kremenek
d004c418b6
Fixed bug in GREndPathNodeBuilder: only return a node if it wasn't in the node cache.
...
llvm-svn: 49907
2008-04-18 16:30:14 +00:00
Ted Kremenek
b06817e914
scan-build now fixes permissions of report files and directories, which may
...
be created as "temporary files" that are not world readable.
llvm-svn: 49904
2008-04-18 15:18:20 +00:00
Ted Kremenek
4bf02a0856
Compute a digest of each report file, and nuke reports that have the same
...
digest as a file already added to the index. This a workaround for the
analyzer analyzing the same file more than once, which can happen when building
multiple targets.
llvm-svn: 49903
2008-04-18 15:09:30 +00:00
Nate Begeman
c00bed3871
Initialize default double width and alignment
...
llvm-svn: 49899
2008-04-18 05:49:49 +00:00
Nate Begeman
26ed25253e
Allow targets to override double size, alignment, and semantics, and tie this
...
information into the IR type codegen. This allows a target to codegen the C
'double' type as either double or float.
llvm-svn: 49898
2008-04-18 05:41:31 +00:00
Ted Kremenek
71c41d9561
Restore macro expansion for HTMLPrint by using the original Preprocessor.
...
This is a workaround until we figure out why a freshly create Preprocessor
doesn't expand macros from headers.
llvm-svn: 49897
2008-04-18 05:35:23 +00:00
Ted Kremenek
a960be4bd4
Provide a version of html::HighlightMacros that takes a Preprocessor&.
...
llvm-svn: 49896
2008-04-18 05:34:33 +00:00
Ted Kremenek
f03e07c34d
More grammar fixes.
...
llvm-svn: 49895
2008-04-18 05:32:44 +00:00
Ted Kremenek
ca8892b456
Fix plurality debacle.
...
llvm-svn: 49894
2008-04-18 05:13:26 +00:00
Ted Kremenek
9e48b0c4ed
Fixed range highlighting bug in HTML diagnostics.
...
llvm-svn: 49893
2008-04-18 05:01:33 +00:00
Ted Kremenek
40d601f958
Added path diagnostics for reference counts.
...
llvm-svn: 49892
2008-04-18 04:55:01 +00:00
Chris Lattner
4bbd164a7a
Make tab insertion really right: the number of spaces inserted
...
depends on the column number of the start of the tab.
llvm-svn: 49891
2008-04-18 04:54:20 +00:00
Ted Kremenek
c88fb63da0
Several Expr subclasses did not mark "getSourceRange()" virtual. Fixed.
...
llvm-svn: 49890
2008-04-18 04:18:16 +00:00
Ted Kremenek
396f43620f
BugReport::VisitNode now takes BugReporter& instead of ASTContext&.
...
Shuffled around code in CFRefCount to better pair classes with implementation,
and started adding subclasses of RangedBugReport to handle better diagnostics
for reference count bugs.
llvm-svn: 49889
2008-04-18 03:39:05 +00:00
Ted Kremenek
a3d02636ef
Use HTML5 doctype when generating HTML.
...
llvm-svn: 49888
2008-04-18 03:37:38 +00:00
Ted Kremenek
89e6a9b98c
Added null check.
...
llvm-svn: 49887
2008-04-18 02:24:50 +00:00
Ted Kremenek
a821e087de
Updated CSS colors. Patch by Cedric Venet!
...
llvm-svn: 49886
2008-04-18 02:12:39 +00:00
Ted Kremenek
217e9bff2b
Added test cases to test for reference count leaks.
...
llvm-svn: 49885
2008-04-18 02:00:02 +00:00
Ted Kremenek
cffe635699
Simplified internal logic of BugReporter, consolidating EmitWarning and
...
EmitPathWarning into one method. We now properly handle emitting warnings
without a PathDiagnosticClient when the warning does not involve a particular
statement.
llvm-svn: 49884
2008-04-18 01:56:37 +00:00
Fariborz Jahanian
d83bdd3841
Fixed a bug in categories and properties.
...
llvm-svn: 49883
2008-04-18 00:30:47 +00:00
Fariborz Jahanian
ffe97a3925
Initial work for property implementation declarations.
...
Mostly semantic checking in this patch. This is on going
and incomplete.
llvm-svn: 49882
2008-04-18 00:19:30 +00:00
Steve Naroff
be89ba0c38
Update VC++ project files.
...
llvm-svn: 49881
2008-04-17 23:51:38 +00:00
Ted Kremenek
69049c272f
Modified BugReport::getEndPath() to handle the case where end path is at
...
the exit block of the CFG.
llvm-svn: 49880
2008-04-17 23:44:37 +00:00
Ted Kremenek
cc0951bde1
Hook up reporting reference count memory leaks to the BugReporter mechanism.
...
llvm-svn: 49879
2008-04-17 23:43:50 +00:00
Chris Lattner
54349c5f4d
Fix a problem noticed by Nuno, where we wouldn't escape characters in
...
macro expansions.
llvm-svn: 49877
2008-04-17 23:03:14 +00:00
Ted Kremenek
f42f3fb47d
class Preprocessor: Now owns the "predefines" char*; it deletes [] it in its dstor.
...
clang.cpp: InitializePreprocessor now makes a copy of the contents of PredefinesBuffer and
passes it to the preprocessor object.
clang.cpp: DriverPreprocessorFactory now calls "InitializePreprocessor" instead of this being done in main().
html::HighlightMacros() now takes a PreprocessorFactory, allowing it to conjure up a new
Preprocessor to highlight macros.
class HTMLDiagnostics now takes a PreprocessorFactory* that it can use for html::HighlightMacros().
Updated clients of HTMLDiagnostics to use this new interface.
llvm-svn: 49875
2008-04-17 22:31:54 +00:00
Chris Lattner
7c7e9b3bbe
Handle text escaping (e.g. & -> &) last, to avoid interactions between 'replace' operations and insert operations. This fixes a problem with "&;&" on line 666 of the gcc.c example I sent out.
...
llvm-svn: 49874
2008-04-17 22:24:51 +00:00
Ted Kremenek
306492d8cb
Generate the Preprocessor using a local PreprocessorFactory object.
...
While this adds no extra functionality now, we will soon pass the
PreprocessorFactory object to some ASTConsumers.
llvm-svn: 49873
2008-04-17 21:38:34 +00:00
Chris Lattner
6929bd8047
don't give macros a background
...
llvm-svn: 49871
2008-04-17 21:32:46 +00:00
Chris Lattner
f219126107
Make sure popup is on top over other spans. wrap long line.
...
llvm-svn: 49870
2008-04-17 21:28:41 +00:00
Ted Kremenek
219bab3be9
Added "PreprocessorFactory", an interface for lazily creating Preprocessor objects on-demand.
...
llvm-svn: 49868
2008-04-17 21:23:07 +00:00
Ted Kremenek
c2c08caf9c
Add support in HTML macro expansion for hovering over a macro and automatically
...
expanding its definition. This is a pure CSS solution.
Tested on IE7, Firefox 3b4, and Safari 3.1.
Patch by Cedric Venet!
llvm-svn: 49865
2008-04-17 19:57:27 +00:00
Ted Kremenek
aabc986766
Temporarily disable macro expansion in the HTML output of HTMLDiagnostics to
...
avoid corrupting Preprocessor state. Working on a fix.
llvm-svn: 49864
2008-04-17 18:39:57 +00:00
Ted Kremenek
8bb90b8152
HAve HTMLDiagnostics use html::HighlightRange to highlight message ranges.
...
llvm-svn: 49863
2008-04-17 18:37:23 +00:00
Fariborz Jahanian
8e36cddde0
Added property decl support for protocols.
...
Added assertion if unexpected property decls are found where they don't belong.
Consolidated property decl. printing by using a helper function.
llvm-svn: 49862
2008-04-17 18:25:18 +00:00
Ted Kremenek
a506fec90a
Added transfer function support for ReturnStmt to support detecting leaks
...
involving objects that are returned but have an excessive reference count.
llvm-svn: 49861
2008-04-17 18:12:53 +00:00
Nate Begeman
36c49278b5
Allow redirecting text diagnostic printer output to any llvm::OStream, rather
...
than hard coding llvm::cerr.
llvm-svn: 49860
2008-04-17 18:06:57 +00:00
Argyrios Kyrtzidis
6d05303342
Use TranslationUnitDecl as DeclContext of builtin functions.
...
llvm-svn: 49856
2008-04-17 14:47:13 +00:00
Argyrios Kyrtzidis
c3b69ae815
Addition of TranslationUnitDecl to the AST:
...
-Added TranslationUnitDecl class to serve as top declaration context
-ASTContext gets a TUDecl member and a getTranslationUnitDecl() function
-All ScopedDecls get the TUDecl as DeclContext when declared at global scope
llvm-svn: 49855
2008-04-17 14:40:12 +00:00
Argyrios Kyrtzidis
fc2f058230
Fix MSVC compiler error: "initialization of 'VD' is skipped by 'case' label"
...
llvm-svn: 49853
2008-04-17 13:52:22 +00:00
Chris Lattner
f1c70d79b8
insert macro expansions into floating divs. For now, they are always displayed,
...
but we want some javascript or something toggle their display.
llvm-svn: 49836
2008-04-17 00:40:45 +00:00
Chris Lattner
775fdd3618
correctly hilight multi-line macro definitions and other
...
preprocessor directives.
llvm-svn: 49828
2008-04-16 23:21:17 +00:00
Chris Lattner
10dbbb0c5a
Make HighlightRange correctly handle multi-line ranges. This causes us to
...
correctly handle multi-line comments.
llvm-svn: 49827
2008-04-16 23:06:45 +00:00
Ted Kremenek
9c375158a0
Handle ReturnStmts by dispatching to "EvalReturn" in the transfer function object.
...
llvm-svn: 49826
2008-04-16 23:05:51 +00:00
Chris Lattner
8e3006a4e3
add a new HighlightRange API, it doesn't handle multiline ranges
...
yet, but it will soon...
llvm-svn: 49825
2008-04-16 22:45:51 +00:00
Ted Kremenek
cbf4c6134e
CF ref. count checker: Register memory leaks at the end of a path.
...
llvm-svn: 49824
2008-04-16 22:32:20 +00:00
Ted Kremenek
86051690ea
Bug fix in GREndPathNodeBuilderImpl: Use the specified state to construct
...
a node, not the state of the predecessor.
llvm-svn: 49823
2008-04-16 22:30:40 +00:00
Fariborz Jahanian
549e83caa0
New AST class for property implementation declarations.
...
llvm-svn: 49821
2008-04-16 22:00:24 +00:00
Fariborz Jahanian
d634dfae0f
Fixed a comment.
...
llvm-svn: 49819
2008-04-16 21:11:25 +00:00
Ted Kremenek
c1f9a28e4d
Added CFGBlock::getTerminatorCondition() to get the Expr* of the condition a block's terminator.
...
Refactored LiveVariables to use getTerminatorCondition() in VisitTerminator().
Bug fix: CFG now computes Block-level expression numbers using information
from block terminators. This fixes <rdar://problem/5868189>.
llvm-svn: 49818
2008-04-16 21:10:48 +00:00
Fariborz Jahanian
9d981eb9ae
This patch adds support for declaraing properties in categories,
...
just as they are declared in objc classes.
llvm-svn: 49817
2008-04-16 21:08:45 +00:00
Chris Lattner
e9786c3199
reenable highlighting of (the first line of) comments
...
llvm-svn: 49816
2008-04-16 20:54:51 +00:00
Chris Lattner
0bb0e7ee8a
switch from relexing with the preprocessor to do syntax highlighting to relexing
...
with the Lexer. This is cheaper and gives us some advantages. For now we start
highlighting preprocessor directives (which need improvement), and disable
comments. Comments to be restored later.
llvm-svn: 49815
2008-04-16 20:51:51 +00:00
Ted Kremenek
b47c742002
Add extra test cases to test "escaping" for the reference count checker.
...
llvm-svn: 49812
2008-04-16 20:41:27 +00:00
Ted Kremenek
7145489c37
Small tweaks to EvalStore: pass an "RVal" instead of "LVal" for the TargetLV to
...
represent possible stores to "Unknown."
llvm-svn: 49811
2008-04-16 20:40:59 +00:00
Ted Kremenek
7d28c2c681
Update XCode project (added GRTransferFuncs.cpp).
...
llvm-svn: 49806
2008-04-16 18:39:47 +00:00
Ted Kremenek
673b5c1e42
Add missing file.
...
llvm-svn: 49805
2008-04-16 18:39:25 +00:00
Ted Kremenek
90c7cb6810
Hook up "EvalStore" from GRTransferFuncs to GRExprEngine.
...
llvm-svn: 49804
2008-04-16 18:39:06 +00:00
Ted Kremenek
2044a5183d
Take first step to migrating handling of "stores" to values from GRExprEngine
...
to the plug-in GRTransferFuncs object.
llvm-svn: 49801
2008-04-16 18:21:25 +00:00
Ted Kremenek
ed30e8da56
LiveVariables now updates the liveness state of block-level expressions that
...
are referenced by CFGBlock terminators.
llvm-svn: 49798
2008-04-16 17:07:59 +00:00
Ted Kremenek
2e4d0ecaa3
Added fixme.
...
llvm-svn: 49797
2008-04-16 16:53:18 +00:00
Ted Kremenek
f2e6fcf3bf
Hook up HTMLDiagnostics to use Chris's new syntax highlighting. --html-diags
...
currently doesn't pass in the Preprocessor from the driver, so we don't get
syntax highlighting when we create HTMLDiagnostics in that way.
llvm-svn: 49796
2008-04-16 16:39:56 +00:00
Ted Kremenek
08e562d3c8
In ExplodedGraphImpl::Trim, prioritize for paths that don't span loops by using
...
two worklists: for nodes whose locations are block edges with loop terminators
and another for nodes with all other locations. We only dequeue from the loop
worklist when the other is empty. Exploration of the graph is still in
reverse-BFS.
llvm-svn: 49791
2008-04-16 15:51:26 +00:00
Chris Lattner
03b8fcc247
Take a stab at highlighting #defines and #includes. This doesn't work yet.
...
llvm-svn: 49781
2008-04-16 06:53:09 +00:00