Skip to content

Commit 1d64eed

Browse files
committed
Unless print or parse is requested, always evaluate.
Most operations benefit from being fully evaluated and built-in macros applied.
1 parent c20e3dc commit 1d64eed

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bant/cli-commands.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,9 @@ CliStatus RunCommand(Session &session, Command cmd,
193193
flags.recurse_dependency_depth = kReasonableDefaultDependencyDepth;
194194
}
195195

196-
if (cmd == Command::kDWYU || //
197-
cmd == Command::kCompilationDB || cmd == Command::kCompileFlags) {
196+
// For most operations and least surprises, we want to elaborate.
197+
// Only for print and parse we give finer control
198+
if (cmd != Command::kParse && cmd != Command::kPrint) {
198199
flags.elaborate = true;
199200
flags.builtin_macro_expand = true;
200201
}

0 commit comments

Comments
 (0)