From f8beeb9edc5c7501724a4d10c50e3ba81fdd899d Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 17 Oct 2023 15:16:14 +0200 Subject: [PATCH] CppEditor: Filter out another GCC-only flag Qt applications are built with "-mno-direct-extern-access" these days, which throws off clang-tidy. Change-Id: Ifaaef84f6da37a0abb7b7a68296723fa41b572a7 Reviewed-by: Christian Stenger Reviewed-by: --- src/plugins/cppeditor/compileroptionsbuilder.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/cppeditor/compileroptionsbuilder.cpp b/src/plugins/cppeditor/compileroptionsbuilder.cpp index 8376f7d1acc..12403bd1533 100644 --- a/src/plugins/cppeditor/compileroptionsbuilder.cpp +++ b/src/plugins/cppeditor/compileroptionsbuilder.cpp @@ -900,6 +900,10 @@ void CompilerOptionsBuilder::evaluateCompilerFlags() continue; } + // GCC option that clang doesn't know. + if (option.contains("direct-extern-access")) + continue; + // These were already parsed into ProjectPart::includedFiles. if (option == includeFileOptionCl || option == includeFileOptionGcc) { skipNext = true;