]> granicus.if.org Git - clang/commitdiff
Add a few FIXMEs: recursing over shadow decls, and semantics vs
authorCraig Silverstein <csilvers2000@yahoo.com>
Fri, 11 Jun 2010 18:08:47 +0000 (18:08 +0000)
committerCraig Silverstein <csilvers2000@yahoo.com>
Fri, 11 Jun 2010 18:08:47 +0000 (18:08 +0000)
syntactic iterating over initializer exprs.  No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105825 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/RecursiveASTVisitor.h

index 27596f67c65549477f082cf123087a879b2589bd..3a11304d57ad44904bc653d3fce5c24dd3b4c479 100644 (file)
@@ -732,6 +732,7 @@ DEF_TRAVERSE_DECL(ObjCPropertyDecl, {
 
 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 @@ DEF_TRAVERSE_STMT(CXXStaticCastExpr, {
     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(DesignatedInitExpr, { })
 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, { })