[clang-tools-extra] r304583 - [clang-tidy] Add `const` to operator() to fix a warning.

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 2 11:47:50 PDT 2017


Author: alexfh
Date: Fri Jun  2 13:47:50 2017
New Revision: 304583

URL: http://llvm.org/viewvc/llvm-project?rev=304583&view=rev
Log:
[clang-tidy] Add `const` to operator() to fix a warning.

Modified:
    clang-tools-extra/trunk/clang-tidy/misc/LambdaFunctionNameCheck.h

Modified: clang-tools-extra/trunk/clang-tidy/misc/LambdaFunctionNameCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/LambdaFunctionNameCheck.h?rev=304583&r1=304582&r2=304583&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/LambdaFunctionNameCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/LambdaFunctionNameCheck.h Fri Jun  2 13:47:50 2017
@@ -25,7 +25,7 @@ namespace misc {
 class LambdaFunctionNameCheck : public ClangTidyCheck {
 public:
   struct SourceRangeLessThan {
-    bool operator()(const SourceRange &L, const SourceRange &R) {
+    bool operator()(const SourceRange &L, const SourceRange &R) const {
       if (L.getBegin() == R.getBegin()) {
         return L.getEnd() < R.getEnd();
       }




More information about the cfe-commits mailing list