[clang][Interp][NFC] Fix instance method check
authorTimm Bäder <tbaeder@redhat.com>
Fri, 28 Oct 2022 10:48:40 +0000 (12:48 +0200)
committerTimm Bäder <tbaeder@redhat.com>
Fri, 28 Oct 2022 10:49:38 +0000 (12:49 +0200)
This was a change suggested by Aaron that I forgot to commit.

clang/lib/AST/Interp/ByteCodeEmitter.cpp

index 1328470..5bd6d51 100644 (file)
@@ -44,10 +44,10 @@ ByteCodeEmitter::compileFunc(const FunctionDecl *FuncDecl) {
 
   // If the function decl is a member decl, the next parameter is
   // the 'this' pointer. This parameter is pop()ed from the
-  // InterStack when calling the function.
+  // InterpStack when calling the function.
   bool HasThisPointer = false;
   if (const auto *MD = dyn_cast<CXXMethodDecl>(FuncDecl);
-      MD && !MD->isStatic()) {
+      MD && MD->isInstance()) {
     HasThisPointer = true;
     ParamTypes.push_back(PT_Ptr);
     ParamOffset += align(primSize(PT_Ptr));