From c12ef70d2b0ac6234feb48e01eb954dd753bb538 Mon Sep 17 00:00:00 2001 From: Andrzej Warzynski Date: Thu, 5 May 2022 17:58:08 +0000 Subject: [PATCH] [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 --- flang/lib/Frontend/FrontendActions.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flang/lib/Frontend/FrontendActions.cpp b/flang/lib/Frontend/FrontendActions.cpp index 2ff121d..395adef 100644 --- a/flang/lib/Frontend/FrontendActions.cpp +++ b/flang/lib/Frontend/FrontendActions.cpp @@ -533,9 +533,9 @@ static void GenerateMachineCodeOrAssemblyImpl(clang::DiagnosticsEngine &diags, BackendActionTy act, llvm::Module &llvmModule, llvm::raw_pwrite_stream &os) { - assert((act == BackendActionTy::Backend_EmitObj) || - (act == BackendActionTy::Backend_EmitAssembly) && - "Unsupported action"); + assert(((act == BackendActionTy::Backend_EmitObj) || + (act == BackendActionTy::Backend_EmitAssembly)) && + "Unsupported action"); // Set-up the pass manager, i.e create an LLVM code-gen pass pipeline. // Currently only the legacy pass manager is supported. -- 2.7.4