aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Silverstein <csilvers2000@yahoo.com>2010-06-11 18:08:47 +0000
committerCraig Silverstein <csilvers2000@yahoo.com>2010-06-11 18:08:47 +0000
commit40498cdfe09f6dfa939ca98cb9507aebaae3436f (patch)
tree71dac3ffd83a6587414858453811c80801d20fd9
parenta7d6c221558fa8117aa1d1fd41cf0046c5c9fade (diff)
Add a few FIXMEs: recursing over shadow decls, and semantics vs
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
-rw-r--r--include/clang/AST/RecursiveASTVisitor.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/clang/AST/RecursiveASTVisitor.h b/include/clang/AST/RecursiveASTVisitor.h
index 27596f67c6..3a11304d57 100644
--- a/include/clang/AST/RecursiveASTVisitor.h
+++ b/include/clang/AST/RecursiveASTVisitor.h
@@ -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, { })