removed `TokenList::getSettings()` and replaced usage in ValueFlow with provided settings (#4843)
This commit is contained in:
parent
f9c67ef907
commit
8023eff7c0
|
@ -1660,7 +1660,7 @@ struct OnException {
|
||||||
void TokenList::validateAst() const
|
void TokenList::validateAst() const
|
||||||
{
|
{
|
||||||
OnException oe{[&] {
|
OnException oe{[&] {
|
||||||
if (mSettings->debugnormal)
|
if (mSettings && mSettings->debugnormal)
|
||||||
mTokensFrontBack.front->printOut();
|
mTokensFrontBack.front->printOut();
|
||||||
}};
|
}};
|
||||||
// Check for some known issues in AST to avoid crash/hang later on
|
// Check for some known issues in AST to avoid crash/hang later on
|
||||||
|
@ -1784,6 +1784,9 @@ bool TokenList::validateToken(const Token* tok) const
|
||||||
|
|
||||||
void TokenList::simplifyPlatformTypes()
|
void TokenList::simplifyPlatformTypes()
|
||||||
{
|
{
|
||||||
|
if (!mSettings)
|
||||||
|
return;
|
||||||
|
|
||||||
const bool isCPP11 = mSettings->standards.cpp >= Standards::CPP11;
|
const bool isCPP11 = mSettings->standards.cpp >= Standards::CPP11;
|
||||||
|
|
||||||
enum { isLongLong, isLong, isInt } type;
|
enum { isLongLong, isLong, isInt } type;
|
||||||
|
|
|
@ -50,10 +50,6 @@ public:
|
||||||
mSettings = settings;
|
mSettings = settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Settings *getSettings() const {
|
|
||||||
return mSettings;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @return the source file path. e.g. "file.cpp" */
|
/** @return the source file path. e.g. "file.cpp" */
|
||||||
const std::string& getSourceFilePath() const;
|
const std::string& getSourceFilePath() const;
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue