[macros] add -Rmacro-expansions

This adds the -Rmacro-expansions flag. It provides similar functionality
to -dump-macro-expansions, but instead of dumping the macro expansion to
stderr, it emits it line by line as remarks. This is useful for testing
with -verify, where both macro expansion content and warnings need to be
tested at the same time.
This commit is contained in:
Henrik G. Olsson
2025-11-04 17:40:40 -08:00
parent b1c2bc1731
commit 040c9e6729
7 changed files with 85 additions and 0 deletions

View File

@@ -1774,6 +1774,9 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
Opts.DumpMacroExpansions = Args.hasArg(
OPT_dump_macro_expansions);
Opts.RemarkMacroExpansions = Args.hasArg(
OPT_expansion_remarks);
Opts.DumpSourceFileImports = Args.hasArg(
OPT_dump_source_file_imports);