Fixed again #2963 (FP: Typedef names considered duplicate because __LINE__ not expanded).
It is caused by a regression introduced with commit 75fbe310ff
. Add also a TODO in the non working detection inside TestSimplifyTokens::simplifyTypedef98.
This commit is contained in:
parent
36aeb74b5a
commit
a219ed313b
|
@ -1624,6 +1624,9 @@ bool Tokenizer::tokenize(std::istream &code,
|
||||||
// replace inline SQL with "asm()" (Oracle PRO*C). Ticket: #1959
|
// replace inline SQL with "asm()" (Oracle PRO*C). Ticket: #1959
|
||||||
simplifySQL();
|
simplifySQL();
|
||||||
|
|
||||||
|
// replace __LINE__ macro with line number
|
||||||
|
simplifyLineMacro();
|
||||||
|
|
||||||
// Concatenate double sharp: 'a ## b' -> 'ab'
|
// Concatenate double sharp: 'a ## b' -> 'ab'
|
||||||
concatenateDoubleSharp();
|
concatenateDoubleSharp();
|
||||||
|
|
||||||
|
@ -1632,9 +1635,6 @@ bool Tokenizer::tokenize(std::istream &code,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// replace __LINE__ macro with line number
|
|
||||||
simplifyLineMacro();
|
|
||||||
|
|
||||||
// replace 'NULL' and similar '0'-defined macros with '0'
|
// replace 'NULL' and similar '0'-defined macros with '0'
|
||||||
simplifyNull();
|
simplifyNull();
|
||||||
|
|
||||||
|
|
|
@ -5792,6 +5792,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
void simplifyTypedef98() { // ticket #2963
|
void simplifyTypedef98() { // ticket #2963
|
||||||
|
//TODO: this testcase fails because "inconclusive" and "style" are not enabled in "tok".
|
||||||
const char code[] = "#define X type ## __LINE__\n"
|
const char code[] = "#define X type ## __LINE__\n"
|
||||||
"typedef int X;\n"
|
"typedef int X;\n"
|
||||||
"typedef int X;\n";
|
"typedef int X;\n";
|
||||||
|
|
Loading…
Reference in New Issue