[cfe-commits] r105825 - /cfe/trunk/include/clang/AST/RecursiveASTVisitor.h

Craig Silverstein csilvers2000 at yahoo.com
Fri Jun 11 11:08:47 PDT 2010


Author: csilvers
Date: Fri Jun 11 13:08:47 2010
New Revision: 105825

URL: http://llvm.org/viewvc/llvm-project?rev=105825&view=rev
Log:
Add a few FIXMEs: recursing over shadow decls, and semantics vs
syntactic iterating over initializer exprs.  No functional change.

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=105825&r1=105824&r2=105825&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/RecursiveASTVisitor.h (original)
+++ cfe/trunk/include/clang/AST/RecursiveASTVisitor.h Fri Jun 11 13:08:47 2010
@@ -732,6 +732,7 @@
 
 DEF_TRAVERSE_DECL(UsingDecl, {
     TRY_TO(TraverseNestedNameSpecifier(D->getTargetNestedNameDecl()));
+    // FIXME: should we be iterating over the shadows?
     for (UsingDecl::shadow_iterator I = D->shadow_begin(), E = D->shadow_end();
          I != E; ++I) {
       TRY_TO(TraverseDecl(*I));
@@ -1163,6 +1164,16 @@
     TRY_TO(TraverseType(S->getTypeAsWritten()));
   })
 
+DEF_TRAVERSE_STMT(InitListExpr, {
+    // FIXME: I think this is the right thing to do...
+#if 0
+    // We want the syntactic initializer list, not semantic.
+    if (InitListExpr *Syn=S->getSyntacticList())
+      S = Syn;
+    // Now the default actions will work on the syntactic list.
+#endif
+})
+
 // These exprs (most of them), do not need any action except iterating
 // over the children.
 DEF_TRAVERSE_STMT(AddrLabelExpr, { })
@@ -1189,7 +1200,6 @@
 DEF_TRAVERSE_STMT(ExtVectorElementExpr, { })
 DEF_TRAVERSE_STMT(GNUNullExpr, { })
 DEF_TRAVERSE_STMT(ImplicitValueInitExpr, { })
-DEF_TRAVERSE_STMT(InitListExpr, { })
 DEF_TRAVERSE_STMT(ObjCEncodeExpr, { })
 DEF_TRAVERSE_STMT(ObjCImplicitSetterGetterRefExpr, { })
 DEF_TRAVERSE_STMT(ObjCIsaExpr, { })





More information about the cfe-commits mailing list