Skip to content

Commit c12ef70

Browse files
committed
[flang][driver] Add missing parentheses in an assert
The assert in https://reviews.llvm.org/D124665 was missing parentheses, which triggered a warning in GCC (verified with GCC 11). As `-Werror` is on by default in FLang, that triggered build errors, see e.g. [1]. The fix is rather straightforward, so I am sending this without a review. [1] https://lab.llvm.org/buildbot/#/builders/160/builds/7016 Differential Revision: https://reviews.llvm.org/D125027
1 parent 967137c commit c12ef70

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

flang/lib/Frontend/FrontendActions.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -533,9 +533,9 @@ static void GenerateMachineCodeOrAssemblyImpl(clang::DiagnosticsEngine &diags,
533533
BackendActionTy act,
534534
llvm::Module &llvmModule,
535535
llvm::raw_pwrite_stream &os) {
536-
assert((act == BackendActionTy::Backend_EmitObj) ||
537-
(act == BackendActionTy::Backend_EmitAssembly) &&
538-
"Unsupported action");
536+
assert(((act == BackendActionTy::Backend_EmitObj) ||
537+
(act == BackendActionTy::Backend_EmitAssembly)) &&
538+
"Unsupported action");
539539

540540
// Set-up the pass manager, i.e create an LLVM code-gen pass pipeline.
541541
// Currently only the legacy pass manager is supported.

0 commit comments

Comments
 (0)