[clang] [Clang] Fix a crash when using ast-dump=json (PR #70224)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 26 12:39:24 PDT 2023


================
@@ -819,6 +819,10 @@ void JSONNodeDumper::VisitNamedDecl(const NamedDecl *ND) {
     if (VD && VD->hasLocalStorage())
       return;
 
+    // Do not mangle template deduction guides.
+    if (const auto DG = dyn_cast<CXXDeductionGuideDecl>(ND))
----------------
AaronBallman wrote:

```suggestion
    if (isa<CXXDeductionGuideDecl>(ND))
```

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


More information about the cfe-commits mailing list