summaryrefslogtreecommitdiffstats
path: root/clang/lib/Checker/GRCoreEngine.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] Refactoring: lib/Checker -> lib/GR and libclangChecker -> ↵Argyrios Kyrtzidis2010-12-221-806/+0
| | | | | | libclangGRCore llvm-svn: 122421
* [analyzer] Refactoring: include/clang/Checker -> include/clang/GRArgyrios Kyrtzidis2010-12-221-3/+3
| | | | llvm-svn: 122420
* Rename 'Generate[Node,Sink]' to 'generate[Node,Sink]'.Ted Kremenek2010-12-201-8/+8
| | | | llvm-svn: 122270
* Start migration of static analyzer to using theTed Kremenek2010-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit lvalue-to-rvalue casts that John McCall recently introduced. This causes a whole bunch of logic in the analyzer for handling lvalues to vanish. It does, however, raise a few issues in the analyzer w.r.t to modeling various constructs (e.g., field accesses to compound literals). The .c/.m analysis test cases that fail are due to a missing lvalue-to-rvalue cast that will get introduced into the AST. The .cpp failures were more than I could investigate in one go, and the patch was already getting huge. I have XFAILED some of these tests, and they should obviously be further investigated. Some highlights of this patch include: - CFG no longer requires an lvalue bit for CFGElements - StackFrameContext doesn't need an 'asLValue' flag - The "VisitLValue" path from GRExprEngine has been eliminated. Besides the test case failures (XFAILed), there are surely other bugs that are fallout from this change. llvm-svn: 121960
* Let StackFrameContext represent if the call expr is evaluated as lvalue.Zhongxing Xu2010-11-241-1/+1
| | | | | | This is required for supporting const reference to temporary objects. llvm-svn: 120093
* Use StackFrameContext directly in CallEnter program point. Then we don't needZhongxing Xu2010-11-241-5/+4
| | | | | | to remake the stackframe everytime in GRExprEngine::ProcessCallEnter(). llvm-svn: 120087
* Add comments.Zhongxing Xu2010-11-201-1/+2
| | | | llvm-svn: 119900
* Handle member initializer in C++ ctor. Zhongxing Xu2010-11-161-6/+11
| | | | | | | | | - Add a new Kind of ProgramPoint: PostInitializer. - Still use GRStmtNodeBuilder. But special handling PostInitializer in GRStmtNodeBuilder::GenerateAutoTransition(). - Someday we should clean up the interface of GRStmtNodeBuilder. llvm-svn: 119335
* Add skeleton for handling other kinds of CFGElements.Zhongxing Xu2010-11-151-2/+2
| | | | llvm-svn: 119135
* Add GRWorkList::VisitItemsInWorkList() to allow a client to introspect the ↵Ted Kremenek2010-11-131-8/+40
| | | | | | | | | contents of a worklist. This API required changing the BFS worklist to use a deque instead of a queue, but that is better for performance reasons anyway. llvm-svn: 118982
* Remove unused variable.Ted Kremenek2010-10-211-1/+0
| | | | llvm-svn: 116995
* Remove obsolete GRAuditor and GRSimpleAPICheck, which have been completely ↵Ted Kremenek2010-10-201-6/+2
| | | | | | subsumed by the Checker interface. llvm-svn: 116973
* Convert GRSimpleAPIChecks in BasicObjCFoundationChecks to be Checkers.Ted Kremenek2010-10-201-7/+1
| | | | llvm-svn: 116971
* Added two new command line arguments:Marcin Swiderski2010-09-301-1/+3
| | | | | | | -cfg-add-implicit-dtors - sets CFG::BuildOptions::AddImplicitDtors for AnalysisCosumer to true, -cfg-add-initializers - sets CFG::BuildOptions::AddInitializers for AnalysisCosumer to true. llvm-svn: 115142
* Change -analyzer-max-nodes to allow 0 as a parameter. This allows the ↵Tom Care2010-09-291-2/+10
| | | | | | analyzer to completely analyze a worklist regardless of time taken. llvm-svn: 115108
* Rename 'MaxLoop' to 'MaxVisit' in AnalysisManager to more correctly reflect ↵Tom Care2010-09-141-1/+1
| | | | | | that we aborted analysis may not necessarily be due to a loop. llvm-svn: 113862
* More PCH -> AST renaming.Sebastian Redl2010-08-181-1/+1
| | | | llvm-svn: 111472
* Have GRCoreEngine record the blocks where analysis was aborted because we ↵Ted Kremenek2010-08-111-3/+4
| | | | | | visited a block too many times along a given path. This is to support the unreachable code analysis. llvm-svn: 110755
* Add -cc1 option '-unoptimized-cfg' to toggle using a CFG (for static ↵Ted Kremenek2010-08-031-1/+2
| | | | | | analysis) that doesn't prune CFG edges. llvm-svn: 110087
* Make a bunch of new data structures for the new analysisZhongxing Xu2010-07-221-4/+73
| | | | | | | engine of the new translation unit. State marshal is there but no real work is done. End nodes are passed back. llvm-svn: 109105
* Move some methods inline.Zhongxing Xu2010-07-211-34/+0
| | | | llvm-svn: 108988
* Constify all references to Stmt* and CFGBlock* in libChecker.Zhongxing Xu2010-07-201-16/+17
| | | | llvm-svn: 108811
* Constify.Zhongxing Xu2010-07-201-1/+1
| | | | llvm-svn: 108800
* Reapply r108617.Zhongxing Xu2010-07-191-2/+8
| | | | llvm-svn: 108668
* Revert r108617, it broke the build.Benjamin Kramer2010-07-171-8/+2
| | | | llvm-svn: 108621
* Prepare the analyzer for the callee in another translation unit:Zhongxing Xu2010-07-171-2/+8
| | | | | | | Let AnalysisContext contain a TranslationUnit. Let CallEnter refer to an AnalysisContext instead of a FunctionDecl. llvm-svn: 108617
* Tweaker Checker::VisitEndAnalysis to have 'hasWorkRemaining' alsoTed Kremenek2010-06-291-2/+5
| | | | | | | be true if some paths were aborted because they exceeded the maximum loop unrolling count. llvm-svn: 107209
* Add 'VisitEndAnalysis' callback to Checker class. This callback is called ↵Ted Kremenek2010-06-231-0/+1
| | | | | | | | | by GRExprEngine when the worklist algorithm has terminated. This allows some checkers to do a post-analysis phase after all paths have been analyzed. llvm-svn: 106689
* Move GRStmtNodeBuilder::MakeNode() out of line. No functionality change.Zhongxing Xu2010-04-141-0/+27
| | | | llvm-svn: 101239
* Since we now may have basicblocks with the same block is in different function,Zhongxing Xu2010-03-231-4/+6
| | | | | | | change the block counter map from unsigned -> unsigned to <StackFrameContext*, unsigned> -> unsigned. llvm-svn: 99255
* Remove reference to AnalysisContext in Environment. We already have ↵Zhongxing Xu2010-03-051-1/+0
| | | | | | | | LocationContext information in ExplodedNode. llvm-svn: 97785
* When profiling Environment, also profile with AnalysisContext*, bacauseZhongxing Xu2010-03-041-0/+1
| | | | | | | | | | we now may have identical states with different analysis context. Set the right AnalysisContext in state when entering and leaving a callee. With both of the above changes, we can pass the test case. llvm-svn: 97724
* Remove derelict GRStmtNodeBuilder::LastNode.Zhongxing Xu2010-02-261-4/+2
| | | | llvm-svn: 97207
* Restore Zhongxing's commits r97122 r97127 r97129 r97131 which were reverted ↵Douglas Gregor2010-02-251-1/+97
| | | | | | due to a Clang-on-Clang failure llvm-svn: 97162
* Revert patches r97122 r97127 r97129 r97131.Jakob Stoklund Olesen2010-02-251-97/+1
| | | | | | They were breaking clang-x86_64-darwin10-selfhost llvm-svn: 97138
* Move the GenerateCallExitNode logic completely into GREndPathNodeBuilder.Zhongxing Xu2010-02-251-1/+7
| | | | llvm-svn: 97131
* Move the dead bindings removal logic from CallInliner to ↵Zhongxing Xu2010-02-251-2/+2
| | | | | | GRExprEngine::ProcessCallExit(). llvm-svn: 97129
* Add comments.Zhongxing Xu2010-02-251-1/+3
| | | | llvm-svn: 97127
* Call inliner improvements:Zhongxing Xu2010-02-251-0/+88
| | | | | | | | | | | | | | This patch implements the CallEnter/CallExit idea of Ted. Add two interfaces to GRSubEngine: ProcessCallEnter, ProcessCallExit. The CallEnter program point uses caller's location context. The CallExit program point uses callee's location context. CallEnter is built by GRStmtNodeBuilder. CallExit is built by GREndPathNodeBuilder. llvm-svn: 97122
* Split libAnalysis into two libraries: libAnalysis and libChecker.Ted Kremenek2010-01-251-0/+599
(1) libAnalysis is a generic analysis library that can be used by Sema. It defines the CFG, basic dataflow analysis primitives, and inexpensive flow-sensitive analyses (e.g. LiveVariables). (2) libChecker contains the guts of the static analyzer, incuding the path-sensitive analysis engine and domain-specific checks. Now any clients that want to use the frontend to build their own tools don't need to link in the entire static analyzer. This change exposes various obvious cleanups that can be made to the layout of files and headers in libChecker. More changes pending. :) This change also exposed a layering violation between AnalysisContext and MemRegion. BlockInvocationContext shouldn't explicitly know about BlockDataRegions. For now I've removed the BlockDataRegion* from BlockInvocationContext (removing context-sensitivity; although this wasn't used yet). We need to have a better way to extend BlockInvocationContext (and any LocationContext) to add context-sensitivty. llvm-svn: 94406
OpenPOWER on IntegriCloud