aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-12-01 16:18:00 +0000
committerDouglas Gregor <dgregor@apple.com>2009-12-01 16:18:00 +0000
commitd3a505827fd8775ce479498e5726b484336eedd8 (patch)
treee11332cb319e9e3cc18c44df712f32897a4a138f /lib
parent360f075fc654e510e84a4c24e9cee08e2c8ea644 (diff)
An inherited virtual (where "virtual" wasn't written explicitly) can
be defined as pure. Fixes PR5656. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90237 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Sema/SemaDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 520d7de710..2087f8b8c6 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -3393,7 +3393,7 @@ void Sema::AddInitializerToDecl(DeclPtrTy dcl, ExprArg init, bool DirectInit) {
Expr *Init = static_cast<Expr *>(init.get());
if ((IL = dyn_cast<IntegerLiteral>(Init)) && IL->getValue() == 0 &&
Context.getCanonicalType(IL->getType()) == Context.IntTy) {
- if (Method->isVirtualAsWritten()) {
+ if (Method->isVirtual()) {
Method->setPure();
// A class is abstract if at least one function is pure virtual.