summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
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
commitf107aa63eeae5385ad4fd22074b7f011cac7eb1c (patch)
tree9be06e9648d0a74e4e264af8cde2c536c72c0d12 /clang/lib/Sema
parent7ee0efd2893a1ab66e9d34fb911d958db6360ef6 (diff)
downloadbcm5719-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')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp2
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.
OpenPOWER on IntegriCloud