parent
f3ae729f89
commit
612d7be85a
|
@ -4204,7 +4204,8 @@ void Tokenizer::setVarIdPass2()
|
|||
else if (Token::Match(tok->previous(), "!!:: %name% <") && Token::Match(tok->next()->findClosingBracket(),"> :: ~| %name%"))
|
||||
tok = tok->next()->findClosingBracket()->next();
|
||||
else if (usingnamespaces.empty() || tok->varId() || !tok->isName() || tok->isStandardType() || tok->tokType() == Token::eKeyword || tok->tokType() == Token::eBoolean ||
|
||||
Token::Match(tok->previous(), ".|namespace|class|struct|&|&&|*|> %name%") || Token::Match(tok->previous(), "%type%| %name% ( %type%|)") || Token::Match(tok, "public:|private:|protected:"))
|
||||
Token::Match(tok->previous(), ".|namespace|class|struct|&|&&|*|> %name%") || Token::Match(tok->previous(), "%type%| %name% ( %type%|)") || Token::Match(tok, "public:|private:|protected:") ||
|
||||
(!tok->next() && Token::Match(tok->previous(), "}|; %name%")))
|
||||
continue;
|
||||
|
||||
while (Token::Match(tok, ":: ~| %name%")) {
|
||||
|
|
|
@ -4528,6 +4528,8 @@ private:
|
|||
// Handle garbage enum code "well"
|
||||
ASSERT_EQUALS("enum E : int ; void foo ( ) { std :: string s ; }",
|
||||
tokenizeAndStringify("using namespace std; enum E : int ; void foo ( ) { string s ; }"));
|
||||
|
||||
ASSERT_NO_THROW(tokenizeAndStringify("NS_BEGIN(IMAGEIO_2D_DICOM) using namespace std; NS_END")); // #11045
|
||||
}
|
||||
|
||||
void microsoftMemory() {
|
||||
|
|
Loading…
Reference in New Issue