aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/AST/ASTContext.h2
-rw-r--r--lib/Sema/SemaType.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h
index 4e5e7888b4..0c6bc954a7 100644
--- a/include/clang/AST/ASTContext.h
+++ b/include/clang/AST/ASTContext.h
@@ -1256,7 +1256,7 @@ public:
/// \brief Retrieves the canonical representation of the given
/// calling convention.
CallingConv getCanonicalCallConv(CallingConv CC) const {
- if (CC == CC_C)
+ if (!LangOpts.MRTD && CC == CC_C)
return CC_Default;
return CC;
}
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp
index 2f93642d2f..f429449acf 100644
--- a/lib/Sema/SemaType.cpp
+++ b/lib/Sema/SemaType.cpp
@@ -3482,7 +3482,7 @@ static bool handleFunctionTypeAttr(TypeProcessingState &state,
return true;
}
- if (CCOld != CC_Default) {
+ if (CCOld != (S.LangOpts.MRTD ? CC_X86StdCall : CC_Default)) {
// Should we diagnose reapplications of the same convention?
S.Diag(attr.getLoc(), diag::err_attributes_are_not_compatible)
<< FunctionType::getNameForCallConv(CC)