It's an error to try to allocate an abstract object using new.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67542 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index 6be2052..ad2dba7 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -784,7 +784,7 @@
}
bool Sema::RequireNonAbstractType(SourceLocation Loc, QualType T,
- unsigned SelID) {
+ unsigned DiagID, unsigned SelID) {
if (!getLangOptions().CPlusPlus)
return false;
@@ -800,7 +800,7 @@
if (!RD->isAbstract())
return false;
- Diag(Loc, diag::err_abstract_type_in_decl) << SelID << RD->getDeclName();
+ Diag(Loc, DiagID) << RD->getDeclName() << SelID;
// Check if we've already emitted the list of pure virtual functions for this
// class.