]>
granicus.if.org Git - clang/log
Ted Kremenek [Wed, 16 Apr 2008 16:53:18 +0000 (16:53 +0000)]
Added fixme.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49797
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Apr 2008 16:39:56 +0000 (16:39 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49796
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Apr 2008 15:51:26 +0000 (15:51 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49791
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Apr 2008 06:53:09 +0000 (06:53 +0000)]
Take a stab at highlighting #defines and #includes. This doesn't work yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49781
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Apr 2008 06:35:07 +0000 (06:35 +0000)]
Syntax highlight keywords. I assume someone else will pick less appaling colors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49780
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Apr 2008 06:32:08 +0000 (06:32 +0000)]
split syntax highlighting of macros from keywords and comments,
allowing us to use a cheaper means to highlight keywords and making
it so that comments won't foul up macro expansions.
Start highlighting macro expansions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49779
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Apr 2008 06:11:58 +0000 (06:11 +0000)]
Add a mode of hackily syntax highlighting comments. This has a number of
problems, including the fact that it doesn't work well with multi-line
comments due to Ted's crazy table. However, that could be fixed, and it
does work with single-line ones :).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49778
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Apr 2008 05:21:09 +0000 (05:21 +0000)]
Add -o support for -emit-html, make it not produce a file on an error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49777
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Apr 2008 04:38:45 +0000 (04:38 +0000)]
Remove "--html-test" driver option and its corresponding code; all of this
functionality has been migrated into "--emit-html" and "--html-diags".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49776
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Apr 2008 04:37:29 +0000 (04:37 +0000)]
Switch AddLineNumbers to hack on a rewritebuffer instead of on a
rewriter, getting sourcelocations out of the picture.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49775
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Apr 2008 04:33:23 +0000 (04:33 +0000)]
In html::EscapeText, instead of going through the rewriter with
a SourceLocation to get a RewriteBuffer, poke the RewriteBuffer
with an offset directly. THis is no faster, but results in
cleaner code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49774
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Apr 2008 04:30:16 +0000 (04:30 +0000)]
Remove uses of "Selector&" and "const Selector&", since Selector is just an
immutable smart pointer (we don't need to pass references, just pass Selector).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49773
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Apr 2008 04:29:21 +0000 (04:29 +0000)]
Update CF reference count checker test case to illustrate the use of
toll-free bridging.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49772
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Apr 2008 04:28:53 +0000 (04:28 +0000)]
Implemented toll-free bridging support for CF Reference count checker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49771
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Apr 2008 04:28:52 +0000 (04:28 +0000)]
make a method public.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49770
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Apr 2008 04:11:35 +0000 (04:11 +0000)]
switch AddLineNumber to use a SmallString instead of sstream. This
speeds up -emit-html on ted's testcase by 29% (.138 -> 0.107s) in a
release build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49767
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Apr 2008 03:46:57 +0000 (03:46 +0000)]
speed up -emit-html in a release build by 6.5% by avoiding std::string.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49764
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Apr 2008 02:59:55 +0000 (02:59 +0000)]
Simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49763
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Apr 2008 23:44:31 +0000 (23:44 +0000)]
Added initial boilerplate to support toll-free bridging in the ref-count checker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49756
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Apr 2008 23:06:53 +0000 (23:06 +0000)]
Added some comments to GRExprEngine. Reorder some of the method definitions
to start logically organizing them.
Added initial plug-in transfer function support for Objective-C message expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49752
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Apr 2008 23:06:05 +0000 (23:06 +0000)]
Revert my previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49751
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Apr 2008 23:03:58 +0000 (23:03 +0000)]
Remove dispatch to "VisitParmVarDecl".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49750
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Apr 2008 23:02:18 +0000 (23:02 +0000)]
Change "VisitBlockVarDecl" to "VisitVarDecl". UninitializedValues now works
as before r49748 (where BlockVarDecl was removed).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49749
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 15 Apr 2008 22:42:06 +0000 (22:42 +0000)]
Remove FileVarDecl and BlockVarDecl. They are replaced by VarDecl::isBlockVarDecl() and VarDecl::isFileVarDecl().
This is a fairly mechanical/large change. As a result, I avoided making any changes/simplifications that weren't directly related. I did break two Analysis tests. I also have a couple FIXME's in UninitializedValues.cpp. Ted, can you take a look? If the bug isn't obvious, I am happy to dig in and fix it (since I broke it).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49748
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Apr 2008 21:25:08 +0000 (21:25 +0000)]
For HTML diagnostics, output more information about a bug report.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49742
91177308 -0d34-0410-b5e6-
96231b3b80d8
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