llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: André Brand (thebrandre)

<details>
<summary>Changes</summary>

This enhances consistency with CXXRecordDecl and FunctionDecl, which also 
provide this information in the AST dump.

---
Full diff: https://github.com/llvm/llvm-project/pull/124409.diff


1 Files Affected:

- (modified) clang/lib/AST/TextNodeDumper.cpp (+5) 


``````````diff
diff --git a/clang/lib/AST/TextNodeDumper.cpp b/clang/lib/AST/TextNodeDumper.cpp
index 670641242cae2f..7ce8e3ae95743e 100644
--- a/clang/lib/AST/TextNodeDumper.cpp
+++ b/clang/lib/AST/TextNodeDumper.cpp
@@ -2123,6 +2123,11 @@ void TextNodeDumper::VisitEnumDecl(const EnumDecl *D) {
     OS << " __module_private__";
   if (D->isFixed())
     dumpType(D->getIntegerType());
+
+  if (const auto *Instance = D->getInstantiatedFromMemberEnum()) {
+    OS << " instantiated_from";
+    dumpPointer(Instance);
+  }
 }
 
 void TextNodeDumper::VisitRecordDecl(const RecordDecl *D) {

``````````

</details>


https://github.com/llvm/llvm-project/pull/124409
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to