Skip to content

Commit 5361740

Browse files
committed
more {} initialization
1 parent 1d967c7 commit 5361740

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

flang/lib/Frontend/CompilerInvocation.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,7 @@ static bool parseDiagArgs(CompilerInvocation &res, llvm::opt::ArgList &args,
987987
clang::DiagnosticsEngine &diags) {
988988
unsigned numErrorsBefore = diags.getNumErrors();
989989

990-
auto &features = res.getFrontendOpts().features;
990+
auto &features{res.getFrontendOpts().features};
991991
// The order of these flags (-pedantic -W<feature> -w) is important and is
992992
// chosen to match clang's behavior.
993993

@@ -1009,7 +1009,7 @@ static bool parseDiagArgs(CompilerInvocation &res, llvm::opt::ArgList &args,
10091009
if (wArg == "error") {
10101010
res.setWarnAsErr(true);
10111011
// -W(no-)<feature>
1012-
} else if (!res.getFrontendOpts().features.ApplyCLIOption(wArg)) {
1012+
} else if (!features.ApplyCLIOption(wArg)) {
10131013
const unsigned diagID = diags.getCustomDiagID(
10141014
clang::DiagnosticsEngine::Error, "Unknown diagnostic option: -W%0");
10151015
diags.Report(diagID) << wArg;
@@ -1024,7 +1024,7 @@ static bool parseDiagArgs(CompilerInvocation &res, llvm::opt::ArgList &args,
10241024
}
10251025

10261026
// Default to off for `flang -fc1`.
1027-
bool showColors = parseShowColorsArgs(args, false);
1027+
bool showColors{parseShowColorsArgs(args, false)};
10281028
diags.getDiagnosticOptions().ShowColors = showColors;
10291029
res.getDiagnosticOpts().ShowColors = showColors;
10301030
res.getFrontendOpts().showColors = showColors;

0 commit comments

Comments
 (0)