[clang] [AST] Add dump() method to TypeLoc (PR #65484)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 8 06:35:31 PDT 2023
================
@@ -458,6 +532,9 @@ class ASTNodeTraverser
if (Traversal == TK_IgnoreUnlessSpelledInSource && D->isCXXForRangeDecl())
return;
+ if (VisitLocs)
+ if (const auto *TSI = D->getTypeSourceInfo())
+ Visit(TSI->getTypeLoc());
----------------
AaronBallman wrote:
```suggestion
if (const auto *TSI = D->getTypeSourceInfo(); TSI && VisitLocs)
Visit(TSI->getTypeLoc());
```
https://github.com/llvm/llvm-project/pull/65484
More information about the cfe-commits
mailing list