Skip to content

Commit 99d785b

Browse files
committed
[flang] Update printing values in dump-parse-tree
Remove 'if std::string' that is covered by another branch of the if-statement. Add printing of 'bool' and 'int' values, since they have corresponding `GetNodeName` definitions.
1 parent 51b4ada commit 99d785b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

flang/include/flang/Parser/dump-parse-tree.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -884,8 +884,10 @@ class ParseTreeDumper {
884884
} else if constexpr (HasSource<T>::value) {
885885
return x.source.ToString();
886886
#endif
887-
} else if constexpr (std::is_same_v<T, std::string>) {
888-
return x;
887+
} else if constexpr (std::is_same_v<T, int>) {
888+
return std::to_string(x);
889+
} else if constexpr (std::is_same_v<T, bool>) {
890+
return x ? "true" : "false";
889891
} else {
890892
return "";
891893
}

0 commit comments

Comments
 (0)