Index: lib/AST/ASTDumper.cpp =================================================================== --- lib/AST/ASTDumper.cpp +++ lib/AST/ASTDumper.cpp @@ -1040,7 +1040,7 @@ NodeDumper.dumpName(D); NodeDumper.dumpType(D->getType()); OS << " combiner"; - dumpStmt(D->getCombiner()); + NodeDumper.dumpPointer(D->getCombiner()); if (auto *Initializer = D->getInitializer()) { OS << " initializer"; switch (D->getInitializerKind()) { @@ -1053,6 +1053,11 @@ case OMPDeclareReductionDecl::CallInit: break; } + NodeDumper.dumpPointer(Initializer); + } + + dumpStmt(D->getCombiner()); + if (auto *Initializer = D->getInitializer()) { dumpStmt(Initializer); } } Index: test/AST/dump.cpp =================================================================== --- test/AST/dump.cpp +++ test/AST/dump.cpp @@ -13,14 +13,14 @@ #pragma omp declare reduction(fun : float : omp_out += omp_in) initializer(omp_priv = omp_orig + 15) -// CHECK: |-OMPDeclareReductionDecl {{.+}} col:35 operator+ 'int' combiner +// CHECK: |-OMPDeclareReductionDecl {{.+}} col:35 operator+ 'int' combiner 0x{{.+}} // CHECK-NEXT: | |-CompoundAssignOperator {{.+}} 'int' lvalue '*=' ComputeLHSTy='int' ComputeResultTy='int' // CHECK-NEXT: | | |-DeclRefExpr {{.+}} 'int' lvalue Var {{.+}} 'omp_out' 'int' // CHECK-NEXT: | | `-ImplicitCastExpr {{.+}} 'int' // CHECK-NEXT: | | `-DeclRefExpr {{.+}} 'int' lvalue Var {{.+}} 'omp_in' 'int' // CHECK-NEXT: | |-VarDecl {{.+}} col:35 implicit used omp_in 'int' // CHECK-NEXT: | `-VarDecl {{.+}} col:35 implicit used omp_out 'int' -// CHECK-NEXT: |-OMPDeclareReductionDecl {{.+}} col:40 operator+ 'char' combiner +// CHECK-NEXT: |-OMPDeclareReductionDecl {{.+}} col:40 operator+ 'char' combiner 0x{{.+}} // CHECK-NEXT: | |-CompoundAssignOperator {{.+}} 'char' lvalue '*=' ComputeLHSTy='int' ComputeResultTy='int' // CHECK-NEXT: | | |-DeclRefExpr {{.+}} 'char' lvalue Var {{.+}} 'omp_out' 'char' // CHECK-NEXT: | | `-ImplicitCastExpr {{.+}} 'int' @@ -28,7 +28,7 @@ // CHECK-NEXT: | | `-DeclRefExpr {{.+}} 'char' lvalue Var {{.+}} 'omp_in' 'char' // CHECK-NEXT: | |-VarDecl {{.+}} col:40 implicit used omp_in 'char' // CHECK-NEXT: | `-VarDecl {{.+}} col:40 implicit used omp_out 'char' -// CHECK-NEXT: |-OMPDeclareReductionDecl {{.+}} col:37 fun 'float' combiner initializer +// CHECK-NEXT: |-OMPDeclareReductionDecl {{.+}} col:37 fun 'float' combiner 0x{{.+}} initializer 0x{{.+}} // CHECK-NEXT: | |-CompoundAssignOperator {{.+}} 'float' lvalue '+=' ComputeLHSTy='float' ComputeResultTy='float' // CHECK-NEXT: | | |-DeclRefExpr {{.+}} 'float' lvalue Var {{.+}} 'omp_out' 'float' // CHECK-NEXT: | | `-ImplicitCastExpr {{.+}} 'float'