Cppcheck: Using both --clang and --project

This commit is contained in:
Daniel Marjamäki 2020-12-29 10:15:24 +01:00
parent ec5cdc4b0d
commit 2898a2925d
1 changed files with 2 additions and 0 deletions

View File

@ -419,6 +419,8 @@ unsigned int CppCheck::check(const ImportProject::FileSettings &fs)
temp.mSettings.includePaths.insert(temp.mSettings.includePaths.end(), fs.systemIncludePaths.cbegin(), fs.systemIncludePaths.cend()); temp.mSettings.includePaths.insert(temp.mSettings.includePaths.end(), fs.systemIncludePaths.cbegin(), fs.systemIncludePaths.cend());
temp.check(Path::simplifyPath(fs.filename)); temp.check(Path::simplifyPath(fs.filename));
} }
if (mSettings.clang)
return temp.check(fs.filename);
std::ifstream fin(fs.filename); std::ifstream fin(fs.filename);
unsigned int returnValue = temp.checkFile(Path::simplifyPath(fs.filename), fs.cfg, fin); unsigned int returnValue = temp.checkFile(Path::simplifyPath(fs.filename), fs.cfg, fin);
mSettings.nomsg.addSuppressions(temp.mSettings.nomsg.getSuppressions()); mSettings.nomsg.addSuppressions(temp.mSettings.nomsg.getSuppressions());