diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index ac977c288..4c5d5e566 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -7765,6 +7765,7 @@ bool Tokenizer::simplifyCalculations() tok->str(result); tok->deleteNext(); tok->deleteNext(); + ret = true; } } diff --git a/test/testpreprocessor.cpp b/test/testpreprocessor.cpp index 790d0d97b..72af1a9fc 100644 --- a/test/testpreprocessor.cpp +++ b/test/testpreprocessor.cpp @@ -1050,7 +1050,8 @@ private: ASSERT_EQUALS(true, Preprocessor::match_cfg_def(cfg, "A<2")); ASSERT_EQUALS(false, Preprocessor::match_cfg_def(cfg, "A==2")); ASSERT_EQUALS(false, Preprocessor::match_cfg_def(cfg, "A<1")); - TODO_ASSERT_EQUALS(true, false, Preprocessor::match_cfg_def(cfg, "A>=1&&B<=A")); + ASSERT_EQUALS(false, Preprocessor::match_cfg_def(cfg, "A>=1&&B<=A")); + ASSERT_EQUALS(true, Preprocessor::match_cfg_def(cfg, "A==1 && A==1")); } }