================
@@ -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();
+}
----------------
steakhal wrote:
Do we need to extend `libclang`? Exposing this makes me uncomfortable.
`libclang` should be stable, but we don't offer any sort of stability for the
expanded texts.
https://github.com/llvm/llvm-project/pull/176126
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits