diff --git a/lib/cppcheck.cpp b/lib/cppcheck.cpp index 976fa4e57..3eef69468 100644 --- a/lib/cppcheck.cpp +++ b/lib/cppcheck.cpp @@ -704,7 +704,7 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string std::string code; const std::list &directives = preprocessor.getDirectives(); for (const Directive &dir : directives) { - if (dir.str.compare(0,8,"#define ") == 0) + if (dir.str.compare(0,8,"#define ") == 0 || dir.str.compare(0,9,"#include ") == 0) code += "#line " + MathLib::toString(dir.linenr) + " \"" + dir.file + "\"\n" + dir.str + '\n'; } Tokenizer tokenizer2(&mSettings, this);