Preprocessor: Report 'missing system include' with debug severity. temporary solution until the handling of system includes is better.

This commit is contained in:
Daniel Marjamäki 2010-12-18 14:45:53 +01:00
parent da15277675
commit 79ea453913
1 changed files with 5 additions and 1 deletions

View File

@ -1613,7 +1613,11 @@ void Preprocessor::handleIncludes(std::string &code,
loc.setfile(Path::toNativeSeparators(filePath));
locationList.push_back(loc);
ErrorLogger::ErrorMessage errmsg(locationList, Severity::style, "Include file: \"" + filename + "\" not found.", "missingInclude");
// If the missing include is a system header then this is
// currently a debug-message.
const Severity::SeverityType severity = (headerType == UserHeader) ? Severity::style : Severity::debug;
const std::string id = (headerType == UserHeader) ? "missingInclude" : "debug";
ErrorLogger::ErrorMessage errmsg(locationList, severity, "Include file: \"" + filename + "\" not found.", id);
errmsg.file0 = file0;
_errorLogger->reportErr(errmsg);
}