[Openmp-commits] [openmp] [OpenMP] Fix set-but-unused-var warning in omptest (PR #196069)
Robert Imschweiler via Openmp-commits
openmp-commits at lists.llvm.org
Thu May 7 01:34:27 PDT 2026
================
@@ -12,12 +12,16 @@
//===----------------------------------------------------------------------===//
#include "Logging.h"
+#include "EnvHelper.h"
using namespace omptest;
using namespace logging;
Logger::Logger(Level LogLevel, std::ostream &OutStream, bool FormatOutput)
: LoggingLevel(LogLevel), OutStream(OutStream), FormatOutput(FormatOutput) {
+ if (auto EnvVal = getBoolEnvironmentVariable("OMPTEST_LOG_COLORED");
+ EnvVal.has_value())
----------------
ro-i wrote:
could omit the has_value, as in the other usages below
https://github.com/llvm/llvm-project/pull/196069
More information about the Openmp-commits
mailing list