diff --git a/cmake/compileroptions.cmake b/cmake/compileroptions.cmake index d42dfc6fc..e439b8c9a 100644 --- a/cmake/compileroptions.cmake +++ b/cmake/compileroptions.cmake @@ -91,7 +91,6 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options_safe(-Wno-double-promotion) add_compile_options_safe(-Wno-shadow-field) add_compile_options_safe(-Wno-shadow-uncaptured-local) - add_compile_options_safe(-Wno-unreachable-code) add_compile_options_safe(-Wno-implicit-float-conversion) add_compile_options_safe(-Wno-switch-enum) add_compile_options_safe(-Wno-float-conversion) diff --git a/lib/checkclass.cpp b/lib/checkclass.cpp index 5baed82d3..858825746 100644 --- a/lib/checkclass.cpp +++ b/lib/checkclass.cpp @@ -2857,10 +2857,8 @@ void CheckClass::checkCopyCtorAndEqOperator() { // This is disabled because of #8388 // The message must be clarified. How is the behaviour different? - return; - // cppcheck-suppress unreachableCode - remove when code is enabled again - if (!mSettings->severity.isEnabled(Severity::warning)) + if ((true) || !mSettings->severity.isEnabled(Severity::warning)) return; for (const Scope * scope : mSymbolDatabase->classAndStructScopes) { diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index ffce78c68..1f5c4b22e 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -1747,7 +1747,7 @@ bool SymbolDatabase::isFunction(const Token *tok, const Scope* outerScope, const // function returning function pointer? '... ( ... %name% ( ... ))( ... ) {' // function returning reference to array '... ( & %name% ( ... ))[ ... ] {' // TODO: Activate this again - if (false && tok->str() == "(" && tok->strAt(1) != "*" && + if ((false) && tok->str() == "(" && tok->strAt(1) != "*" && (tok->link()->previous()->str() == ")" || Token::simpleMatch(tok->link()->tokAt(-2), ") const"))) { const Token* tok2 = tok->link()->next(); if (tok2 && tok2->str() == "(" && Token::Match(tok2->link()->next(), "{|;|const|=")) {