diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-12-01 16:18:00 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-12-01 16:18:00 +0000 |
commit | f107aa63eeae5385ad4fd22074b7f011cac7eb1c (patch) | |
tree | 9be06e9648d0a74e4e264af8cde2c536c72c0d12 /clang/lib/Sema/SemaDecl.cpp | |
parent | 7ee0efd2893a1ab66e9d34fb911d958db6360ef6 (diff) | |
download | bcm5719-llvm-f107aa63eeae5385ad4fd22074b7f011cac7eb1c.tar.gz bcm5719-llvm-f107aa63eeae5385ad4fd22074b7f011cac7eb1c.zip |
An inherited virtual (where "virtual" wasn't written explicitly) can
be defined as pure. Fixes PR5656.
llvm-svn: 90237
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 520d7de710b..2087f8b8c6c 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/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. |