Cppcheck
|
#include "preprocessor.h"
#include "errorlogger.h"
#include "errortypes.h"
#include "library.h"
#include "path.h"
#include "platform.h"
#include "settings.h"
#include "standards.h"
#include "suppressions.h"
#include "utils.h"
#include <algorithm>
#include <array>
#include <cstddef>
#include <iterator>
#include <sstream>
#include <utility>
#include <simplecpp.h>
Go to the source code of this file.
Functions | |
static bool | sameline (const simplecpp::Token *tok1, const simplecpp::Token *tok2) |
static bool | parseInlineSuppressionCommentToken (const simplecpp::Token *tok, std::list< SuppressionList::Suppression > &inlineSuppressions, std::list< BadInlineSuppression > &bad) |
static void | addInlineSuppressions (const simplecpp::TokenList &tokens, const Settings &settings, SuppressionList &suppressions, std::list< BadInlineSuppression > &bad) |
static std::string | readcondition (const simplecpp::Token *iftok, const std::set< std::string > &defined, const std::set< std::string > &undefined) |
static bool | hasDefine (const std::string &userDefines, const std::string &cfg) |
static std::string | cfg (const std::vector< std::string > &configs, const std::string &userDefines) |
static bool | isUndefined (const std::string &cfg, const std::set< std::string > &undefined) |
static bool | getConfigsElseIsFalse (const std::vector< std::string > &configs_if, const std::string &userDefines) |
static const simplecpp::Token * | gotoEndIf (const simplecpp::Token *cmdtok) |
static void | getConfigs (const simplecpp::TokenList &tokens, std::set< std::string > &defined, const std::string &userDefines, const std::set< std::string > &undefined, std::set< std::string > &ret) |
static void | splitcfg (const std::string &cfg, std::list< std::string > &defines, const std::string &defaultValue) |
static simplecpp::DUI | createDUI (const Settings &mSettings, const std::string &cfg, const std::string &filename) |
|
static |
Definition at line 156 of file preprocessor.cpp.
References SuppressionList::addSuppression(), Settings::basePaths, SuppressionList::block, SuppressionList::blockBegin, SuppressionList::blockEnd, SuppressionList::file, SuppressionList::Suppression::lineBegin, SuppressionList::Suppression::lineNumber, SuppressionList::macro, parseInlineSuppressionCommentToken(), Settings::relativePaths, sameline(), Path::simplifyPath(), and SuppressionList::unique.
Referenced by Preprocessor::inlineSuppressions().
|
static |
Definition at line 423 of file preprocessor.cpp.
References hasDefine().
Referenced by AnalyzerInformation::analyzeFile(), MainWindow::analyzeFiles(), CppCheck::checkFile(), Summaries::create(), createDUI(), AnalyzerInformation::getAnalyzerInfoFile(), AnalyzerInformation::getAnalyzerInfoFileFromFilesTxt(), Preprocessor::getcode(), getConfigs(), getConfigsElseIsFalse(), ProjectFileDialog::getProjectConfigs(), hasDefine(), ImportProject::ignoreOtherConfigs(), ImportProject::importVcxproj(), isUndefined(), Preprocessor::preprocess(), ProjectFileDialog::setProjectConfigurations(), and splitcfg().
|
static |
Definition at line 658 of file preprocessor.cpp.
References cfg(), Settings::clearIncludeCache, Library::defines, emptyString, Standards::getC(), Standards::getCPP(), Platform::getLimitsDefines(), Path::identify(), Settings::includePaths, Settings::library, Settings::platform, splitcfg(), Settings::standards, Settings::userDefines, Settings::userIncludes, and Settings::userUndefs.
Referenced by Preprocessor::loadFiles(), and Preprocessor::preprocess().
|
static |
Definition at line 483 of file preprocessor.cpp.
References cfg(), emptyString, getConfigsElseIsFalse(), gotoEndIf(), isUndefined(), match(), readcondition(), and sameline().
|
static |
|
static |
Definition at line 466 of file preprocessor.cpp.
References sameline(), and startsWith().
Referenced by getConfigs().
|
static |
|
static |
|
static |
Definition at line 72 of file preprocessor.cpp.
References SuppressionList::blockBegin, SuppressionList::blockEnd, SuppressionList::Suppression::errorId, SuppressionList::file, SuppressionList::Suppression::lineNumber, SuppressionList::macro, SuppressionList::Suppression::parseComment(), SuppressionList::parseMultiSuppressComment(), SuppressionList::Suppression::type, and SuppressionList::unique.
Referenced by addInlineSuppressions().
|
static |
|
static |
Definition at line 41 of file preprocessor.cpp.
Referenced by addInlineSuppressions(), getConfigs(), gotoEndIf(), readcondition(), and Preprocessor::simplifyPragmaAsmPrivate().
|
static |