diff --git a/lib/preprocessor.cpp b/lib/preprocessor.cpp index a170a8f0d..1ec1f75dd 100644 --- a/lib/preprocessor.cpp +++ b/lib/preprocessor.cpp @@ -958,19 +958,21 @@ void Preprocessor::dump(std::ostream &out) const } out << " " << std::endl; - out << " " << std::endl; - for (const simplecpp::MacroUsage ¯oUsage: mMacroUsage) { - out << " " << std::endl; + if (!mMacroUsage.empty()) { + out << " " << std::endl; + for (const simplecpp::MacroUsage ¯oUsage: mMacroUsage) { + out << " " << std::endl; + } + out << " " << std::endl; } - out << " " << std::endl; } static const std::uint32_t crc32Table[] = {