summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-03-18 21:28:30 +0000
committerDouglas Gregor <dgregor@apple.com>2010-03-18 21:28:30 +0000
commite56c353eb1ad8b868f09e87e2871958a56837b04 (patch)
tree0d20e0eb4e14562b8d80be7bd6fbf406a8d68a7b
parent5810ead3586b2693344965f8eae575320f51edbf (diff)
downloadbcm5719-llvm-e56c353eb1ad8b868f09e87e2871958a56837b04.tar.gz
bcm5719-llvm-e56c353eb1ad8b868f09e87e2871958a56837b04.zip
Try to appease MSVC's standard library
llvm-svn: 98878
-rw-r--r--clang/test/Index/annotate-tokens-pp.c2
-rw-r--r--clang/tools/CIndex/CIndex.cpp14
2 files changed, 15 insertions, 1 deletions
diff --git a/clang/test/Index/annotate-tokens-pp.c b/clang/test/Index/annotate-tokens-pp.c
index 5527b4532d4..485786e1c4e 100644
--- a/clang/test/Index/annotate-tokens-pp.c
+++ b/clang/test/Index/annotate-tokens-pp.c
@@ -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
diff --git a/clang/tools/CIndex/CIndex.cpp b/clang/tools/CIndex/CIndex.cpp
index befba3c4d9d..4cf49613e3d 100644
--- a/clang/tools/CIndex/CIndex.cpp
+++ b/clang/tools/CIndex/CIndex.cpp
@@ -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);
+ }
};
}
OpenPOWER on IntegriCloud