From: Faisal Vali Date: Sun, 23 Aug 2015 13:14:42 +0000 (+0000) Subject: Add a missing 'classof' to AST Node TypoExpr to identify its 'Kind'. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e0a40ed30e083d64838ed0020c281ad29dc06e1;p=clang Add a missing 'classof' to AST Node TypoExpr to identify its 'Kind'. I'm not sure why TypoExpr had its classof left out - but I expect every AST node should fulfill the 'contract of classof' (http://llvm.org/docs/HowToSetUpLLVMStyleRTTI.html). There should be no functionality change. I just happened to notice it was missing, while messing around with something else. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@245812 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h index b4d9040c4b..e44ce01706 100644 --- a/include/clang/AST/Expr.h +++ b/include/clang/AST/Expr.h @@ -4980,6 +4980,11 @@ public: } SourceLocation getLocStart() const LLVM_READONLY { return SourceLocation(); } SourceLocation getLocEnd() const LLVM_READONLY { return SourceLocation(); } + + static bool classof(const Stmt *T) { + return T->getStmtClass() == TypoExprClass; + } + }; } // end namespace clang