]>
granicus.if.org Git - clang/log
Fariborz Jahanian [Thu, 1 May 2008 18:05:01 +0000 (18:05 +0000)]
Patch to match and issue diagnostics on property type mismatch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50532
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 1 May 2008 17:52:49 +0000 (17:52 +0000)]
Added __assert_rtn to list of panic functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50530
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 1 May 2008 17:26:20 +0000 (17:26 +0000)]
Use pointer swizziling to unify in ObjCMessageExpr the receiver and classname "fields". This saves us a pointer.
Implemented serialization for ObjCMessageExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50528
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 1 May 2008 15:55:59 +0000 (15:55 +0000)]
Added ziperr as a panic function. Eventually inter-procedural analysis
should catch this one easily.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50526
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 1 May 2008 15:55:24 +0000 (15:55 +0000)]
Added comments to ObjCMessageExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50525
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 1 May 2008 04:02:04 +0000 (04:02 +0000)]
When processing "release", "retain", and "autorelease" messages return the
lval passed as an argument.
Fix: Inverted diagnostic messages.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50513
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 1 May 2008 02:18:37 +0000 (02:18 +0000)]
Added support for "autorelease" message in CF ref. count checker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50512
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Thu, 1 May 2008 02:04:18 +0000 (02:04 +0000)]
Extend InitListExpr API/IMPL to support arbitrary add/remove (in support of the initializer rewrite I am doing).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50511
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 1 May 2008 00:03:38 +0000 (00:03 +0000)]
More ObjC2 property semantics work. Work in progress.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50508
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 30 Apr 2008 23:47:44 +0000 (23:47 +0000)]
added preliminary diagnostics in scan-build results to denote whether
a CF memory leak occurred with GC enabled, etc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50507
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 30 Apr 2008 23:47:12 +0000 (23:47 +0000)]
scan-build: Disable distributed builds for xcodebuild
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50506
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 30 Apr 2008 22:48:21 +0000 (22:48 +0000)]
More cleanups with ObjCQualifiedIdType in the static analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50503
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 30 Apr 2008 22:17:15 +0000 (22:17 +0000)]
Add placeholder code in the static analyzer for MemberExprs involving struct temporaries.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50502
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 30 Apr 2008 21:45:55 +0000 (21:45 +0000)]
Add workaround for __builtin_offsetof in the static analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50500
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 30 Apr 2008 21:31:12 +0000 (21:31 +0000)]
Provide SizeOfAlignTypeExpr workaround in the static analyzer for taking the sizeof of a ObjCInterfaceType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50499
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 30 Apr 2008 21:10:19 +0000 (21:10 +0000)]
Support implicit casts from pointers to references.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50498
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 30 Apr 2008 21:05:35 +0000 (21:05 +0000)]
When creating LVals for array entries, canonicalize entries with a 0 index.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50497
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 30 Apr 2008 20:17:27 +0000 (20:17 +0000)]
Teach more of the static analyzer about ObjCQualifiedIdType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50494
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 30 Apr 2008 20:01:29 +0000 (20:01 +0000)]
Teach the static analysis engine about ObjCQualifiedIdType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50493
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 30 Apr 2008 17:54:04 +0000 (17:54 +0000)]
Add conjured symbols for decl initializations.
Add db_error as panic function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50489
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 30 Apr 2008 16:07:22 +0000 (16:07 +0000)]
Handle lval::ArrayOffset and lval::FieldOffset in EvalNE and EvalEQ.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50486
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Apr 2008 16:05:42 +0000 (16:05 +0000)]
Verify the whole module after codegen to catch silly IR bugs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50485
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Apr 2008 16:04:01 +0000 (16:04 +0000)]
fix 'var unused' warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50484
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 30 Apr 2008 04:40:48 +0000 (04:40 +0000)]
Added test case for the static analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50467
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 30 Apr 2008 04:23:07 +0000 (04:23 +0000)]
Invalidate old subexpression bindings when binding UnknownVal.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50466
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 29 Apr 2008 23:58:03 +0000 (23:58 +0000)]
Simplify RemoveDeadBindings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50458
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 29 Apr 2008 23:25:09 +0000 (23:25 +0000)]
Added test case to test null dereference checking with lval::ArrayOffset.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50454
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 29 Apr 2008 23:24:44 +0000 (23:24 +0000)]
Add lval::ArrayOffset, which represent the locations of entries in an array.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50453
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 29 Apr 2008 23:03:51 +0000 (23:03 +0000)]
Default visbility for instance variables is protected.
Patch by Emerson Murhpy-Hill.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50452
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 29 Apr 2008 22:17:41 +0000 (22:17 +0000)]
Added lval::FieldOffset, which represents symbolic lvalues for field offsets from other Lvalues.
This removes the failure in null-deref-ps.c (test suite).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50449
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 29 Apr 2008 21:04:26 +0000 (21:04 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50443
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 29 Apr 2008 16:24:23 +0000 (16:24 +0000)]
Pass fobjc-gc-only and fobjc-gc options down to clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50426
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 29 Apr 2008 05:44:10 +0000 (05:44 +0000)]
Update typestate logic to support GC-mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50396
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 29 Apr 2008 05:33:51 +0000 (05:33 +0000)]
Implement semantics of CFMakeCollectable for the CF-reference count checker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50395
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 29 Apr 2008 05:13:59 +0000 (05:13 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50394
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 29 Apr 2008 04:43:50 +0000 (04:43 +0000)]
Convert CFLF to LF. CRLF was causing this test to fail under Mac OS X.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50388
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 29 Apr 2008 04:37:03 +0000 (04:37 +0000)]
Add -fobjc-gc and -fobjc-gc-only options to the driver.
Add corresponding enum in LangOptions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50387
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 28 Apr 2008 18:00:46 +0000 (18:00 +0000)]
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>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50364
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sun, 27 Apr 2008 14:10:57 +0000 (14:10 +0000)]
Call ExitScope before ActOnFinishNamespaceDef.
This is the same for functions and it's preferable to have the namespace as DeclContext during ActOnPopScope.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50322
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sun, 27 Apr 2008 13:50:30 +0000 (13:50 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50321
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sun, 27 Apr 2008 13:30:35 +0000 (13:30 +0000)]
Use PushOnScopeChains to introduce a decl into scope.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50320
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 26 Apr 2008 15:19:51 +0000 (15:19 +0000)]
Make assertions for all addresses passed to ProgramPoint that they have at least an 8-byte alignment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50310
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 25 Apr 2008 21:28:20 +0000 (21:28 +0000)]
Pass down more -iXXX options that clang supports
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50304
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 25 Apr 2008 20:31:58 +0000 (20:31 +0000)]
fix broken tag
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50299
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 25 Apr 2008 20:30:34 +0000 (20:30 +0000)]
Another link fix.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50298
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 25 Apr 2008 20:29:37 +0000 (20:29 +0000)]
Fix links.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50297
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 25 Apr 2008 19:01:27 +0000 (19:01 +0000)]
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 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50286
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 25 Apr 2008 18:44:36 +0000 (18:44 +0000)]
Added some notes about the LLVM "checker". This isn't a public link yet; still refining.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50283
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 25 Apr 2008 15:47:13 +0000 (15:47 +0000)]
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).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50263
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Fri, 25 Apr 2008 09:32:00 +0000 (09:32 +0000)]
initial support for recognizing __transparent_union__ attributes
comments on the ML will follow
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50262
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 25 Apr 2008 01:56:50 +0000 (01:56 +0000)]
Handle dereferences of function pointers (which return a handle to the function).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50246
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 25 Apr 2008 01:45:38 +0000 (01:45 +0000)]
Don't abort on GetRVal when the LVal is a StringLiteralVal.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50245
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 25 Apr 2008 01:29:56 +0000 (01:29 +0000)]
Don't emit empty strings for path diagnostics when taking the default branch of a switch statement that has no label.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50242
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 25 Apr 2008 01:25:15 +0000 (01:25 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50241
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Apr 2008 23:57:27 +0000 (23:57 +0000)]
Add preliminary support for flagging leaks around when they happen (doesn't work yet).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50237
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Apr 2008 23:37:03 +0000 (23:37 +0000)]
Better handling for directory names in HTML diagnostics. Work in progress.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50234
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Apr 2008 23:35:58 +0000 (23:35 +0000)]
More boilerplate for handling specialized-transfer function logic for dead symbols.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50233
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 24 Apr 2008 19:58:34 +0000 (19:58 +0000)]
Patch to diagnose inconsistancies between properties declared in current and
its super class. This patch is incomplete.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50228
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Apr 2008 18:31:42 +0000 (18:31 +0000)]
Added initial boilerplate in GRExprEngine to allow checker-specific transfer
function logic to act when symbols become dead.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50221
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Apr 2008 18:28:14 +0000 (18:28 +0000)]
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 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50220
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Apr 2008 18:17:14 +0000 (18:17 +0000)]
Added test case for functionality fix in rdar://problem/
5886141 (handle variadic CF Create functions).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50219
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Apr 2008 17:22:33 +0000 (17:22 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50214
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Apr 2008 16:36:38 +0000 (16:36 +0000)]
Have ValidateOutputConstraint return false instead of firing an assertion
when processing a constraint we don't understand. This allows the frontend
to gracefully fail.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50213
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 23 Apr 2008 23:35:07 +0000 (23:35 +0000)]
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 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50197
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 23 Apr 2008 23:04:32 +0000 (23:04 +0000)]
Fix minor regression in bug report generation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50195
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 23 Apr 2008 23:02:12 +0000 (23:02 +0000)]
When building PathDiagnostics for bug reports, generate a trimmed ExplodedGraph with a single path that BugReport objects can safely walk and introspect.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50194
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 23 Apr 2008 20:12:28 +0000 (20:12 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50176
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 23 Apr 2008 16:25:39 +0000 (16:25 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50149
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 23 Apr 2008 05:03:18 +0000 (05:03 +0000)]
Remove false path where the default branch in a switch statement would
always be taken even if it was not feasible.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50132
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Apr 2008 03:21:50 +0000 (03:21 +0000)]
fix a rewriter crash on zero length files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50126
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 23 Apr 2008 00:41:25 +0000 (00:41 +0000)]
Added panic function "assfail".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50119
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 23 Apr 2008 00:06:01 +0000 (00:06 +0000)]
Patch to build AST for property implementation declarations and
to print declaration from its AST.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50117
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 22 Apr 2008 22:29:46 +0000 (22:29 +0000)]
For default branches in switch statements with no default label, print out
the line we are going to.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50113
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 22 Apr 2008 22:25:27 +0000 (22:25 +0000)]
Rewrote VisitDeclStmt to properly handle initializers that can do anything.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50112
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 22 Apr 2008 21:39:21 +0000 (21:39 +0000)]
Added lval type (and tracking) for StringLiterals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50109
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 22 Apr 2008 21:10:18 +0000 (21:10 +0000)]
Added "nonlval::LValAsInteger" to represent abstract LVals casted to integers, allowing us to track lvals when they are casted back to pointers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50108
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 22 Apr 2008 18:39:57 +0000 (18:39 +0000)]
"This patch renames
DeclContext *CtxDecl -> DeclContext *DeclCtx
DeclContext *CD -> DeclContext *DC
It makes the code more consistent."
Patch by Zhongxing Xu!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50105
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 22 Apr 2008 16:15:03 +0000 (16:15 +0000)]
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).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50102
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 22 Apr 2008 07:37:18 +0000 (07:37 +0000)]
Use back() instead of end()-1
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50098
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 22 Apr 2008 06:09:33 +0000 (06:09 +0000)]
Added panic function "dtrace_assfail".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50091
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 22 Apr 2008 05:40:28 +0000 (05:40 +0000)]
Add VisitArraySubscriptExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50090
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 22 Apr 2008 05:37:33 +0000 (05:37 +0000)]
Hardcode "Assert" as a no-return function (panic).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50089
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Tue, 22 Apr 2008 05:03:19 +0000 (05:03 +0000)]
Add some basic ARM asm constraints
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50085
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 22 Apr 2008 04:56:55 +0000 (04:56 +0000)]
Added null dereference test involving arrays.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50084
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 22 Apr 2008 04:56:29 +0000 (04:56 +0000)]
Added null-dereference check for ArraySubscriptExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50083
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Tue, 22 Apr 2008 04:47:32 +0000 (04:47 +0000)]
Don't double-increment counter for -arch and -isysroot
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50082
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 21 Apr 2008 23:57:08 +0000 (23:57 +0000)]
Allow property in base class to be implemented in a
derived class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50074
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 21 Apr 2008 23:45:26 +0000 (23:45 +0000)]
Added missing expected-warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50073
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 21 Apr 2008 23:44:17 +0000 (23:44 +0000)]
Added null dereference test case looking for null dereferences involving MemberExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50072
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 21 Apr 2008 23:43:38 +0000 (23:43 +0000)]
Added support for detected bad dereferences involving MemberExprs, e.g. x->f where "x" is NULL.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50071
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 21 Apr 2008 21:58:05 +0000 (21:58 +0000)]
Remove unused "verbose" argument to compile(). Also unbreaks ccc-analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50066
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 21 Apr 2008 21:57:36 +0000 (21:57 +0000)]
More semantics checks of properties. Property implementation can implicitly use
ivar of same name.
Better diagnostics to bring home this point.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50065
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 21 Apr 2008 21:05:54 +0000 (21:05 +0000)]
Support for @dynamic AST build.
More property semantics checking.
First test case for ObjC2's property implementation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50057
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 21 Apr 2008 20:28:01 +0000 (20:28 +0000)]
Pass "-arch" down to clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50056
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Apr 2008 20:19:54 +0000 (20:19 +0000)]
Fix pasto, thanks to Anders for pointing this out.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50055
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 21 Apr 2008 19:04:53 +0000 (19:04 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50050
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Apr 2008 18:56:49 +0000 (18:56 +0000)]
add arm support
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50049
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 21 Apr 2008 02:02:58 +0000 (02:02 +0000)]
Clean up handling of function redeclarations
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50021
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 20 Apr 2008 23:54:24 +0000 (23:54 +0000)]
Fix improper dereference of end() iterator. Patch by Argiris Kirtzidis!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50012
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sun, 20 Apr 2008 20:38:08 +0000 (20:38 +0000)]
Fix PR2236
Add test
Implement feedback from Chris re: PR1998
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50001
91177308 -0d34-0410-b5e6-
96231b3b80d8