[clang] [clang] add transformer range selector for spelled ranges (PR #177442)

Yitzhak Mandelbaum via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 27 08:16:27 PST 2026


================
@@ -257,6 +257,8 @@ RangeSelector transformer::name(std::string ID) {
       if (!D->getDeclName().isIdentifier())
         return missingPropertyError(ID, "name", "identifier");
       SourceLocation L = D->getLocation();
+      // the name may be spelled in a macro
----------------
ymand wrote:

Please move these changes to a separate PR -- I'm not sure it's right to do this by default. Callers may prefer a failure in this case, since its rare to want to rewrite the macro definition.

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


More information about the cfe-commits mailing list