[cfe-commits] r98875 - in /cfe/trunk: test/Index/annotate-tokens-pp.c tools/CIndex/CIndex.cpp

Douglas Gregor dgregor at apple.com
Thu Mar 18 14:25:12 PDT 2010


Author: dgregor
Date: Thu Mar 18 16:25:12 2010
New Revision: 98875

URL: http://llvm.org/viewvc/llvm-project?rev=98875&view=rev
Log:
Try to appease MSVC

Modified:
    cfe/trunk/test/Index/annotate-tokens-pp.c
    cfe/trunk/tools/CIndex/CIndex.cpp

Modified: cfe/trunk/test/Index/annotate-tokens-pp.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/annotate-tokens-pp.c?rev=98875&r1=98874&r2=98875&view=diff
==============================================================================
--- cfe/trunk/test/Index/annotate-tokens-pp.c (original)
+++ cfe/trunk/test/Index/annotate-tokens-pp.c Thu Mar 18 16:25:12 2010
@@ -16,7 +16,7 @@
 // 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] preprocessing directive=
+// CHECK: Punctuation: ")" [2:42 - 2:43] preprocesggsing 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

Modified: cfe/trunk/tools/CIndex/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/CIndex/CIndex.cpp?rev=98875&r1=98874&r2=98875&view=diff
==============================================================================
--- cfe/trunk/tools/CIndex/CIndex.cpp (original)
+++ cfe/trunk/tools/CIndex/CIndex.cpp Thu Mar 18 16:25:12 2010
@@ -2066,22 +2066,22 @@
   public:
     explicit ComparePreprocessedEntityLocation(SourceManager &SM) : SM(SM) { }
 
-    bool operator()(const PreprocessedEntity *Entity, SourceLocation Loc) {
+    bool operator()(const PreprocessedEntity *Entity, SourceLocation Loc) const{
       return SM.isBeforeInTranslationUnit(Entity->getSourceRange().getEnd(), 
                                           Loc);
     }
 
-    bool operator()(SourceLocation Loc, const PreprocessedEntity *Entity) {
+    bool operator()(SourceLocation Loc, const PreprocessedEntity *Entity) const{
       return SM.isBeforeInTranslationUnit(Loc, 
                                           Entity->getSourceRange().getBegin());
     }
 
-    bool operator()(const PreprocessedEntity *Entity, SourceRange R) {
+    bool operator()(const PreprocessedEntity *Entity, SourceRange R) const {
       return SM.isBeforeInTranslationUnit(Entity->getSourceRange().getEnd(), 
                                           R.getBegin());
     }
 
-    bool operator()(SourceRange R, const PreprocessedEntity *Entity) {
+    bool operator()(SourceRange R, const PreprocessedEntity *Entity) const {
       return SM.isBeforeInTranslationUnit(R.getEnd(), 
                                           Entity->getSourceRange().getBegin());
     }





More information about the cfe-commits mailing list