Add include directives to 'define' tokenlist (#3337)
This commit is contained in:
parent
92597daf8b
commit
f5fac96670
|
@ -704,7 +704,7 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string
|
||||||
std::string code;
|
std::string code;
|
||||||
const std::list<Directive> &directives = preprocessor.getDirectives();
|
const std::list<Directive> &directives = preprocessor.getDirectives();
|
||||||
for (const Directive &dir : directives) {
|
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';
|
code += "#line " + MathLib::toString(dir.linenr) + " \"" + dir.file + "\"\n" + dir.str + '\n';
|
||||||
}
|
}
|
||||||
Tokenizer tokenizer2(&mSettings, this);
|
Tokenizer tokenizer2(&mSettings, this);
|
||||||
|
|
Loading…
Reference in New Issue