Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Sep 27, 2023
2 parents fa62770 + ca20152 commit 9c3509f
Show file tree
Hide file tree
Showing 6 changed files with 258 additions and 191 deletions.
20 changes: 15 additions & 5 deletions cmake/findDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,23 @@ endif()

set(CMAKE_INCLUDE_CURRENT_DIR ON)

find_package(PythonInterp 3 QUIET)
if (NOT PYTHONINTERP_FOUND)
set(PYTHONINTERP_FOUND "")
find_package(PythonInterp 2.7 QUIET)
if (NOT PYTHONINTERP_FOUND AND NOT USE_MATCHCOMPILER_OPT STREQUAL "Off")
if (CMAKE_VERSION VERSION_EQUAL "3.12" OR CMAKE_VERSION VERSION_GREATER "3.12")
find_package(Python COMPONENTS Interpreter)
if (NOT Python_Interpreter_FOUND)
message(WARNING "No python interpreter found. Therefore, the match compiler is switched off.")
set(USE_MATCHCOMPILER_OPT "Off")
else()
set(PYTHON_EXECUTABLE ${Python_EXECUTABLE})
endif()
else()
find_package(PythonInterp 3 QUIET)
if (NOT PYTHONINTERP_FOUND)
set(PYTHONINTERP_FOUND "")
find_package(PythonInterp 2.7 QUIET)
if (NOT PYTHONINTERP_FOUND AND NOT USE_MATCHCOMPILER_OPT STREQUAL "Off")
message(WARNING "No python interpreter found. Therefore, the match compiler is switched off.")
set(USE_MATCHCOMPILER_OPT "Off")
endif()
endif()
endif()

Expand Down
7 changes: 7 additions & 0 deletions lib/symboldatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1522,6 +1522,13 @@ void SymbolDatabase::createSymbolDatabaseIncompleteVars()
}
if (mSettings.library.functions.find(fstr) != mSettings.library.functions.end())
continue;
if (mTokenizer.isCPP()) {
const Token* parent = tok->astParent();
while (Token::Match(parent, "::|[|{"))
parent = parent->astParent();
if (Token::simpleMatch(parent, "new"))
continue;
}
tok->isIncompleteVar(true);
}
}
Expand Down
1 change: 1 addition & 0 deletions test/fixture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ bool TestFixture::prepareTest(const char testname[])
} else {
std::cout << classname << "::" << mTestname << std::endl;
}
teardownTestInternal();
return true;
}
return false;
Expand Down
1 change: 1 addition & 0 deletions test/fixture.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class TestFixture : public ErrorLogger {

bool prepareTest(const char testname[]);
virtual void prepareTestInternal() {}
virtual void teardownTestInternal() {}
std::string getLocationStr(const char * const filename, const unsigned int linenr) const;

bool assert_(const char * const filename, const unsigned int linenr, const bool condition) const;
Expand Down
Loading

0 comments on commit 9c3509f

Please sign in to comment.