Clang import; do not use FileSettings::cppcheckDefines() when Clang parser is used

This commit is contained in:
Daniel Marjamäki 2020-05-26 20:46:02 +02:00
parent 4f68d85633
commit 60c7b66636
1 changed files with 4 additions and 1 deletions

View File

@ -404,7 +404,10 @@ unsigned int CppCheck::check(const ImportProject::FileSettings &fs)
temp.mSettings = mSettings; temp.mSettings = mSettings;
if (!temp.mSettings.userDefines.empty()) if (!temp.mSettings.userDefines.empty())
temp.mSettings.userDefines += ';'; temp.mSettings.userDefines += ';';
temp.mSettings.userDefines += fs.cppcheckDefines(); if (mSettings.clang)
temp.mSettings.userDefines += fs.defines;
else
temp.mSettings.userDefines += fs.cppcheckDefines();
temp.mSettings.includePaths = fs.includePaths; temp.mSettings.includePaths = fs.includePaths;
temp.mSettings.userUndefs = fs.undefs; temp.mSettings.userUndefs = fs.undefs;
if (fs.standard == "c++14") if (fs.standard == "c++14")