This commit is contained in:
parent
3ebedcd7f5
commit
71ba513bdb
|
@ -8413,7 +8413,7 @@ const Token * Tokenizer::findGarbageCode() const
|
|||
tok = tok->next()->findClosingBracket();
|
||||
if (!tok)
|
||||
return tok1;
|
||||
if (!Token::Match(tok, ">|>> %name%"))
|
||||
if (!Token::Match(tok, ">|>> ::| %name%"))
|
||||
return tok->next() ? tok->next() : tok1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,6 +73,7 @@ private:
|
|||
TEST_CASE(tokenize32); // #5884 (fsanitize=undefined: left shift of negative value -10000 in lib/templatesimplifier.cpp:852:46)
|
||||
TEST_CASE(tokenize33); // #5780 Various crashes on valid template code
|
||||
TEST_CASE(tokenize34); // #8031
|
||||
TEST_CASE(tokenize35); // #8361
|
||||
|
||||
TEST_CASE(validate);
|
||||
|
||||
|
@ -841,6 +842,11 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
void tokenize35() { // #8361
|
||||
tokenizeAndStringify("typedef int CRCWord; "
|
||||
"template<typename T> ::CRCWord const Compute(T const t) { return 0; }");
|
||||
}
|
||||
|
||||
void validate() {
|
||||
// C++ code in C file
|
||||
ASSERT_THROW(tokenizeAndStringify(";using namespace std;",false,false,Settings::Native,"test.c"), InternalError);
|
||||
|
|
Loading…
Reference in New Issue