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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181615
91177308-0d34-0410-b5e6-
96231b3b80d8
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;
-#pragma clang system_header
void free(void *);
#define FREE_POINTER(x) free(x)