[llvm-branch-commits] [clang] [analyzer][NFC] Determine object parameter constness for getExtraInvalidatedValues (PR #223272)

Donát Nagy via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Sep 14 04:43:19 PDT 2026


================
@@ -758,14 +758,26 @@ const FunctionDecl *CXXInstanceCall::getDecl() const {
   return getSVal(CE->getCallee()).getAsFunctionDecl();
 }
 
+static bool hasConstObjectParameter(const CXXMethodDecl *MD) {
----------------
NagyDonat wrote:

Now that we have explicit object parameters, I would guess that the majority of call sites of `CXXMethodDecl::isConst` would need to use this logic instead – so perhaps this should be introduced as a method of `CXXMethodDecl` or as an optional `bool CheckExplicitObject` flag of `isConst`.

@Xazax-hun  What do you think?

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


More information about the llvm-branch-commits mailing list