[clang-tools-extra] [clang-analysis]Fix false positive in mutation check when using pointer to member function (PR #66846)

via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 20 19:58:36 PDT 2023


================
@@ -100,6 +100,20 @@ AST_MATCHER(CXXTypeidExpr, isPotentiallyEvaluated) {
   return Node.isPotentiallyEvaluated();
 }
 
+AST_MATCHER(CXXMemberCallExpr, isConstCallee) {
+  const auto *CalleeDecl = Node.getCalleeDecl();
+  const auto *VD = dyn_cast_or_null<ValueDecl>(CalleeDecl);
+  if (!VD)
+    return false;
+  const auto T = VD->getType().getCanonicalType();
----------------
EugeneZelenko wrote:

Ditto.

https://github.com/llvm/llvm-project/pull/66846


More information about the cfe-commits mailing list