Author: dblaikie Date: Wed Sep 24 11:35:29 2014 New Revision: 218385 URL: http://llvm.org/viewvc/llvm-project?rev=218385&view=rev Log: Constify a functor's function call operator because it can/should be.
Patch by Graham Lee ([email protected])! Modified: cfe/trunk/include/clang/Basic/SourceManager.h Modified: cfe/trunk/include/clang/Basic/SourceManager.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceManager.h?rev=218385&r1=218384&r2=218385&view=diff ============================================================================== --- cfe/trunk/include/clang/Basic/SourceManager.h (original) +++ cfe/trunk/include/clang/Basic/SourceManager.h Wed Sep 24 11:35:29 2014 @@ -1677,7 +1677,7 @@ class BeforeThanCompare<SourceRange> { public: explicit BeforeThanCompare(SourceManager &SM) : SM(SM) { } - bool operator()(SourceRange LHS, SourceRange RHS) { + bool operator()(SourceRange LHS, SourceRange RHS) const { return SM.isBeforeInTranslationUnit(LHS.getBegin(), RHS.getBegin()); } }; _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
