[clang] modified AST for SEI redemption project (PR #111705)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 17 05:39:12 PDT 2024


================
@@ -111,6 +155,64 @@ void JSONNodeDumper::Visit(TypeLoc TL) {
                       [TL, this] { writeSourceRange(TL.getSourceRange()); });
 }
 
+void JSONNodeDumper::VisitQualTypeDetails(QualType T) {
+  // SEI: get more detailed info on type. this info is not transferrable
+  // with the refId, so this must be called on every type even if that type
+  // has been cached
+  JOS.attributeBegin("qualDetails");
+  JOS.arrayBegin();
+
+  auto CT = T->getCanonicalTypeInternal();
+
+  if (CT->isStructureType())
+    JOS.value("struct");
+
+  if (CT->isNullPtrType())
+    JOS.value("null");
+  if (CT->isUndeducedType())
+    JOS.value("undeduced");
+
+  if (CT->isPointerType())
----------------
AaronBallman wrote:

References?

https://github.com/llvm/llvm-project/pull/111705


More information about the cfe-commits mailing list