[analyzer] Do not check if sys/queue.h file is a system header.

In most cases it is, by just looking at the name. Also, this check prevents the heuristic from working in strange user settings.
radar://13839692

llvm-svn: 181615
This commit is contained in:
Anna Zaks 2013-05-10 18:04:43 +00:00
parent b3a25fa580
commit 3feb2cd5bb
2 changed files with 2 additions and 4 deletions

View File

@ -1539,12 +1539,11 @@ LikelyFalsePositiveSuppressionBRVisitor::getEndPath(BugReporterContext &BRC,
SourceManager &SM = BRC.getSourceManager();
FullSourceLoc Loc = BR.getLocation(SM).asLocation();
while (Loc.isMacroID()) {
if (SM.isInSystemMacro(Loc) &&
(SM.getFilename(SM.getSpellingLoc(Loc)).endswith("sys/queue.h"))) {
Loc = Loc.getSpellingLoc();
if (SM.getFilename(Loc).endswith("sys/queue.h")) {
BR.markInvalid(getTag(), 0);
return 0;
}
Loc = Loc.getSpellingLoc();
}
return 0;

View File

@ -1,4 +1,3 @@
#pragma clang system_header
void free(void *);
#define FREE_POINTER(x) free(x)