summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/AnalysisConsumer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Also handle CXXConstructor, CXXDestructor and CXXConversion in CFGMike Stump2010-01-201-2/+4
| | | | | | printing. llvm-svn: 93968
* Use the llvm coding convention for indentation for switch.Mike Stump2010-01-201-48/+48
| | | | llvm-svn: 93966
* Remove references to 'Checker' and 'GRTransferFuncs' fromTed Kremenek2010-01-051-8/+4
| | | | | | | | | | | | GRStateManager. Having these references was an abstraction violation, as they really should only be known about GRExprEngine. This change required adding a new 'ProcessAssume' callback in GRSubEngine. GRExprEngine implements this callback by calling 'EvalAssume' on all registered Checker objects as well as the registered GRTransferFunc object. llvm-svn: 92549
* Let constraint manager inform checkers that some assumption logic has happend.Zhongxing Xu2009-12-311-2/+2
| | | | | | | | | Add new states for symbolic regions tracked by malloc checker. This enables us to do malloc checking more accurately. See test case. Based on Lei Zhang's patch and discussion. llvm-svn: 92342
* Remove an duplicated #include.Zhongxing Xu2009-12-301-1/+0
| | | | llvm-svn: 92306
* Register call inliner as the last checker.Zhongxing Xu2009-12-231-2/+3
| | | | llvm-svn: 91992
* Migrate the call inliner to the Checker interface.Zhongxing Xu2009-12-231-5/+34
| | | | llvm-svn: 91991
* Expose C++ methods to GRExprEngine.Zhongxing Xu2009-12-161-0/+14
| | | | llvm-svn: 91506
* Add comments.Zhongxing Xu2009-12-151-1/+2
| | | | llvm-svn: 91430
* Remove displayProgress parameter.Zhongxing Xu2009-12-151-1/+0
| | | | llvm-svn: 91429
* We should only scan for nested blocks if we are analyzing the body of a ↵Ted Kremenek2009-12-121-1/+1
| | | | | | function/method. llvm-svn: 91196
* Fix crash in DisplayFunction(). ObjCInterfaceDecls can also get passed to ↵Ted Kremenek2009-12-091-8/+5
| | | | | | this function, but we don't want to display them. llvm-svn: 90944
* Add clang-cc option '-analyzer-opt-analyze-nested-blocks' to treat block ↵Ted Kremenek2009-12-071-8/+33
| | | | | | literals as an entry point for analyzer checks. llvm-svn: 90810
* Remove VISIBILITY_HIDDEN from anonymous namespaces in libFrontend.Benjamin Kramer2009-11-281-2/+1
| | | | llvm-svn: 90033
* Call GRExprEngine::setTransferFunctions() after registering all Checkers. ↵Ted Kremenek2009-11-251-2/+2
| | | | | | This allows GRTransferFuncs::RegisterChecks() to always be called after all checkers have been registered. llvm-svn: 89887
* Consolidate logic in ActionInlineCall by having it call ActionGRExprEngine ↵Ted Kremenek2009-11-251-19/+3
| | | | | | instead of replicating most of its logic (and missing pieces). llvm-svn: 89886
* Make RegisterInternalChecks() part of GRExprEngine's private implementation ↵Ted Kremenek2009-11-251-1/+0
| | | | | | by making it a static function within GRExprEngine.cpp. llvm-svn: 89884
* Register internal checks with GRExprEngine when it is constructed, not ↵Ted Kremenek2009-11-251-2/+0
| | | | | | manually in AnalysisConsumer.cpp. llvm-svn: 89883
* Silence some warnings produced by Clang, and add a missing headerDouglas Gregor2009-11-171-7/+7
| | | | llvm-svn: 89051
* Add clang-cc option "--analyzer-experimental-internal-checks". ThisTed Kremenek2009-11-131-0/+4
| | | | | | | option enables new "internal" checks that will eventually be turned on by default but still require broader testing. llvm-svn: 88671
* Add clang-cc option "-analyzer-experimental-checks" to enable experimental ↵Ted Kremenek2009-11-131-1/+3
| | | | | | path-sensitive checks. The idea is to separate "barely working" or "skunkworks" checks from ones that should always run. Later we need more fine-grain checker control. llvm-svn: 87053
* Move the ManagerRegistry to the Analysis library to resolve the layering ↵Chandler Carruth2009-11-111-1/+1
| | | | | | violation. llvm-svn: 86863
* Fix display of "ANALYZE" statements in AnalysisConsumer by correctly ↵Ted Kremenek2009-11-111-114/+146
| | | | | | resetting the flag indicating that the current Decl* has not yet been displayed. Also move this out of AnalysisManager, since AnalysisManager should not handle text output to the user. llvm-svn: 86812
* Add a checker for CWE-467: Use of sizeof() on a Pointer Type.Zhongxing Xu2009-11-081-0/+5
| | | | llvm-svn: 86464
* Convert CreateAnalysisConsumer and friends to just take a const ↵Daniel Dunbar2009-11-051-25/+21
| | | | | | Preprocessor&, and simplify. llvm-svn: 86112
* Acting on Daniel's nagging, remove PathDiagnosticClientFactory() andTed Kremenek2009-11-051-3/+2
| | | | | | | | migrate work in the destructors of PathDiagnosticClients from their destructors to FlushReports(). The destructors now currently call FlushReports(); this will be fixed in a subsequent patch. llvm-svn: 86108
* Kill PreprocessorFactory, which was both morally repugnant and totally unused.Daniel Dunbar2009-11-041-12/+7
| | | | llvm-svn: 86076
* Remove unused header.Daniel Dunbar2009-11-021-1/+0
| | | | llvm-svn: 85828
* Add destructor and cleanup code to LocationContext (fixing some leaks). ↵Ted Kremenek2009-10-201-0/+3
| | | | | | | | | Along the way, have AnalysisManager periodically cleanup its AnalysisContextManager and LocationContextManager objects, as they don't need to forever retain all the CFGs ever created when analyzing a file. llvm-svn: 84684
* PR5218: Replace IdentifierInfo::getName with StringRef version, now that clientsDaniel Dunbar2009-10-181-1/+1
| | | | | | are updated. llvm-svn: 84447
* Hoist some branches in AnalysisManager::HandleTranslationUnit so weTed Kremenek2009-09-261-16/+19
| | | | | | | | avoid scanning for an "entry point" FunctionDecl if we (a) have no translation unit actions and (b) no entry point function has been specified. llvm-svn: 82846
* Fix regression introduced by r82198 that caused functions/methods with ↵Ted Kremenek2009-09-181-1/+6
| | | | | | invalid CFGs to get analyzed. llvm-svn: 82297
* Introduce caching of diagnostics in BugReporter. This provides extraTed Kremenek2009-09-181-15/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | pruning of diagnostics that may be emitted multiple times. This is accomplished by adding FoldingSet profiling support to PathDiagnostic, and then having BugReporter record what diagnostics have been issued. This was motived to a serious bug introduced by moving the 'divide-by-zero' checking outside of GRExprEngine into a separate 'Checker' class. When analyzing code using the '-fobjc-gc' option, a given function would be analyzed twice, but the second time various "internal checks" would be disabled to avoid emitting multiple diagnostics (e.g., "null dereference") for the same issue. The problem is that such checks also effect path pruning and don't just emit diagnostics. This resulted in an assertion failure involving a real divide-by-zero in some analyzed code where we would get an assertion failure in APInt because the 'DivZero' check was disabled and didn't prune the logic that resulted in the divide-by-zero in the analyzer. The implemented solution is somewhat of a hack, and may not perform extremely well. This will need to be cleaned up over time. As a regression test, 'misc-ps.m' has been modified so that its tests are run using -fobjc-gc to test this diagnostic pruning behavior. llvm-svn: 82198
* Start to add a new transfer function that inlines callee. To be continued.Zhongxing Xu2009-09-111-0/+22
| | | | llvm-svn: 81501
* Make AnalysisManager stateless. Now other analyzer components only depends onZhongxing Xu2009-09-101-46/+55
| | | | | | local node information. llvm-svn: 81433
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-72/+72
| | | | llvm-svn: 81346
* Update clang for raw_fd_ostream no longer requiring F_Force.Dan Gohman2009-08-251-2/+1
| | | | llvm-svn: 79991
* Remove CodeDecl and CFG from GRExprEngine and GRStateManager.Zhongxing Xu2009-08-251-6/+3
| | | | | | | Now AnalysisManager is the only place we can get CodeDecl. This leads to an API change: GRState::bindExpr() now takes the CFG argument. llvm-svn: 79980
* API changes to match llvm ToT.Chris Lattner2009-08-231-3/+2
| | | | llvm-svn: 79868
* Replace cerr with errs().Benjamin Kramer2009-08-231-6/+5
| | | | llvm-svn: 79854
* adjust for raw_fd_ostream api change.Chris Lattner2009-08-231-2/+2
| | | | llvm-svn: 79809
* Tie the local check NSErrorCheck to a Decl to pave the wayZhongxing Xu2009-08-211-1/+1
| | | | | | to untie the ExplodedGraph from a specific Decl. llvm-svn: 79588
* Extend the ProgramPoint to include the context information LocationContext,Zhongxing Xu2009-08-151-2/+2
| | | | | | | which is either a stack frame context of the function or a local scope context. llvm-svn: 79072
* As GRState seems general enough, it is time to merge some template classes Zhongxing Xu2009-08-061-8/+8
| | | | | | | and their impl base classes. This can greatly simply some code of the core analysis engine. This patch merges ExplodedNodeImpl into ExplodedNode. llvm-svn: 78270
* now we can let AnalysisManager to own the PathDiagnosticClient.Zhongxing Xu2009-08-031-6/+8
| | | | llvm-svn: 77945
* Create only one AnalysisManager for each translation unit. In HandleCode(),Zhongxing Xu2009-08-031-14/+11
| | | | | | reset the current analysis context of the AnalysisManager. llvm-svn: 77943
* Fix regression caused by recent refactoring where HTML and plist files would ↵Ted Kremenek2009-08-021-0/+5
| | | | | | not get flushed out when using '-disable-free'. llvm-svn: 77882
* Fix use-after-release bug introduced in r77585 where the PathDiagnosticClientTed Kremenek2009-07-311-5/+4
| | | | | | | | | | | | | | | created by AnalysisConsumer would be released by an instance of AnalysisManager and then reused by later instances of AnalysisManager. Ownership of the PathDiagnosticClient now belongs (for now) in AnalysisConsumer. We also need this layering (for now) because the HTMLDiagnostiClient requires that the entire translation unit be processed before emitting diagnostics. This is done in its destructor (which should also be fixed, but that is another issue). This fixes PR 4653. llvm-svn: 77648
* Initialize an otherwise-wild pointer. Fixes a crashy analyzerDouglas Gregor2009-07-301-1/+1
| | | | llvm-svn: 77599
* simple fixes.Zhongxing Xu2009-07-301-4/+2
| | | | llvm-svn: 77587
OpenPOWER on IntegriCloud