Try to appease MSVC's standard library

llvm-svn: 98878
This commit is contained in:
Douglas Gregor 2010-03-18 21:28:30 +00:00
parent 5810ead358
commit e56c353eb1
2 changed files with 15 additions and 1 deletions

View File

@ -16,7 +16,7 @@ int BAR STILL_NOTHING;
// CHECK: Identifier: "honk" [2:31 - 2:35] preprocessing directive=
// CHECK: Punctuation: "," [2:35 - 2:36] preprocessing directive=
// CHECK: Identifier: "warble" [2:36 - 2:42] preprocessing directive=
// CHECK: Punctuation: ")" [2:42 - 2:43] preprocesggsing directive=
// CHECK: Punctuation: ")" [2:42 - 2:43] preprocessing directive=
// CHECK: Punctuation: "#" [3:1 - 3:2] preprocessing directive=
// CHECK: Identifier: "define" [3:2 - 3:8] preprocessing directive=
// CHECK: Identifier: "BAR" [3:9 - 3:12] macro definition=BAR

View File

@ -2085,6 +2085,20 @@ namespace {
return SM.isBeforeInTranslationUnit(R.getEnd(),
Entity->getSourceRange().getBegin());
}
bool operator()(const PreprocessedEntity *Entity1,
const PreprocessedEntity *Entity2) const {
return SM.isBeforeInTranslationUnit(Entity1->getSourceRange().getEnd(),
Entity2->getSourceRange().getBegin());
}
bool operator()(SourceRange R1, SourceRange R2) const {
return SM.isBeforeInTranslationUnit(R1.getEnd(), R2.getBegin());
}
bool operator()(SourceLocation Loc1, SourceLocation Loc2) const {
return SM.isBeforeInTranslationUnit(Loc1, Loc2);
}
};
}