Correct travis and compiler warnings and comments
This commit is contained in:
parent
04f9b71281
commit
5b2dacb4b4
|
@ -1075,18 +1075,13 @@ void TokenList::validateAst()
|
||||||
|
|
||||||
// check for endless recursion
|
// check for endless recursion
|
||||||
const Token* parent=tok;
|
const Token* parent=tok;
|
||||||
while (parent = parent->astParent()) {
|
while ((parent = parent->astParent())) {
|
||||||
if (parent==tok)
|
if (parent==tok)
|
||||||
throw InternalError(tok, "AST broken: endless recursion from '" + tok->str() + "'", InternalError::SYNTAX);
|
throw InternalError(tok, "AST broken: endless recursion from '" + tok->str() + "'", InternalError::SYNTAX);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TokenList::cppcheckError(const Token *tok) const
|
|
||||||
{
|
|
||||||
throw InternalError(tok, "Analysis failed - inconsisten AST. If the code is valid then please report this failure.", InternalError::INTERNAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
const std::string& TokenList::file(const Token *tok) const
|
const std::string& TokenList::file(const Token *tok) const
|
||||||
{
|
{
|
||||||
return _files.at(tok->fileIndex());
|
return _files.at(tok->fileIndex());
|
||||||
|
|
|
@ -132,18 +132,13 @@ public:
|
||||||
void createAst();
|
void createAst();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create abstract syntax tree.
|
* Check abstract syntax tree.
|
||||||
|
* Throws InternalError on failure
|
||||||
*/
|
*/
|
||||||
void validateAst();
|
void validateAst();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/**
|
|
||||||
* Send error message to error logger about internal bug.
|
|
||||||
* @param tok the token that this bug concerns.
|
|
||||||
*/
|
|
||||||
void cppcheckError(const Token *tok) const;
|
|
||||||
|
|
||||||
/** Disable copy constructor, no implementation */
|
/** Disable copy constructor, no implementation */
|
||||||
TokenList(const TokenList &);
|
TokenList(const TokenList &);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue