]> granicus.if.org Git - clang/log
clang
16 years agofix broken tag
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

16 years agoAnother link fix.
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

16 years agoFix links.
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

16 years agoFix bug in BugReporter where we didn't handle emitting diagnostics for
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

16 years agoAdded some notes about the LLVM "checker". This isn't a public link yet; still refining.
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

16 years agoremove the 'unused static' diagnostic from codegen. This should be
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

16 years agoinitial support for recognizing __transparent_union__ attributes
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

16 years agoHandle dereferences of function pointers (which return a handle to the function).
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

16 years agoDon't abort on GetRVal when the LVal is a StringLiteralVal.
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

16 years agoDon't emit empty strings for path diagnostics when taking the default branch of a...
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

16 years agoDo a better job at computing dead symbols.
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

16 years agoAdd preliminary support for flagging leaks around when they happen (doesn't work...
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

16 years agoBetter handling for directory names in HTML diagnostics. Work in progress.
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

16 years agoMore boilerplate for handling specialized-transfer function logic for dead symbols.
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

16 years agoPatch to diagnose inconsistancies between properties declared in current and
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

16 years agoAdded initial boilerplate in GRExprEngine to allow checker-specific transfer
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

16 years agoAdded uninitialized-values (path-sensitive) test case as a regression test
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

16 years agoAdded test case for functionality fix in rdar://problem/5886141 (handle variadic...
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

16 years agoCF reference count checker: handle variadic functions that allocate CF objects.
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

16 years agoHave ValidateOutputConstraint return false instead of firing an assertion
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

16 years agoFor case statements involving enums, BugReporter now generates PathDiagnostics
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

16 years agoFix minor regression in bug report generation.
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

16 years agoWhen building PathDiagnostics for bug reports, generate a trimmed ExplodedGraph with...
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

16 years agoFixed: <rdar://problem/5881148>
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

16 years agoTranslationUnit now owns IdentifierTable, TargetInfo, and Selectors objects
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

16 years agoRemove false path where the default branch in a switch statement would
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

16 years agofix a rewriter crash on zero length files.
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

16 years agoAdded panic function "assfail".
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

16 years agoPatch to build AST for property implementation declarations and
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

16 years agoFor default branches in switch statements with no default label, print out
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

16 years agoRewrote VisitDeclStmt to properly handle initializers that can do anything.
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

16 years agoAdded lval type (and tracking) for StringLiterals.
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

16 years agoAdded "nonlval::LValAsInteger" to represent abstract LVals casted to integers, allowi...
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

16 years ago"This patch renames
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

16 years agoPathDiagnosticClients now retain ownership of passed PathDiagnostics, requiring
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

16 years agoUse back() instead of end()-1
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

16 years agoAdded panic function "dtrace_assfail".
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

16 years agoAdd VisitArraySubscriptExpr.
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

16 years agoHardcode "Assert" as a no-return function (panic).
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

16 years agoAdd some basic ARM asm constraints
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

16 years agoAdded null dereference test involving arrays.
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

16 years agoAdded null-dereference check for ArraySubscriptExpr.
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

16 years agoDon't double-increment counter for -arch and -isysroot
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

16 years agoAllow property in base class to be implemented in a
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

16 years agoAdded missing expected-warning.
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

16 years agoAdded null dereference test case looking for null dereferences involving MemberExpr.
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

16 years agoAdded support for detected bad dereferences involving MemberExprs, e.g. x->f where...
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

16 years agoRemove unused "verbose" argument to compile(). Also unbreaks ccc-analyzer.
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

16 years agoMore semantics checks of properties. Property implementation can implicitly use
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

16 years agoSupport for @dynamic AST build.
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

16 years agoPass "-arch" down to clang.
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

16 years agoFix pasto, thanks to Anders for pointing this out.
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

16 years agoContinuation of work on ObjC2's properties.
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

16 years agoadd arm support
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

16 years agoClean up handling of function redeclarations
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

16 years agoFix improper dereference of end() iterator. Patch by Argiris Kirtzidis!
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

16 years agoFix PR2236
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

16 years agoTwo improvements to initializer parsing:
Chris Lattner [Sun, 20 Apr 2008 19:07:56 +0000 (19:07 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49998 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agofor exponent-related errors, emit the diagnostic on the 'e' or 'p'.
Chris Lattner [Sun, 20 Apr 2008 18:47:55 +0000 (18:47 +0000)]
for exponent-related errors, emit the diagnostic on the 'e' or 'p'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49997 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agowhen emitting diagnostics about some character in a numeric
Chris Lattner [Sun, 20 Apr 2008 18:41:46 +0000 (18:41 +0000)]
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 };
                ^

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49996 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoOnly generate code for static functions and global variables that are actually used.
Nate Begeman [Sun, 20 Apr 2008 06:29:50 +0000 (06:29 +0000)]
Only generate code for static functions and global variables that are actually used.
Warn about unused static functions and variables.
This fixes PR1998.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49987 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRestructure and simplify Sema::ObjCQualifiedIdTypesAreCompatible,
Chris Lattner [Sun, 20 Apr 2008 02:09:31 +0000 (02:09 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49984 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agohtml::EscapeText (using the Rewriter) now replaces tabs by default.
Ted Kremenek [Sun, 20 Apr 2008 01:02:33 +0000 (01:02 +0000)]
html::EscapeText (using the Rewriter) now replaces tabs by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49982 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoimplement a fixme, add support for ++/-- on long double.
Chris Lattner [Sun, 20 Apr 2008 00:50:39 +0000 (00:50 +0000)]
implement a fixme, add support for ++/-- on long double.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49980 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agouse simplified ConstantFP:get method.
Chris Lattner [Sun, 20 Apr 2008 00:45:53 +0000 (00:45 +0000)]
use simplified ConstantFP:get method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49979 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoreplace form feeds with an <hr> tag.
Chris Lattner [Sat, 19 Apr 2008 23:56:30 +0000 (23:56 +0000)]
replace form feeds with an <hr> tag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49975 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agosimplify the return of InitializePreprocessor to be bool instead of a fileid
Chris Lattner [Sat, 19 Apr 2008 23:25:44 +0000 (23:25 +0000)]
simplify the return of InitializePreprocessor to be bool instead of a fileid

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49974 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agosimplify ownership of the predefines buffer.
Chris Lattner [Sat, 19 Apr 2008 23:09:31 +0000 (23:09 +0000)]
simplify ownership of the predefines buffer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49973 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoGracefully handle when the receiver of a message expression is not a pointer type.
Ted Kremenek [Sat, 19 Apr 2008 19:12:50 +0000 (19:12 +0000)]
Gracefully handle when the receiver of a message expression is not a pointer type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49959 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPass "-isysroot" option down to clang.
Ted Kremenek [Sat, 19 Apr 2008 18:42:26 +0000 (18:42 +0000)]
Pass "-isysroot" option down to clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49956 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix spelling/grammar in comment.
Ted Kremenek [Sat, 19 Apr 2008 18:07:44 +0000 (18:07 +0000)]
Fix spelling/grammar in comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49955 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse Digest::MD5 (a Perl module that should come bundled standard with Perl) to comput...
Ted Kremenek [Sat, 19 Apr 2008 18:05:48 +0000 (18:05 +0000)]
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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49954 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoGenerate code for annotation attributes.
Nate Begeman [Sat, 19 Apr 2008 04:17:09 +0000 (04:17 +0000)]
Generate code for annotation attributes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49951 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd support to module codegen for adding and emitting annotations
Nate Begeman [Fri, 18 Apr 2008 23:43:57 +0000 (23:43 +0000)]
Add support to module codegen for adding and emitting annotations

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49944 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoIgnore qualifiers when attempting to match arguments to parameter types for
Nate Begeman [Fri, 18 Apr 2008 23:35:14 +0000 (23:35 +0000)]
Ignore qualifiers when attempting to match arguments to parameter types for
__builtin_overload

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49943 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoOCUVector -> ExtVector, shorthand for extended vector, per feedback from Chris.
Nate Begeman [Fri, 18 Apr 2008 23:10:10 +0000 (23:10 +0000)]
OCUVector -> ExtVector, shorthand for extended vector, per feedback from Chris.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49942 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAnother bug fix in emitting warnings without a path: construct a unit PathDiagnostic...
Ted Kremenek [Fri, 18 Apr 2008 22:56:53 +0000 (22:56 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49939 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agofix __attribute__(format) for struct function pointer fields
Nuno Lopes [Fri, 18 Apr 2008 22:43:39 +0000 (22:43 +0000)]
fix __attribute__(format) for struct function pointer fields

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49938 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove bogus cast (<rdar://problem/5874848> clang objc-rewriter: structure with list...
Steve Naroff [Fri, 18 Apr 2008 22:15:15 +0000 (22:15 +0000)]
Remove bogus cast (<rdar://problem/5874848> clang objc-rewriter: structure with list of protocols has wrong cast).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49935 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoReenable using the PathDiagnosticClient for BugReports without paths.
Ted Kremenek [Fri, 18 Apr 2008 22:11:59 +0000 (22:11 +0000)]
Reenable using the PathDiagnosticClient for BugReports without paths.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49934 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse 'clang' binary in the same dir as scan-build; if it isn't there use the one in...
Ted Kremenek [Fri, 18 Apr 2008 22:00:56 +0000 (22:00 +0000)]
Use 'clang' binary in the same dir as scan-build; if it isn't there use the one in the path

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49933 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImplement FIXME discoved by <rdar://problem/5874876> Rewriter: Explicit ivar refs...
Steve Naroff [Fri, 18 Apr 2008 21:55:08 +0000 (21:55 +0000)]
Implement FIXME discoved by <rdar://problem/5874876> Rewriter: Explicit ivar refs outside a method are being rewritten

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49932 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTurn on CF reference count checker.
Ted Kremenek [Fri, 18 Apr 2008 21:53:01 +0000 (21:53 +0000)]
Turn on CF reference count checker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49931 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix <rdar://problem/5874697> Rewriter: method arguments with complex types not being...
Steve Naroff [Fri, 18 Apr 2008 21:13:19 +0000 (21:13 +0000)]
Fix <rdar://problem/5874697> Rewriter: method arguments with complex types not being rewritten properly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49925 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoGeneralize caching mechanism for bugs reports. Now individual BugTypes
Ted Kremenek [Fri, 18 Apr 2008 20:54:29 +0000 (20:54 +0000)]
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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49918 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFixed more caching bugs related to the one fixed in r49914. Silence
Ted Kremenek [Fri, 18 Apr 2008 20:35:30 +0000 (20:35 +0000)]
Fixed more caching bugs related to the one fixed in r49914.  Silence
compiler warning introduced by a recent patch of mine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49917 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFixed elusive caching bug that led to false positives.
Ted Kremenek [Fri, 18 Apr 2008 19:34:16 +0000 (19:34 +0000)]
Fixed elusive caching bug that led to false positives.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49914 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded "GetErrorNodes()" to BugType so that -trim-egraph can recognize errors
Ted Kremenek [Fri, 18 Apr 2008 19:23:43 +0000 (19:23 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49912 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded "EvalAssume" virtual method to GRTransferFuncs; this is for evaluating
Ted Kremenek [Fri, 18 Apr 2008 17:20:23 +0000 (17:20 +0000)]
Added "EvalAssume" virtual method to GRTransferFuncs; this is for evaluating
the checker-specific logic of symbolic assumptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49910 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTabs -> spaces
Nate Begeman [Fri, 18 Apr 2008 17:17:24 +0000 (17:17 +0000)]
Tabs -> spaces

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49909 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSpelling fix.
Ted Kremenek [Fri, 18 Apr 2008 16:58:34 +0000 (16:58 +0000)]
Spelling fix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49908 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFixed bug in GREndPathNodeBuilder: only return a node if it wasn't in the node cache.
Ted Kremenek [Fri, 18 Apr 2008 16:30:14 +0000 (16:30 +0000)]
Fixed bug in GREndPathNodeBuilder: only return a node if it wasn't in the node cache.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49907 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoscan-build now fixes permissions of report files and directories, which may
Ted Kremenek [Fri, 18 Apr 2008 15:18:20 +0000 (15:18 +0000)]
scan-build now fixes permissions of report files and directories, which may
be created as "temporary files" that are not world readable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49904 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCompute a digest of each report file, and nuke reports that have the same
Ted Kremenek [Fri, 18 Apr 2008 15:09:30 +0000 (15:09 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49903 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoInitialize default double width and alignment
Nate Begeman [Fri, 18 Apr 2008 05:49:49 +0000 (05:49 +0000)]
Initialize default double width and alignment

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49899 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAllow targets to override double size, alignment, and semantics, and tie this
Nate Begeman [Fri, 18 Apr 2008 05:41:31 +0000 (05:41 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49898 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRestore macro expansion for HTMLPrint by using the original Preprocessor.
Ted Kremenek [Fri, 18 Apr 2008 05:35:23 +0000 (05:35 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49897 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoProvide a version of html::HighlightMacros that takes a Preprocessor&.
Ted Kremenek [Fri, 18 Apr 2008 05:34:33 +0000 (05:34 +0000)]
Provide a version of html::HighlightMacros that takes a Preprocessor&.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49896 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMore grammar fixes.
Ted Kremenek [Fri, 18 Apr 2008 05:32:44 +0000 (05:32 +0000)]
More grammar fixes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49895 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix plurality debacle.
Ted Kremenek [Fri, 18 Apr 2008 05:13:26 +0000 (05:13 +0000)]
Fix plurality debacle.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49894 91177308-0d34-0410-b5e6-96231b3b80d8