Preprocessor: Don't warn about missing system headers during 'normal' preprocessing

This commit is contained in:
Daniel Marjamaki 2011-11-02 18:40:56 +01:00
parent 0884204c2f
commit dfcbc38466
1 changed files with 11 additions and 2 deletions

View File

@ -1766,8 +1766,17 @@ std::string Preprocessor::handleIncludes(const std::string &code, const std::str
// try to open file // try to open file
std::ifstream fin; std::ifstream fin;
if (!openHeader(filename, includePaths, headerType == UserHeader ? path : std::string(""), fin)) { if (!openHeader(filename, includePaths, headerType == UserHeader ? path : std::string(""), fin)) {
ostr << std::endl;
missingInclude(filePath, linenr, filename, headerType == UserHeader); if (_settings && (headerType == UserHeader || _settings->debugwarnings)) {
if (!_settings->nomsg.isSuppressed("missingInclude", "", 0)) {
missingIncludeFlag = true;
missingInclude(Path::toNativeSeparators(filePath),
linenr,
filename,
headerType == UserHeader);
}
}
continue; continue;
} }