parent
0e15fd3140
commit
50c6af5e5d
|
@ -1330,7 +1330,7 @@ void CheckUninitVar::valueFlowUninit()
|
||||||
continue;
|
continue;
|
||||||
uninitvarError(tok, tok->str(), v->errorPath);
|
uninitvarError(tok, tok->str(), v->errorPath);
|
||||||
const Token * nextTok = tok;
|
const Token * nextTok = tok;
|
||||||
while(Token::simpleMatch(nextTok->astParent(), "."))
|
while (Token::simpleMatch(nextTok->astParent(), "."))
|
||||||
nextTok = nextTok->astParent();
|
nextTok = nextTok->astParent();
|
||||||
nextTok = nextAfterAstRightmostLeaf(nextTok);
|
nextTok = nextAfterAstRightmostLeaf(nextTok);
|
||||||
tok = nextTok ? nextTok : tok;
|
tok = nextTok ? nextTok : tok;
|
||||||
|
|
|
@ -303,15 +303,15 @@ private:
|
||||||
|
|
||||||
void final_class_x() {
|
void final_class_x() {
|
||||||
|
|
||||||
const char code[] = "class __declspec(dllexport) x final { };";
|
const char code[] = "class __declspec(dllexport) x final { };";
|
||||||
{
|
{
|
||||||
errout.str("");
|
errout.str("");
|
||||||
Tokenizer tokenizer(&settings, this);
|
Tokenizer tokenizer(&settings, this);
|
||||||
std::istringstream istr(code);
|
std::istringstream istr(code);
|
||||||
tokenizer.tokenize(istr, "test.cpp");
|
tokenizer.tokenize(istr, "test.cpp");
|
||||||
tokenizer.simplifyTokenList2();
|
tokenizer.simplifyTokenList2();
|
||||||
ASSERT_EQUALS("", errout.str());
|
ASSERT_EQUALS("", errout.str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wrong_syntax1() {
|
void wrong_syntax1() {
|
||||||
|
|
Loading…
Reference in New Issue