From f3c6b935eb58387c14393b6e3c59a4a73c041fdb Mon Sep 17 00:00:00 2001 From: Nicholas Chaimov Date: Fri, 13 Dec 2024 16:02:45 -0800 Subject: [PATCH] Cast result of std::toupper to char Oddly, std::toupper returns int, not char, which makes clang-tidy complains about the implicit narrowing. Make the narrowing explicit to silence the warning. --- src/salt_instrument_flang_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/salt_instrument_flang_plugin.cpp b/src/salt_instrument_flang_plugin.cpp index 3ef9bfc..25952a1 100644 --- a/src/salt_instrument_flang_plugin.cpp +++ b/src/salt_instrument_flang_plugin.cpp @@ -670,7 +670,7 @@ class SaltInstrumentAction final : public PluginParseTreeAction { inputFileExtension = inputFilePath->substr(extPos + 1); // Part of string past last '.' // Capitalize the first character of inputFileExtension if (!inputFileExtension.empty()) { - inputFileExtension[0] = std::toupper(inputFileExtension[0]); + inputFileExtension[0] = static_cast(std::toupper(inputFileExtension[0])); } }