From 603d21a078c8c27f62606470df95481e653ef81c Mon Sep 17 00:00:00 2001 From: Ronan Keryell Date: Wed, 13 Feb 2019 10:09:56 -0800 Subject: [PATCH] [SYCL][NFC] Remove a compilation warning with GCC 8.2.0 Parenthesize the boolean comparisons a little bit more to clarify understanding. Signed-off-by: Ronan Keryell --- clang/lib/Frontend/CompilerInvocation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index a30c034f5eea6..5188d2250f5db 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -122,8 +122,8 @@ CompilerInvocationBase::~CompilerInvocationBase() = default; static unsigned getOptimizationLevel(ArgList &Args, InputKind IK, DiagnosticsEngine &Diags) { unsigned DefaultOpt = llvm::CodeGenOpt::None; - if (IK.getLanguage() == InputKind::OpenCL && - !Args.hasArg(OPT_cl_opt_disable) || Args.hasArg(OPT_fsycl_is_device)) + if ((IK.getLanguage() == InputKind::OpenCL && + !Args.hasArg(OPT_cl_opt_disable)) || Args.hasArg(OPT_fsycl_is_device)) DefaultOpt = llvm::CodeGenOpt::Default; if (Arg *A = Args.getLastArg(options::OPT_O_Group)) {