diff options
author | dim <dim@FreeBSD.org> | 2016-01-06 20:02:26 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2016-01-06 20:02:26 +0000 |
commit | fc74ff5a0792641885551a63d9ddf8cbfdf76e3c (patch) | |
tree | 955a1295c3fd4378a49478ad5835ca21b769417e /lib/StaticAnalyzer/Core/BugReporterVisitors.cpp | |
parent | 3176e97f130184ece0e1a21352c8124cc83ff24a (diff) | |
download | FreeBSD-src-fc74ff5a0792641885551a63d9ddf8cbfdf76e3c.zip FreeBSD-src-fc74ff5a0792641885551a63d9ddf8cbfdf76e3c.tar.gz |
Vendor import of clang trunk r256945:
https://llvm.org/svn/llvm-project/cfe/trunk@256945
Diffstat (limited to 'lib/StaticAnalyzer/Core/BugReporterVisitors.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/BugReporterVisitors.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp b/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp index ec1310d..cf1e0a6 100644 --- a/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp +++ b/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp @@ -1542,6 +1542,16 @@ LikelyFalsePositiveSuppressionBRVisitor::getEndPath(BugReporterContext &BRC, } } + // The analyzer issues a false positive when the constructor of + // std::__independent_bits_engine from algorithms is used. + if (const CXXConstructorDecl *MD = dyn_cast<CXXConstructorDecl>(D)) { + const CXXRecordDecl *CD = MD->getParent(); + if (CD->getName() == "__independent_bits_engine") { + BR.markInvalid(getTag(), nullptr); + return nullptr; + } + } + // The analyzer issues a false positive on // std::basic_string<uint8_t> v; v.push_back(1); // and |