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:
Edoardo Prezioso 2012-11-30 00:00:44 +01:00
parent 36aeb74b5a
commit a219ed313b
2 changed files with 4 additions and 3 deletions

View File

@ -1624,6 +1624,9 @@ bool Tokenizer::tokenize(std::istream &code,
// replace inline SQL with "asm()" (Oracle PRO*C). Ticket: #1959
simplifySQL();
// replace __LINE__ macro with line number
simplifyLineMacro();
// Concatenate double sharp: 'a ## b' -> 'ab'
concatenateDoubleSharp();
@ -1632,9 +1635,6 @@ bool Tokenizer::tokenize(std::istream &code,
return false;
}
// replace __LINE__ macro with line number
simplifyLineMacro();
// replace 'NULL' and similar '0'-defined macros with '0'
simplifyNull();

View File

@ -5792,6 +5792,7 @@ private:
}
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"
"typedef int X;\n"
"typedef int X;\n";