[PATCH] D100712: [AST] Add NestedNameSpecifierLoc accessors to node introspection

Stephen Kelly via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 18 10:42:22 PDT 2021


steveire added inline comments.


================
Comment at: clang/lib/Tooling/DumpTool/generate_cxx_src_locs.py:57
         InstanceDecoration = "*"
-        if CladeName == "TypeLoc":
+        if CladeName == "TypeLoc" or CladeName == "NestedNameSpecifierLoc":
             InstanceDecoration = "&"
----------------
njames93 wrote:
> Are there more Clades that require const ref instead of pointer, it may be wise to create a set of these and re use that throughout
> ```lang=py
> RefClades = { "TypeLoc", "NestedNameSpecifierLoc" }
> ...
> InstanceDecoration = '&' if CladeName in RefClades else '*'
> ```
Split into https://reviews.llvm.org/D100720



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100712/new/

https://reviews.llvm.org/D100712



More information about the cfe-commits mailing list