summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index ee16b9c4b14..a7671a2cf8a 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -1939,6 +1939,9 @@ void Sema::ActOnDefaultCtorInitializers(DeclPtrTy CDtorDecl) {
bool Sema::RequireNonAbstractType(SourceLocation Loc, QualType T,
unsigned DiagID, AbstractDiagSelID SelID,
const CXXRecordDecl *CurrentRD) {
+ if (!getLangOptions().CPlusPlus)
+ return false;
+
if (SelID == -1)
return RequireNonAbstractType(Loc, T,
PDiag(DiagID), CurrentRD);
OpenPOWER on IntegriCloud