Fixed #8029 (Tokenizer::simplifyCAlternativeTokens: dont simplify 'eb.and + 1')
This commit is contained in:
parent
48f1d02355
commit
8a08cc0796
|
@ -3361,6 +3361,9 @@ bool Tokenizer::simplifyTokenList1(const char FileName[])
|
|||
// remove __attribute__((?))
|
||||
simplifyAttribute();
|
||||
|
||||
// Combine tokens..
|
||||
combineOperators();
|
||||
|
||||
// Simplify the C alternative tokens (and, or, etc.)
|
||||
simplifyCAlternativeTokens();
|
||||
|
||||
|
@ -3370,9 +3373,6 @@ bool Tokenizer::simplifyTokenList1(const char FileName[])
|
|||
// combine "- %num%"
|
||||
concatenateNegativeNumberAndAnyPositive();
|
||||
|
||||
// Combine tokens..
|
||||
combineOperators();
|
||||
|
||||
// remove extern "C" and extern "C" {}
|
||||
if (isCPP())
|
||||
simplifyExternC();
|
||||
|
|
|
@ -5771,6 +5771,8 @@ private:
|
|||
// #6207
|
||||
ASSERT_EQUALS("void f ( ) { if ( not = x ) { } }", tokenizeAndStringify("void f() { if (not=x){} }", false, true, Settings::Native, "test.c"));
|
||||
ASSERT_EQUALS("void f ( ) { if ( not = x ) { } }", tokenizeAndStringify("void f() { if (not=x){} }", false, true, Settings::Native, "test.cpp"));
|
||||
// #8029
|
||||
ASSERT_EQUALS("void f ( struct S * s ) { x = s . and + 1 ; }", tokenizeAndStringify("void f(struct S *s) { x = s->and + 1; }", false, true, Settings::Native, "test.c"));
|
||||
}
|
||||
|
||||
void simplifyCalculations() {
|
||||
|
|
Loading…
Reference in New Issue