From b3684db431ac6fc40dfc61b83f338cf8efccc377 Mon Sep 17 00:00:00 2001 From: Steven Wu Date: Fri, 22 Jun 2018 16:51:17 +0000 Subject: [PATCH] Add const qualifier on FieldChainInfoComparator::operator() libcxx has user defined warning to check for non const call operator. Silence the warning by adding the const on operator(). llvm-svn: 335366 --- .../lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp index a517e81122b1..d9168d037e15 100644 --- a/clang/lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp @@ -85,7 +85,7 @@ private: }; struct FieldChainInfoComparator { - bool operator()(const FieldChainInfo &lhs, const FieldChainInfo &rhs) { + bool operator()(const FieldChainInfo &lhs, const FieldChainInfo &rhs) const { assert(!lhs.Chain.isEmpty() && !rhs.Chain.isEmpty() && "Attempted to store an empty fieldchain!"); return *lhs.Chain.begin() < *rhs.Chain.begin();