[clang] [analyzer][CTU] Macro expansions for imported translation units (PR #176126)

Vladimir Vuksanovic via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 27 07:23:24 PST 2026


================
@@ -1157,6 +1157,12 @@ SourceRange cxcursor::MacroExpansionCursor::getSourceRange() const {
     return getPseudoLoc();
   return getAsMacroExpansion()->getSourceRange();
 }
+std::optional<std::string>
+cxcursor::MacroExpansionCursor::getExpandedText() const {
+  if (isPseudo())
+    return std::nullopt;
+  return getAsMacroExpansion()->getExpandedText();
+}
----------------
vvuksanovic wrote:

This is not needed for out functionality, and can be removed. I just saw that it exposes getters for other fields from `MacroExpansion` and added this as well.

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


More information about the cfe-commits mailing list