* Add test for #6541, avoid duplicate warning * Add test for #5475 * Fix test * Merge * Add test for #8666 * Fix #11239 checkLibraryCheckType with asm goto() (invalid varid) * Format
This commit is contained in:
parent
460f63558d
commit
d5a0dfda00
|
@ -4106,7 +4106,7 @@ void Tokenizer::setVarIdPass1()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tok->isName()) {
|
if (tok->isName() && !tok->isKeyword()) {
|
||||||
// don't set variable id after a struct|enum|union
|
// don't set variable id after a struct|enum|union
|
||||||
if (Token::Match(tok->previous(), "struct|enum|union") || (isCPP() && tok->strAt(-1) == "class"))
|
if (Token::Match(tok->previous(), "struct|enum|union") || (isCPP() && tok->strAt(-1) == "class"))
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -2420,6 +2420,17 @@ private:
|
||||||
" AutoTimer();\n"
|
" AutoTimer();\n"
|
||||||
"}\n", /*cpp*/ true);
|
"}\n", /*cpp*/ true);
|
||||||
ASSERT_EQUALS("", errout.str());
|
ASSERT_EQUALS("", errout.str());
|
||||||
|
|
||||||
|
check("void f() {\n" // #8666
|
||||||
|
" asm(\"assembler code\");\n"
|
||||||
|
" asm volatile(\"assembler code\");\n"
|
||||||
|
"}\n");
|
||||||
|
ASSERT_EQUALS("", errout.str());
|
||||||
|
|
||||||
|
check("void f() {\n" // #11239
|
||||||
|
" asm goto(\"assembler code\");\n"
|
||||||
|
"}\n");
|
||||||
|
ASSERT_EQUALS("", errout.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ptrptr() {
|
void ptrptr() {
|
||||||
|
|
Loading…
Reference in New Issue