Improved information message on missing headers when included with <> (#4772)
This commit is contained in:
parent
6c4e8761c8
commit
f71a4ad216
|
@ -2378,7 +2378,9 @@ void Preprocessor::missingInclude(const std::string &filename, unsigned int line
|
|||
locationList.push_back(loc);
|
||||
}
|
||||
ErrorLogger::ErrorMessage errmsg(locationList, Severity::information,
|
||||
(headerType==SystemHeader) ? "Include file: <" + header + "> not found." : "Include file: \"" + header + "\" not found.",
|
||||
(headerType==SystemHeader) ?
|
||||
"Include file: <" + header + "> not found. Please note: Cppcheck does not need standard library headers to get proper results." :
|
||||
"Include file: \"" + header + "\" not found.",
|
||||
msgtype, false);
|
||||
errmsg.file0 = file0;
|
||||
_errorLogger->reportInfo(errmsg);
|
||||
|
|
|
@ -3559,7 +3559,7 @@ private:
|
|||
errout.str("");
|
||||
settings.checkConfiguration = true;
|
||||
preprocessor.handleIncludes(code,"test.c",includePaths,defs,pragmaOnce,std::list<std::string>());
|
||||
ASSERT_EQUALS("[test.c:1]: (information) Include file: <missing-include!!.h> not found.\n", errout.str());
|
||||
ASSERT_EQUALS("[test.c:1]: (information) Include file: <missing-include!!.h> not found. Please note: Cppcheck does not need standard library headers to get proper results.\n", errout.str());
|
||||
|
||||
pragmaOnce.clear();
|
||||
errout.str("");
|
||||
|
|
Loading…
Reference in New Issue