r245812 - Add a missing 'classof' to AST Node TypoExpr to identify its 'Kind'.
Faisal Vali via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 23 06:14:42 PDT 2015
Author: faisalv
Date: Sun Aug 23 08:14:42 2015
New Revision: 245812
URL: http://llvm.org/viewvc/llvm-project?rev=245812&view=rev
Log:
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.
Modified:
cfe/trunk/include/clang/AST/Expr.h
Modified: cfe/trunk/include/clang/AST/Expr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Expr.h?rev=245812&r1=245811&r2=245812&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/trunk/include/clang/AST/Expr.h Sun Aug 23 08:14:42 2015
@@ -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
More information about the cfe-commits
mailing list