diff --git a/lib/preprocessor.cpp b/lib/preprocessor.cpp index fa7297fb0..cde6f6526 100644 --- a/lib/preprocessor.cpp +++ b/lib/preprocessor.cpp @@ -611,6 +611,8 @@ std::string Preprocessor::getcode(const simplecpp::TokenList &tokens1, const std if (hasErrors(outputList)) return ""; + tokens2.removeComments(); + // ensure that guessed define macros without value are not used in the code if (!validateCfg(cfg, macroUsage)) return "";