diff options
author | Timur Iskhodzhanov <timurrrr@google.com> | 2013-02-22 12:42:50 +0000 |
---|---|---|
committer | Timur Iskhodzhanov <timurrrr@google.com> | 2013-02-22 12:42:50 +0000 |
commit | 33b52ad7d30ebd9119e2c3e34e9294ee830288f6 (patch) | |
tree | 4d80172197e91b0f070100afa45fdf85f84affd0 /lib/Sema/SemaDecl.cpp | |
parent | 9672b90e6c4d79cc8a919c92af1a869f813e1d1c (diff) |
Fix MergeFunctionDecl implicit CC for static methods.
Patch by Alexander Zinenko!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175890 91177308-0d34-0410-b5e6-96231b3b80d8
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; |