From 60c7b66636baee90ba9d320f345f84348b05202f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Tue, 26 May 2020 20:46:02 +0200 Subject: [PATCH] Clang import; do not use FileSettings::cppcheckDefines() when Clang parser is used --- lib/cppcheck.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/cppcheck.cpp b/lib/cppcheck.cpp index f8427ae02..ca645a2bd 100644 --- a/lib/cppcheck.cpp +++ b/lib/cppcheck.cpp @@ -404,7 +404,10 @@ unsigned int CppCheck::check(const ImportProject::FileSettings &fs) temp.mSettings = mSettings; if (!temp.mSettings.userDefines.empty()) 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.userUndefs = fs.undefs; if (fs.standard == "c++14")