summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.cpp b/clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.cpp
index 45f9433deab..200f9f63780 100644
--- a/clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.cpp
+++ b/clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.cpp
@@ -26,7 +26,7 @@ void StaticObjectExceptionCheck::registerMatchers(MatchFinder *Finder) {
// initializer that can throw.
Finder->addMatcher(
varDecl(anyOf(hasThreadStorageDuration(), hasStaticStorageDuration()),
- unless(hasAncestor(functionDecl())),
+ unless(anyOf(isConstexpr(), hasAncestor(functionDecl()))),
anyOf(hasDescendant(cxxConstructExpr(hasDeclaration(
cxxConstructorDecl(unless(isNoThrow())).bind("func")))),
hasDescendant(cxxNewExpr(hasDeclaration(
OpenPOWER on IntegriCloud