[PATCH] D118996: [clang-tidy] Support C++14 in bugprone-signal-handler.

Whisperity via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 11 09:44:54 PDT 2022


whisperity added a comment.

@njames93 What do you think about the current approach? It will under-approximate the problem-inducing node set but at least cover what we know about C++ now.

(@balazske please mark //"Done"// the answered discussion threads.)



================
Comment at: clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp:284-296
+  return isa<CoreturnStmt>(S) || isa<CoroutineBodyStmt>(S) ||
+         isa<MSDependentExistsStmt>(S) || isa<CUDAKernelCallExpr>(S) ||
+         isa<MSPropertyRefExpr>(S) || isa<MSPropertySubscriptExpr>(S) ||
+         isa<LambdaExpr>(S) || isa<TypeTraitExpr>(S) ||
+         isa<ArrayTypeTraitExpr>(S) || isa<ExpressionTraitExpr>(S) ||
+         isa<OverloadExpr>(S) || isa<DependentScopeDeclRefExpr>(S) ||
+         isa<ExprWithCleanups>(S) || isa<PackExpansionExpr>(S) ||
----------------
`isa<>` is a variadic template since a few major releases ago, i.e. `isa<T1, T2, T3>(X)` is supported too.

(Also, please order this alphabetically, so it's easier to read and insert into at later edits.)


================
Comment at: clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp:285
+  return isa<CoreturnStmt>(S) || isa<CoroutineBodyStmt>(S) ||
+         isa<MSDependentExistsStmt>(S) || isa<CUDAKernelCallExpr>(S) ||
+         isa<MSPropertyRefExpr>(S) || isa<MSPropertySubscriptExpr>(S) ||
----------------
Is CUDA built upon C++-specific features?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118996/new/

https://reviews.llvm.org/D118996



More information about the cfe-commits mailing list