Author: Timm Bäder Date: 2022-10-28T12:49:38+02:00 New Revision: 7f3013c5f9767c3dabd41d4219893e3154b126ea
URL: https://github.com/llvm/llvm-project/commit/7f3013c5f9767c3dabd41d4219893e3154b126ea DIFF: https://github.com/llvm/llvm-project/commit/7f3013c5f9767c3dabd41d4219893e3154b126ea.diff LOG: [clang][Interp][NFC] Fix instance method check This was a change suggested by Aaron that I forgot to commit. Added: Modified: clang/lib/AST/Interp/ByteCodeEmitter.cpp Removed: ################################################################################ diff --git a/clang/lib/AST/Interp/ByteCodeEmitter.cpp b/clang/lib/AST/Interp/ByteCodeEmitter.cpp index 13284703bba1..5bd6d51e78ab 100644 --- a/clang/lib/AST/Interp/ByteCodeEmitter.cpp +++ b/clang/lib/AST/Interp/ByteCodeEmitter.cpp @@ -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)); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits