summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Added initial boilerplate to support toll-free bridging in the ref-count ↵Ted Kremenek2008-04-151-0/+40
| | | | | | checker. llvm-svn: 49756
* Added some comments to GRExprEngine. Reorder some of the method definitionsTed Kremenek2008-04-153-317/+403
| | | | | | | | to start logically organizing them. Added initial plug-in transfer function support for Objective-C message expressions. llvm-svn: 49752
* Change "VisitBlockVarDecl" to "VisitVarDecl". UninitializedValues now worksTed Kremenek2008-04-151-1/+1
| | | | | | as before r49748 (where BlockVarDecl was removed). llvm-svn: 49749
* Remove FileVarDecl and BlockVarDecl. They are replaced by ↵Steve Naroff2008-04-1516-151/+125
| | | | | | | | 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). llvm-svn: 49748
* For HTML diagnostics, output more information about a bug report.Ted Kremenek2008-04-151-1/+10
| | | | llvm-svn: 49742
* Fix bug in terminator processing for uninitialized-values: simply ignore the ↵Ted Kremenek2008-04-152-17/+73
| | | | | | | | | | 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. llvm-svn: 49734
* Fix a compiler error on MSVC (variable name 'E' clash).Argyrios Kyrtzidis2008-04-151-1/+1
| | | | llvm-svn: 49727
* finish commenting RewriteRopeChris Lattner2008-04-151-2/+65
| | | | llvm-svn: 49712
* Improve dead store diagnostic.Ted Kremenek2008-04-151-1/+1
| | | | llvm-svn: 49711
* Added initial support into the flow-sensitive dataflow solver to visit the ↵Ted Kremenek2008-04-152-1/+21
| | | | | | | | | | | | | 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). llvm-svn: 49709
* Bug fix in dead stores: don't always check the liveness of the first declTed Kremenek2008-04-151-1/+1
| | | | | | in a DeclStmt. llvm-svn: 49708
* ++/-- makes a variable live since it is used; thus the liveness state isTed Kremenek2008-04-151-3/+3
| | | | | | "Alive" as opposed to staying the same. llvm-svn: 49707
* Bug fix in LiveVariables: Operators ++/-- may kill a value, but the variableTed Kremenek2008-04-151-6/+5
| | | | | | is still live. llvm-svn: 49705
* Fix a corner case that ted hit in -emit-html, rdar://5863212Chris Lattner2008-04-151-1/+1
| | | | llvm-svn: 49703
* New AST representation for each objc2's property declaration.Fariborz Jahanian2008-04-144-55/+35
| | | | llvm-svn: 49699
* simplify the implementation of the insert/split operation to returnChris Lattner2008-04-141-98/+98
| | | | | | | the new RHS directly instead of indirecting through the 'InsertResult' struct. This eliminates InsertResult. llvm-svn: 49694
* Add a bunch of comments, move RewriteRope::MakeRopeString out of line.Chris Lattner2008-04-141-0/+47
| | | | llvm-svn: 49689
* Fix regression in Diagnostic that caused it to not register the numberTed Kremenek2008-04-141-2/+3
| | | | | | of errors. llvm-svn: 49686
* Added "getCanonicalID()", "isFromSameFile", and "isFromMainFile" to compareTed Kremenek2008-04-141-0/+4
| | | | | | | | 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. llvm-svn: 49682
* fix more uninit ivars, who wrote this junk? :)Chris Lattner2008-04-141-2/+2
| | | | llvm-svn: 49679
* Fix an assertion ted was hitting, due to an uninitialized variable.Chris Lattner2008-04-141-1/+1
| | | | llvm-svn: 49678
* Only increment the number of diagnostics when the DiagnosticClient usedTed Kremenek2008-04-141-2/+6
| | | | | | is the one attached to the Diagnostic object. llvm-svn: 49677
* Don't flag dead stores that occur in macros.Ted Kremenek2008-04-141-0/+4
| | | | llvm-svn: 49672
* Have BugReporter::EmitWarning use the PathDiagnosticClient if it is available.Ted Kremenek2008-04-141-10/+22
| | | | llvm-svn: 49668
* move a ton of code out of line, from RewriteRope.h -> RewriteRope.cppChris Lattner2008-04-141-0/+672
| | | | llvm-svn: 49664
* Bug fix in dead-store checker when walking the Decls in a DeclStmt: don'tTed Kremenek2008-04-141-2/+5
| | | | | | assume that DeclStmts only have VarDecls; they can have TypedefDecls. llvm-svn: 49662
* Treat calls to unresolved functions in the CF-ref count checker as callsTed Kremenek2008-04-141-8/+6
| | | | | | to functions with NULL summaries. llvm-svn: 49660
* Hooked up the dead-store checker to the BugReporter interface. Now dead-storeTed Kremenek2008-04-145-111/+179
| | | | | | warnings are emitted as part of the warnings registered by GRSimpleVals. llvm-svn: 49658
* remove ifdefsChris Lattner2008-04-141-35/+0
| | | | llvm-svn: 49651
* Change the RewriteRope::Chunks data structure from an std::list intoChris Lattner2008-04-142-9/+26
| | | | | | | | | | | | 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. llvm-svn: 49635
* Enable clang to codegen emmintrin.h until we have our own emmintrin.hNate Begeman2008-04-141-31/+331
| | | | llvm-svn: 49633
* Fix typoNate Begeman2008-04-141-1/+1
| | | | llvm-svn: 49632
* Argiris Kirtzidis's fix for handling empty IdDeclInfo's in ↵Douglas Gregor2008-04-141-1/+1
| | | | | | IdentifierResolver::AddDecl llvm-svn: 49631
* Make Parser::getAccessSpecifierIfPresent const, since it does not modify the ↵Douglas Gregor2008-04-141-2/+2
| | | | | | state llvm-svn: 49629
* Move IdDeclInfoMap class in an anonymous namespace. Suggestion by Chris Lattner.Argyrios Kyrtzidis2008-04-142-10/+15
| | | | llvm-svn: 49628
* This patch adds very basic support for parsing and type-checking classDouglas Gregor2008-04-134-39/+292
| | | | | | | | | | | 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). llvm-svn: 49623
* Introduce support for finding class and enum names via ordinary name lookup ↵Douglas Gregor2008-04-135-21/+65
| | | | | | in C++ llvm-svn: 49621
* Fix PR2220, making diagnostics for unexpected tokens in pp expressions Chris Lattner2008-04-131-3/+3
| | | | | | more nice. llvm-svn: 49619
* This patch is just the easy part of the class names patch, whichChris Lattner2008-04-135-7/+21
| | | | | | | | | | | | | | | | 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! llvm-svn: 49613
* Change the btree algorithm to split nodes bottom-up instead of top-down.Chris Lattner2008-04-131-77/+115
| | | | | | | | 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). llvm-svn: 49609
* split node splitting from interior node restructuring.Chris Lattner2008-04-131-37/+61
| | | | llvm-svn: 49608
* update to follow mainline llvm API change.Chris Lattner2008-04-137-28/+25
| | | | llvm-svn: 49607
* Use static_cast<> instead of cast<> in Decl::Destroy(). Suggestion by ArgirisSam Bishop2008-04-131-2/+5
| | | | | | Kirtzidis! llvm-svn: 49603
* Default argument cleanups and minor improvements, patch byChris Lattner2008-04-123-63/+61
| | | | | | Doug Gregor! llvm-svn: 49598
* final cleanup, the code is now in a reviewable state.Chris Lattner2008-04-121-1/+6
| | | | llvm-svn: 49592
* move the DeltaTree implementation out of line, remove debugging printfs etc.Chris Lattner2008-04-121-0/+416
| | | | llvm-svn: 49591
* remove ifdefsChris Lattner2008-04-121-77/+0
| | | | llvm-svn: 49587
* Do an initial hack at replacing one of the incredibly inefficient Chris Lattner2008-04-121-2/+13
| | | | | | | | | | | | | | | (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. llvm-svn: 49586
* Use std::list's push_back instead of resize to add an element.Argyrios Kyrtzidis2008-04-121-2/+2
| | | | llvm-svn: 49582
* don't diagnose empty source files, thanks Neil!Chris Lattner2008-04-121-2/+3
| | | | llvm-svn: 49575
OpenPOWER on IntegriCloud