]> granicus.if.org Git - clang/commitdiff
Add a missing 'classof' to AST Node TypoExpr to identify its 'Kind'.
authorFaisal Vali <faisalv@yahoo.com>
Sun, 23 Aug 2015 13:14:42 +0000 (13:14 +0000)
committerFaisal Vali <faisalv@yahoo.com>
Sun, 23 Aug 2015 13:14:42 +0000 (13:14 +0000)
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

include/clang/AST/Expr.h

index b4d9040c4b30c72d7df52a359ccb54b7bdbf2906..e44ce01706646b9f06f42317ddeeba943650e92c 100644 (file)
@@ -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