diff options
Diffstat (limited to 'include/clang/AST/DeclCXX.h')
-rw-r--r-- | include/clang/AST/DeclCXX.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/clang/AST/DeclCXX.h b/include/clang/AST/DeclCXX.h index 676d0f9e9e..8d963c80a5 100644 --- a/include/clang/AST/DeclCXX.h +++ b/include/clang/AST/DeclCXX.h @@ -1553,15 +1553,15 @@ public: bool isVolatile() { return getType()->castAs<FunctionType>()->isVolatile(); } bool isVirtual() const { - CXXMethodDecl *CD =
- cast<CXXMethodDecl>(const_cast<CXXMethodDecl*>(this)->getCanonicalDecl());
-
- // Methods declared in interfaces are automatically (pure) virtual
- if (CD->isVirtualAsWritten() ||
- CD->getParent()->getTagKind() == TTK_Interface)
- return true;
-
- return (CD->begin_overridden_methods() != CD->end_overridden_methods());
+ CXXMethodDecl *CD = + cast<CXXMethodDecl>(const_cast<CXXMethodDecl*>(this)->getCanonicalDecl()); + + // Methods declared in interfaces are automatically (pure) virtual + if (CD->isVirtualAsWritten() || + CD->getParent()->getTagKind() == TTK_Interface) + return true; + + return (CD->begin_overridden_methods() != CD->end_overridden_methods()); } /// \brief Determine whether this is a usual deallocation function |