Add some comments to the virtual work. Thanks to Doug Gregor for the review.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62012 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index ba4a47d..dcd3789 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -615,6 +615,9 @@
} else {
// not static member. perhaps virtual function?
if (CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(Member)) {
+ // With declarators parsed the way they are, the parser cannot
+ // distinguish between a normal initializer and a pure-specifier.
+ // Thus this grotesque test.
IntegerLiteral *IL;
if ((IL = dyn_cast<IntegerLiteral>(Init)) && IL->getValue() == 0 &&
Context.getCanonicalType(IL->getType()) == Context.IntTy) {