Fixed #2216 (wrong warning when C++0x keyword delete is used)
This commit is contained in:
parent
f10e433593
commit
0fe4249cfc
|
@ -2106,7 +2106,7 @@ bool Tokenizer::tokenize(std::istream &code,
|
|||
tok2 = tok2->link()->previous();
|
||||
|
||||
// operator ==|>|<|..
|
||||
if (Token::Match(tok->previous(), "operator %any%"))
|
||||
if (Token::Match(tok2->previous(), "operator %any%"))
|
||||
tok2 = tok2->previous();
|
||||
else if (Token::simpleMatch(tok2->tokAt(-2), "operator [ ]"))
|
||||
tok2 = tok2->tokAt(-2);
|
||||
|
|
|
@ -4282,6 +4282,13 @@ private:
|
|||
ASSERT_EQUALS("struct A { }", tokenizeAndStringify(code));
|
||||
}
|
||||
|
||||
{
|
||||
const char *code = "struct A {"
|
||||
" void operator = (void *) = delete;"
|
||||
"}";
|
||||
ASSERT_EQUALS("struct A { }", tokenizeAndStringify(code));
|
||||
}
|
||||
|
||||
{
|
||||
const char *code = "struct foo {"
|
||||
" foo();"
|
||||
|
|
Loading…
Reference in New Issue