Fixed #6396 (There are false negatives when --include is used)
This commit is contained in:
parent
267552779d
commit
014f8e3c71
|
@ -2273,6 +2273,11 @@ void Preprocessor::handleIncludes(std::string &code, const std::string &filePath
|
|||
paths.push_back(path);
|
||||
std::string::size_type pos = 0;
|
||||
std::string::size_type endfilePos = 0;
|
||||
if (code.compare(0,7U,"#file \"")==0) {
|
||||
const std::string::size_type start = code.find("#file \"" + filePath, 7U);
|
||||
if (start != std::string::npos)
|
||||
endfilePos = start;
|
||||
}
|
||||
std::set<std::string> handledFiles;
|
||||
while ((pos = code.find("#include", pos)) != std::string::npos) {
|
||||
if (_settings && _settings->terminated())
|
||||
|
|
Loading…
Reference in New Issue