From 9dcad7115aed3de7e4753c0ede4ccae4ed9dc859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 30 Sep 2016 08:00:06 +0200 Subject: [PATCH] Fixed #7743 (--config-exclude no longer supported) --- lib/preprocessor.cpp | 6 ++++-- lib/settings.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/preprocessor.cpp b/lib/preprocessor.cpp index da4cc5278..9d0f47a25 100644 --- a/lib/preprocessor.cpp +++ b/lib/preprocessor.cpp @@ -365,8 +365,10 @@ std::set Preprocessor::getConfigs(const simplecpp::TokenList &token ::getConfigs(tokens, defined, _settings.userDefines, _settings.userUndefs, ret); - for (std::map::const_iterator it = tokenlists.begin(); it != tokenlists.end(); ++it) - ::getConfigs(*(it->second), defined, _settings.userDefines, _settings.userUndefs, ret); + for (std::map::const_iterator it = tokenlists.begin(); it != tokenlists.end(); ++it) { + if (!_settings.configurationExcluded(it->first)) + ::getConfigs(*(it->second), defined, _settings.userDefines, _settings.userUndefs, ret); + } return ret; } diff --git a/lib/settings.h b/lib/settings.h index ccef10a45..9be0d4d9f 100644 --- a/lib/settings.h +++ b/lib/settings.h @@ -247,7 +247,7 @@ public: ImportProject project; /** - * @brief return true if a file is to be excluded from configuration checking + * @brief return true if a included file is to be excluded in Preprocessor::getConfigs * @return true for the file to be excluded. */ bool configurationExcluded(const std::string &file) const {