diff options
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 7e44e6b4bd..f062c0386d 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -2328,9 +2328,10 @@ bool Sema::MergeFunctionDecl(FunctionDecl *New, Decl *OldD, Scope *S) { RequiresAdjustment = true; // Don't complain about mismatches when the default CC is - // effectively the same as the explict one. + // effectively the same as the explict one. Only Old decl contains correct + // information about storage class of CXXMethod. } else if (OldTypeInfo.getCC() == CC_Default && - isABIDefaultCC(*this, NewTypeInfo.getCC(), New)) { + isABIDefaultCC(*this, NewTypeInfo.getCC(), Old)) { NewTypeInfo = NewTypeInfo.withCallingConv(OldTypeInfo.getCC()); RequiresAdjustment = true; |