Browse Source

Fix warnings caused by not add traverse for HLSLBufferDecl/DiscardStmt/ExtMatrixElementExpr/HLSLVectorElementExpr. (#1562)

Xiang Li 7 years ago
parent
commit
419b4a8557
1 changed files with 10 additions and 0 deletions
  1. 10 0
      tools/clang/include/clang/AST/DataRecursiveASTVisitor.h

+ 10 - 0
tools/clang/include/clang/AST/DataRecursiveASTVisitor.h

@@ -1301,6 +1301,8 @@ DEF_TRAVERSE_DECL(NamespaceAliasDecl, {
 DEF_TRAVERSE_DECL(LabelDecl, {// There is no code in a LabelDecl.
                              })
 
+DEF_TRAVERSE_DECL(HLSLBufferDecl, {}) // HLSL Change.
+
 DEF_TRAVERSE_DECL(
     NamespaceDecl,
     {// Code in an unnamed namespace shows up automatically in
@@ -1933,6 +1935,8 @@ DEF_TRAVERSE_STMT(DeclStmt, {
   return true;
 })
 
+DEF_TRAVERSE_STMT(DiscardStmt, {}) // HLSL Change.
+
 // These non-expr stmts (most of them), do not need any action except
 // iterating over the children.
 DEF_TRAVERSE_STMT(BreakStmt, {})
@@ -2138,6 +2142,12 @@ DEF_TRAVERSE_STMT(ArrayTypeTraitExpr, {
 DEF_TRAVERSE_STMT(ExpressionTraitExpr,
                   { StmtQueue.queue(S->getQueriedExpression()); })
 
+// HLSL Change begin.
+DEF_TRAVERSE_STMT(ExtMatrixElementExpr, {})
+
+DEF_TRAVERSE_STMT(HLSLVectorElementExpr, {})
+// HLSL Change end.
+
 DEF_TRAVERSE_STMT(VAArgExpr, {
   // The child-iterator will pick up the expression argument.
   TRY_TO(TraverseTypeLoc(S->getWrittenTypeInfo()->getTypeLoc()));