[cfe-commits] r108557 - /cfe/trunk/include/clang/AST/RecursiveASTVisitor.h
Craig Silverstein
csilvers2000 at yahoo.com
Fri Jul 16 14:15:34 PDT 2010
Author: csilvers
Date: Fri Jul 16 16:15:34 2010
New Revision: 108557
URL: http://llvm.org/viewvc/llvm-project?rev=108557&view=rev
Log:
Fix typeid the same way I fixed sizeof. Sad I had missed it before.
Reviewed by chandlerc
Modified:
cfe/trunk/include/clang/AST/RecursiveASTVisitor.h
Modified: cfe/trunk/include/clang/AST/RecursiveASTVisitor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/RecursiveASTVisitor.h?rev=108557&r1=108556&r2=108557&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/RecursiveASTVisitor.h (original)
+++ cfe/trunk/include/clang/AST/RecursiveASTVisitor.h Fri Jul 16 16:15:34 2010
@@ -1621,6 +1621,13 @@
TRY_TO(TraverseTypeLoc(S->getArgumentTypeInfo()->getTypeLoc()));
})
+DEF_TRAVERSE_STMT(CXXTypeidExpr, {
+ // The child-iterator will pick up the arg if it's an expression,
+ // but not if it's a type.
+ if (S->isTypeOperand())
+ TRY_TO(TraverseTypeLoc(S->getTypeOperandSourceInfo()->getTypeLoc()));
+ })
+
DEF_TRAVERSE_STMT(TypesCompatibleExpr, {
TRY_TO(TraverseType(S->getArgType1()));
TRY_TO(TraverseType(S->getArgType2()));
@@ -1648,7 +1655,6 @@
DEF_TRAVERSE_STMT(CXXPseudoDestructorExpr, { })
DEF_TRAVERSE_STMT(CXXThisExpr, { })
DEF_TRAVERSE_STMT(CXXThrowExpr, { })
-DEF_TRAVERSE_STMT(CXXTypeidExpr, { })
DEF_TRAVERSE_STMT(CXXUnresolvedConstructExpr, { })
DEF_TRAVERSE_STMT(DesignatedInitExpr, { })
DEF_TRAVERSE_STMT(ExtVectorElementExpr, { })
More information about the cfe-commits
mailing list