Skip to content

Commit 6cc3217

Browse files
committed
min log level for error location is error
#refactor
1 parent c9f7663 commit 6cc3217

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/lib/Support/Error.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -252,11 +252,10 @@ call_impl(
252252
{
253253
llvm::raw_string_ostream os(s);
254254
f(os);
255+
using LT = std::underlying_type_t<Level>;
255256
if(sourceLocationWarnings_ &&
256-
loc && (
257-
level == Level::warn ||
258-
level == Level::error ||
259-
level == Level::fatal))
257+
loc &&
258+
static_cast<LT>(level) >= static_cast<LT>(Level::error))
260259
{
261260
os << "\n\n";
262261
os << "An issue occurred during execution.\n";

0 commit comments

Comments
 (0)