summaryrefslogtreecommitdiffstats
path: root/clang/include
diff options
context:
space:
mode:
authorGeorge Karpenkov <ekarpenkov@apple.com>2019-01-18 03:13:01 +0000
committerGeorge Karpenkov <ekarpenkov@apple.com>2019-01-18 03:13:01 +0000
commit1aa2bf8ea4dac56005be68f958c81df8f66c0f49 (patch)
tree7b69eaea31ae552eee2990cc23d0989bb1cc569b /clang/include
parenta2280e0c93ce921335589335f1a9eba10fed7360 (diff)
downloadbcm5719-llvm-1aa2bf8ea4dac56005be68f958c81df8f66c0f49.tar.gz
bcm5719-llvm-1aa2bf8ea4dac56005be68f958c81df8f66c0f49.zip
[analyzer] Extend BugType constructor to accept "SuppressOnSink" as a parameter
Differential Revision: https://reviews.llvm.org/D56884 llvm-svn: 351510
Diffstat (limited to 'clang/include')
-rw-r--r--clang/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h b/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h
index 727ec7c66a8..df1507d85b3 100644
--- a/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h
+++ b/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h
@@ -38,12 +38,14 @@ private:
virtual void anchor();
public:
- BugType(CheckName Check, StringRef Name, StringRef Cat)
+ BugType(CheckName Check, StringRef Name, StringRef Cat,
+ bool SuppressOnSink=false)
: Check(Check), Name(Name), Category(Cat), Checker(nullptr),
- SuppressOnSink(false) {}
- BugType(const CheckerBase *Checker, StringRef Name, StringRef Cat)
+ SuppressOnSink(SuppressOnSink) {}
+ BugType(const CheckerBase *Checker, StringRef Name, StringRef Cat,
+ bool SuppressOnSink=false)
: Check(Checker->getCheckName()), Name(Name), Category(Cat),
- Checker(Checker), SuppressOnSink(false) {}
+ Checker(Checker), SuppressOnSink(SuppressOnSink) {}
virtual ~BugType() = default;
StringRef getName() const { return Name; }
@@ -64,7 +66,6 @@ public:
/// type should be suppressed if the end node of the report is post-dominated
/// by a sink node.
bool isSuppressOnSink() const { return SuppressOnSink; }
- void setSuppressOnSink(bool x) { SuppressOnSink = x; }
};
class BuiltinBug : public BugType {
OpenPOWER on IntegriCloud