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.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.cpp b/clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.cpp
index 200f9f63780..30f86aa9e08 100644
--- a/clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.cpp
+++ b/clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.cpp
@@ -26,7 +26,8 @@ void StaticObjectExceptionCheck::registerMatchers(MatchFinder *Finder) {
// initializer that can throw.
Finder->addMatcher(
varDecl(anyOf(hasThreadStorageDuration(), hasStaticStorageDuration()),
- unless(anyOf(isConstexpr(), hasAncestor(functionDecl()))),
+ unless(anyOf(isConstexpr(), hasType(cxxRecordDecl(isLambda())),
+ hasAncestor(functionDecl()))),
anyOf(hasDescendant(cxxConstructExpr(hasDeclaration(
cxxConstructorDecl(unless(isNoThrow())).bind("func")))),
hasDescendant(cxxNewExpr(hasDeclaration(
OpenPOWER on IntegriCloud