summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] Prevent AnalyzerStatsChecker from crashPeter Szecsi2018-02-211-0/+2
| | | | | | | | | | | | The checker marks the locations where the analyzer creates sinks. However, it can happen that the sink was created because of a loop which does not contain condition statement, only breaks in the body. The exhausted block is the block which should contain the condition but empty, in this case. This change only emits this marking in order to avoid the undefined behavior. Differential Revision: https://reviews.llvm.org/D42266 llvm-svn: 325693
* Avoid overly large SmallPtrSet/SmallSetMatthias Braun2016-01-301-1/+1
| | | | | | | | | These sets perform linear searching in small mode so it is never a good idea to use SmallSize/N bigger than 32. Differential Revision: http://reviews.llvm.org/D16705 llvm-svn: 259284
* [analyzer] Apply whitespace cleanups by Honggyu Kim.Ted Kremenek2015-09-081-1/+1
| | | | llvm-svn: 246978
* [C++11] Use 'nullptr'. StaticAnalyzer edition.Craig Topper2014-05-271-1/+1
| | | | llvm-svn: 209642
* [Modules] Fix potential ODR violations by sinking the DEBUG_TYPEChandler Carruth2014-04-221-2/+2
| | | | | | | | | | definition below all of the header #include lines, clang edition. If you want more details about this, you can see some of the commits to Debug.h in LLVM recently. This is just the clang section of a cleanup I've done for all uses of DEBUG_TYPE in LLVM. llvm-svn: 206849
* Expose the name of the checker producing each diagnostic message.Alexander Kornienko2014-02-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In clang-tidy we'd like to know the name of the checker producing each diagnostic message. PathDiagnostic has BugType and Category fields, which are both arbitrary human-readable strings, but we need to know the exact name of the checker in the form that can be used in the CheckersControlList option to enable/disable the specific checker. This patch adds the CheckName field to the CheckerBase class, and sets it in the CheckerManager::registerChecker() method, which gets them from the CheckerRegistry. Checkers that implement multiple checks have to store the names of each check in the respective registerXXXChecker method. Reviewers: jordan_rose, krememek Reviewed By: jordan_rose CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2557 llvm-svn: 201186
* Remove the CFGElement "Invalid" state.David Blaikie2013-02-231-4/+4
| | | | | | | | | | | | | Use Optional<CFG*> where invalid states were needed previously. In the one case where that's not possible (beginAutomaticObjDtorsInsert) just use a dummy CFGAutomaticObjDtor. Thanks for the help from Jordan Rose & discussion/feedback from Ted Kremenek and Doug Gregor. Post commit code review feedback on r175796 by Ted Kremenek. llvm-svn: 175938
* Replace ProgramPoint llvm::cast support to be well-defined.David Blaikie2013-02-211-1/+1
| | | | | | See r175462 for another example/more details. llvm-svn: 175812
* Replace CFGElement llvm::cast support to be well-defined.David Blaikie2013-02-211-2/+2
| | | | | | See r175462 for another example/more details. llvm-svn: 175796
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-4/+3
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* Include pruning and general cleanup.Benjamin Kramer2012-12-011-0/+1
| | | | llvm-svn: 169095
* Include the "issue context" (e.g. function or method) where a static ↵Ted Kremenek2012-04-041-4/+5
| | | | | | | | analyzer issue occurred in the plist output. Fixes <rdar://problem/11004527> llvm-svn: 154030
* [analyzer] Refactor: Use Decl when determining if the Block belongs toAnna Zaks2012-03-281-7/+6
| | | | | | | | the root function. (This is a bit cleaner then using the StackFrame.) llvm-svn: 153580
* [analyzer] Stats checker: minor interprocedural tweaks.Anna Zaks2012-03-271-15/+20
| | | | | | | | | Report root function name with exhausted block diagnostic. Also, use stack frames, not just any location context when checking if the basic block is in the same context. llvm-svn: 153532
* [analyzer] Add stats useful for coverage investigations.Anna Zaks2012-03-221-0/+10
| | | | llvm-svn: 153280
* [analyzer] Add inlining awareness to the block coverage computationAnna Zaks2012-03-221-5/+12
| | | | | | (Stats Checker). llvm-svn: 153279
* Basic: import SmallString<> into clang namespaceDylan Noblesmith2012-02-051-1/+1
| | | | | | | (I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) llvm-svn: 149799
* Move a method from IdentifierTable.h out of line and remove the SmallString ↵Benjamin Kramer2012-02-041-0/+1
| | | | | | | | include. Fix all the transitive include users. llvm-svn: 149783
* StaticAnalyzer: Move ObjC- and CXX-specific methods out of line so checkers ↵Benjamin Kramer2012-01-281-0/+1
| | | | | | that don't care about the language don't have to pull in all the headers. llvm-svn: 149178
* Rename AnalysisContext to AnalysisDeclContext. Not only is this name more ↵Ted Kremenek2011-10-241-1/+1
| | | | | | accurate, but it frees up the name AnalysisContext for other uses. llvm-svn: 142782
* Change operator<< for raw_ostream and NamedDecl to take a reference instead ↵Benjamin Kramer2011-10-141-1/+1
| | | | | | | | of a pointer. Passing a pointer was a bad idea as it collides with the overload for void*. llvm-svn: 141971
* [analyzer] Refactor PathDiagnosticLocation: Make ↵Anna Zaks2011-09-201-2/+3
| | | | | | | | PathDiagnosticLocation(SourceLocation...) private. Most of the effort here goes to making BugReport refer to a PathDiagnosticLocation instead of FullSourceLocation. (Another step closer to the goal of having Diagnostics which can recover from invalid SourceLocations.) llvm-svn: 140182
* Teach IdempotentOperationsChecker about paths aborted because ExprEngine ↵Ted Kremenek2011-04-021-5/+5
| | | | | | didn't know how to handle a specific Expr type. llvm-svn: 128761
* static analyzer: Rename 'BlocksAborted' to 'BlocksExhausted' to reflect that ↵Ted Kremenek2011-04-021-1/+1
| | | | | | a given CFGBlock was analyzed too many times. llvm-svn: 128760
* [analyzer] Rename CheckerV2 -> Checker.Argyrios Kyrtzidis2011-03-011-2/+2
| | | | llvm-svn: 126726
* [analyzer] Turn -analyzer-stats into -analyzer-checker=debug.StatsArgyrios Kyrtzidis2011-02-281-21/+13
| | | | llvm-svn: 126608
* Split 'include/clang/StaticAnalyzer' into ↵Ted Kremenek2011-02-101-3/+3
| | | | | | | | 'include/clang/StaticAnalyzer/Core' and 'include/clang/StaticAnalyzer/Checkers'. This layout matches lib/StaticAnalyzer, which corresponds to two StaticAnalyzer libraries. llvm-svn: 125251
* [analyzer] Move the files in lib/StaticAnalyzer to lib/StaticAnalyzer/Core.Argyrios Kyrtzidis2011-02-081-0/+123
Eventually there will also be a lib/StaticAnalyzer/Frontend that will handle initialization and checker registration. Yet another library to avoid cyclic dependencies between Core and Checkers. llvm-svn: 125124
OpenPOWER on IntegriCloud