]>
granicus.if.org Git - clang/log
Ted Kremenek [Tue, 15 Apr 2008 20:47:02 +0000 (20:47 +0000)]
Added "summary table" to generated index.html page that allows one to
toggle which bug reports are displayed in the report table.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49738
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Apr 2008 18:37:29 +0000 (18:37 +0000)]
Added test case illustrating the use of '&'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49735
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Apr 2008 18:35:30 +0000 (18:35 +0000)]
Fix bug in terminator processing for uninitialized-values: simply ignore the terminator, don't reprocess it.
LiveVariables analysis now does a flow-insensitive analysis to determine what variables have their address taken; these variables are now always treated as being live.
The DataflowSolver now uses "SetTopValue()" when getting the initial value for the entry/exit block.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49734
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 15 Apr 2008 16:30:10 +0000 (16:30 +0000)]
Fix a compiler error on MSVC (variable name 'E' clash).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49727
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 15 Apr 2008 06:37:11 +0000 (06:37 +0000)]
finish commenting RewriteRope
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49712
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Apr 2008 05:31:00 +0000 (05:31 +0000)]
Improve dead store diagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49711
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Apr 2008 05:11:28 +0000 (05:11 +0000)]
Bug fix in VisitChildren: Only visit the last statement in a StmtExpr and the RHS of a comma expression, as the other Stmts will be visited elsewhere in a CFGBlock.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49710
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Apr 2008 04:39:08 +0000 (04:39 +0000)]
Added initial support into the flow-sensitive dataflow solver to visit the Block-level expression
in a block's terminator. This expression is visited within a block, but it is accessed by the
terminator. This is important to observe because for live-variables analysis the block-level
expression is live between the terminator and where the expression occurs in the block. So far
this hasn't been an issue to not observe this because the block-level expression used in the
terminator is always the last one in the block, and we have never queried the liveness information
about this point (but before the terminator).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49709
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Apr 2008 04:11:48 +0000 (04:11 +0000)]
Bug fix in dead stores: don't always check the liveness of the first decl
in a DeclStmt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49708
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Apr 2008 04:08:54 +0000 (04:08 +0000)]
++/-- makes a variable live since it is used; thus the liveness state is
"Alive" as opposed to staying the same.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49707
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Apr 2008 03:57:09 +0000 (03:57 +0000)]
Handle "__private_extern__" storage class when printing FunctionDecls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49706
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Apr 2008 03:47:30 +0000 (03:47 +0000)]
Bug fix in LiveVariables: Operators ++/-- may kill a value, but the variable
is still live.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49705
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 15 Apr 2008 02:26:21 +0000 (02:26 +0000)]
Fix a corner case that ted hit in -emit-html, rdar://
5863212
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49703
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 14 Apr 2008 23:36:35 +0000 (23:36 +0000)]
New AST representation for each objc2's property declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49699
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 14 Apr 2008 22:53:48 +0000 (22:53 +0000)]
Remove bogus token...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49695
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Apr 2008 22:10:58 +0000 (22:10 +0000)]
simplify the implementation of the insert/split operation to return
the new RHS directly instead of indirecting through the 'InsertResult'
struct. This eliminates InsertResult.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49694
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 14 Apr 2008 22:05:54 +0000 (22:05 +0000)]
Rename a file and update the Xcode project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49693
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 14 Apr 2008 22:03:09 +0000 (22:03 +0000)]
Rename RewriteTest->RewriteObjC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49692
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Apr 2008 21:41:00 +0000 (21:41 +0000)]
Add a bunch of comments, move RewriteRope::MakeRopeString out of line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49689
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 14 Apr 2008 21:39:16 +0000 (21:39 +0000)]
Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49688
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Apr 2008 21:24:13 +0000 (21:24 +0000)]
Use isFromMainFile instead of comparing FileIDs directly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49687
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Apr 2008 21:21:38 +0000 (21:21 +0000)]
Fix regression in Diagnostic that caused it to not register the number
of errors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49686
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Apr 2008 21:14:41 +0000 (21:14 +0000)]
Use SourceManager::isFromMainFile()
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49685
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Apr 2008 21:14:03 +0000 (21:14 +0000)]
Convert over to new SourceManager::isFromMainFile() instead of doing direct
FileID comparison (fixes insidious corner case with chunks).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49684
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Apr 2008 21:06:04 +0000 (21:06 +0000)]
HTMLDiagnostics now uses the new "getCanonicalID()", "isFromMainFileID()" methods from
SourceManager when doing HTML pretty-printing. This resolves an insidious bug when
presenting error reports that only occurred in large source files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49683
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Apr 2008 21:04:18 +0000 (21:04 +0000)]
Added "getCanonicalID()", "isFromSameFile", and "isFromMainFile" to compare
the files of different SourceLocations. These methods correctly handle the
case where a file may have multiple FileIDs due to it being large enough
to be spread across several chunks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49682
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Apr 2008 20:07:03 +0000 (20:07 +0000)]
fix more uninit ivars, who wrote this junk? :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49679
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Apr 2008 20:05:32 +0000 (20:05 +0000)]
Fix an assertion ted was hitting, due to an uninitialized variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49678
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Apr 2008 19:56:12 +0000 (19:56 +0000)]
Only increment the number of diagnostics when the DiagnosticClient used
is the one attached to the Diagnostic object.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49677
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Apr 2008 18:40:58 +0000 (18:40 +0000)]
Added driver option "-checker-opt-analyze-headers" to force the static
analyzer to analyze functions declared in header files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49675
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Apr 2008 18:28:25 +0000 (18:28 +0000)]
Don't flag dead stores that occur in macros.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49672
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Apr 2008 18:06:42 +0000 (18:06 +0000)]
Have BugReporter::EmitWarning use the PathDiagnosticClient if it is available.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49668
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Apr 2008 17:54:23 +0000 (17:54 +0000)]
move a ton of code out of line, from RewriteRope.h -> RewriteRope.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49664
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Apr 2008 17:52:13 +0000 (17:52 +0000)]
Bug fix in dead-store checker when walking the Decls in a DeclStmt: don't
assume that DeclStmts only have VarDecls; they can have TypedefDecls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49662
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Apr 2008 17:45:13 +0000 (17:45 +0000)]
Treat calls to unresolved functions in the CF-ref count checker as calls
to functions with NULL summaries.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49660
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Apr 2008 17:40:10 +0000 (17:40 +0000)]
Updated test cases so that they do not emit warnings for dead stores.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49659
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Apr 2008 17:39:48 +0000 (17:39 +0000)]
Hooked up the dead-store checker to the BugReporter interface. Now dead-store
warnings are emitted as part of the warnings registered by GRSimpleVals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49658
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Apr 2008 17:37:31 +0000 (17:37 +0000)]
Added version of "getClient()" for class Diagnostic that returns a non-const
reference to the DiagnosticClient. This is useful for DiagnosticClients
that have internal state when processing diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49656
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Apr 2008 17:12:49 +0000 (17:12 +0000)]
remove ifdefs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49651
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Apr 2008 15:56:17 +0000 (15:56 +0000)]
Added test case to dead stores checker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49647
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sam Bishop [Mon, 14 Apr 2008 14:41:57 +0000 (14:41 +0000)]
Handle -D and -U options in order, so that they can cancel each other out when
intermixed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49645
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Apr 2008 07:17:29 +0000 (07:17 +0000)]
Change the RewriteRope::Chunks data structure from an std::list into
a nice shiny B+ Tree variant. This fixes the last of the known algorithmic
issues with the rewriter, allowing a significant speedup. For example,
-emit-html on Ted's 500K .i file speeds up from 26.8s -> 0.64s in a
debug build (41x!) and 5.475s -> 0.132s (41x!) in an optimized build.
This code is functional but needs to be cleaned up, ifdefs removed, better
commented, and moved to a .cpp file. I plan to do this tomorrow.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49635
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Mon, 14 Apr 2008 04:49:57 +0000 (04:49 +0000)]
Enable clang to codegen emmintrin.h until we have our own emmintrin.h
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49633
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Mon, 14 Apr 2008 02:26:39 +0000 (02:26 +0000)]
Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49632
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 14 Apr 2008 00:26:07 +0000 (00:26 +0000)]
Argiris Kirtzidis's fix for handling empty IdDeclInfo's in IdentifierResolver::AddDecl
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49631
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 14 Apr 2008 00:13:42 +0000 (00:13 +0000)]
Make Parser::getAccessSpecifierIfPresent const, since it does not modify the state
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49629
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 14 Apr 2008 00:09:21 +0000 (00:09 +0000)]
Move IdDeclInfoMap class in an anonymous namespace. Suggestion by Chris Lattner.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49628
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 13 Apr 2008 21:30:24 +0000 (21:30 +0000)]
This patch adds very basic support for parsing and type-checking class
inheritance in C++. It'll parse the base-specifier list, e.g.,
class D : public B1, virtual public B2 { };
and do some of the simpler semantic checks (B1 and B2 are classes;
they aren't unions or incomplete types, etc).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49623
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 13 Apr 2008 21:07:44 +0000 (21:07 +0000)]
Introduce support for finding class and enum names via ordinary name lookup in C++
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49621
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 13 Apr 2008 20:38:43 +0000 (20:38 +0000)]
Fix PR2220, making diagnostics for unexpected tokens in pp expressions
more nice.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49619
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 13 Apr 2008 19:54:28 +0000 (19:54 +0000)]
this started failing because a GEP was constant folded,
improve the robustness of the test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49618
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 13 Apr 2008 19:35:01 +0000 (19:35 +0000)]
Test commit: fix a typo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49615
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 13 Apr 2008 18:59:07 +0000 (18:59 +0000)]
This patch is just the easy part of the class names patch, which
allows the parsing of "class" in addition to "struct" and "union" to
declare a record. So this patch allows:
class C { };
class C c1;
But it does not contain the lookup bits, so this won't work yet:
C c2;
Patch by Doug Gregor!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49613
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 13 Apr 2008 08:52:45 +0000 (08:52 +0000)]
Change the btree algorithm to split nodes bottom-up instead of top-down.
This results in an (IMO) simpler algorithm, results in fewer splits, and
is more amenable to delta handling (there is no reason to mutate the tree
at all when adding a delta to a position that already exists in the tree).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49609
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 13 Apr 2008 08:22:30 +0000 (08:22 +0000)]
split node splitting from interior node restructuring.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49608
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 13 Apr 2008 07:32:11 +0000 (07:32 +0000)]
update to follow mainline llvm API change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49607
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sam Bishop [Sun, 13 Apr 2008 04:32:18 +0000 (04:32 +0000)]
Use static_cast<> instead of cast<> in Decl::Destroy(). Suggestion by Argiris
Kirtzidis!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49603
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 12 Apr 2008 23:52:44 +0000 (23:52 +0000)]
Default argument cleanups and minor improvements, patch by
Doug Gregor!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49598
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 12 Apr 2008 22:04:18 +0000 (22:04 +0000)]
final cleanup, the code is now in a reviewable state.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49592
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 12 Apr 2008 22:00:40 +0000 (22:00 +0000)]
move the DeltaTree implementation out of line, remove debugging printfs etc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49591
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 12 Apr 2008 20:34:05 +0000 (20:34 +0000)]
remove ifdefs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49587
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 12 Apr 2008 20:28:24 +0000 (20:28 +0000)]
Do an initial hack at replacing one of the incredibly inefficient
(but simple!) datastructures in the rewriter with a more complex but
more efficient one.
This replaces the Deltas vector with a specialized BTree that makes
delta lookups much more efficient. This speeds up -emit-html on a 500K
.i file from 157.154 to 27.127 seconds on my machine (5.8x).
While this code is functional, it isn't very pretty, I have much
refactoring planned for it, and will remove the USE_VECTOR ifdef.
Stay tuned.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49586
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 12 Apr 2008 12:38:58 +0000 (12:38 +0000)]
Use std::list's push_back instead of resize to add an element.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49582
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 12 Apr 2008 05:54:25 +0000 (05:54 +0000)]
don't diagnose empty source files, thanks Neil!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49575
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 12 Apr 2008 01:50:47 +0000 (01:50 +0000)]
Fixed comments.
Moved IdDeclInfo class to anonymous namespace.
Replaced array with a std::vector.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49570
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 12 Apr 2008 00:47:19 +0000 (00:47 +0000)]
Added PushOnScopeChains method to Sema, that adds a decl to both the IdResolver and the Scope.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49567
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 11 Apr 2008 23:40:25 +0000 (23:40 +0000)]
AST generation for objc2's property declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49565
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 11 Apr 2008 22:25:11 +0000 (22:25 +0000)]
Add some boilerplate to report memory leaks at the end of an analyzed function.
Still need some boilerplate in BugReporter to report bugs at the end
of a function (not associated with a particular statement).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49564
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 11 Apr 2008 22:07:59 +0000 (22:07 +0000)]
Added "EvalEndPath" to GRTransferFuncs: the default implementation does not
change the state (and thus the GREndPathNodeBuilder automatically contructs a
node).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49563
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 11 Apr 2008 22:03:04 +0000 (22:03 +0000)]
Added "GREndPathNodeBuilder", a new node builder that will be used for
evaluating transfer functions at the end-of-path.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49561
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 11 Apr 2008 20:51:02 +0000 (20:51 +0000)]
Added FIXME
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49558
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 11 Apr 2008 20:23:24 +0000 (20:23 +0000)]
Fix regression introduced by my last commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49556
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 11 Apr 2008 20:11:19 +0000 (20:11 +0000)]
Changed behavior of how we handle "NULL" summaries: just call
GRSimpleVals::EvalCal(), and don't change reference counts.
Remove "getDoNothingSummary()", as a NULL summary does the same thing.
Added temporary hack for the "Get" rule for objects that return a pointer type:
treat them as non-owned CF objects.
Added test case to detect the release of a non-owned object.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49555
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Fri, 11 Apr 2008 19:35:35 +0000 (19:35 +0000)]
Add class and super class location info to ObjCInterfaceDecl...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49553
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 11 Apr 2008 18:40:51 +0000 (18:40 +0000)]
Use RangedBugReport to report better ranges for reference count errors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49552
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 11 Apr 2008 18:40:29 +0000 (18:40 +0000)]
Added "RangedBugReport".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49551
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 11 Apr 2008 18:30:21 +0000 (18:30 +0000)]
Update Xcode project with missing files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49550
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sam Bishop [Fri, 11 Apr 2008 18:04:39 +0000 (18:04 +0000)]
Invoke destructors in Decl::Destroy().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49547
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 11 Apr 2008 16:55:42 +0000 (16:55 +0000)]
Minor changes per Chris L's review.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49539
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 11 Apr 2008 16:20:41 +0000 (16:20 +0000)]
don't read off the front of the buffer. Thanks to Sam for pointing this out.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49535
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sam Bishop [Fri, 11 Apr 2008 15:01:25 +0000 (15:01 +0000)]
Stub out and start using a Decl::Destroy() method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49532
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sam Bishop [Fri, 11 Apr 2008 14:49:10 +0000 (14:49 +0000)]
Use the ASTContext allocator when creating deserialized Decl objects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49530
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 11 Apr 2008 07:06:57 +0000 (07:06 +0000)]
two new files for previous patch, by Argiris Kirtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49521
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 11 Apr 2008 07:00:53 +0000 (07:00 +0000)]
Switch sema to maintaining its own scope chain information for variable
shadowing, instead of threading it through the AST. This patch contributed
by Argiris Kirtzidis!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49520
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 11 Apr 2008 06:14:11 +0000 (06:14 +0000)]
Fix rdar://
5843510 don't assert and die when an invalid output
file is specified, print a happy little error message.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49518
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 10 Apr 2008 23:44:06 +0000 (23:44 +0000)]
Fixed some logic errors in the CF ref count checker; we now can detect simple
use-after-release errors. Added test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49509
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 10 Apr 2008 23:32:45 +0000 (23:32 +0000)]
Patch for:
1) objc ivar processing is split out of ActOnField into its own ActOnIvar method.
2) the new objc ivar action takes visibility info directly, eliminating
AllVisibilities in ParseObjCClassInstanceVariables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49506
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 10 Apr 2008 23:09:18 +0000 (23:09 +0000)]
Simplify CF ref. count checker state machine.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49505
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 10 Apr 2008 22:58:08 +0000 (22:58 +0000)]
Fix some bonehead bugs in summary generation in CFRefCount.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49503
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 10 Apr 2008 22:17:23 +0000 (22:17 +0000)]
Used --checker-simple.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49501
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 10 Apr 2008 22:16:52 +0000 (22:16 +0000)]
Refactored all logic to run the GRSimpleVals and CFRef checker into a common
code path in the clang driver.
Renamed options --grsimple to -checker-simple and -check-cfref to -checker-cfref.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49500
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 10 Apr 2008 16:37:40 +0000 (16:37 +0000)]
reduce the amount of 'C++ magic' this code depends on :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49489
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 10 Apr 2008 16:21:09 +0000 (16:21 +0000)]
CFRefCount analysis now properly calls "EmitWarnings" after analyzing a function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49488
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 10 Apr 2008 16:12:38 +0000 (16:12 +0000)]
When not emitting path diagnostics in BugReporter::EmitWarning(), use the
BugReport-specific SourceRanges (when available).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49486
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 10 Apr 2008 16:05:13 +0000 (16:05 +0000)]
Fixed regressions in error reporting due to copy-paste errors (using the "begin"
iterator instead of "end") and not implementing "getDescription()" for Nil
argument checks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49485
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 10 Apr 2008 06:46:29 +0000 (06:46 +0000)]
refactor Parser::ParseStructDeclaration to return a vector of uninterpreted
declarators. This allows the clients (C structs, objc classes, objc
properties, [future] C++ classes) etc, to do custom processing before invoking
an action.
This has two benefits in the short term:
1) objc ivar processing should be split out of ActOnField into its own ActOn method.
2) the new objc ivar action can take visibility info directly, eliminating
AllVisibilities in ParseObjCClassInstanceVariables.
3) objc properties can pass their own special sauce down to sema as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49468
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 10 Apr 2008 06:15:14 +0000 (06:15 +0000)]
Simplify lifetime of location object.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49467
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 10 Apr 2008 05:23:15 +0000 (05:23 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49464
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 10 Apr 2008 02:26:16 +0000 (02:26 +0000)]
typedef void T;
void f(T);
is only invalid in C++ mode, not C89 mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49460
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 10 Apr 2008 02:22:51 +0000 (02:22 +0000)]
Several improvements from Doug Gregor related to default
argument handling. I'll fix up the c89 (void) thing next.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49459
91177308 -0d34-0410-b5e6-
96231b3b80d8