r335366 - Add const qualifier on FieldChainInfoComparator::operator()
Steven Wu via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 22 09:51:17 PDT 2018
Author: steven_wu
Date: Fri Jun 22 09:51:17 2018
New Revision: 335366
URL: http://llvm.org/viewvc/llvm-project?rev=335366&view=rev
Log:
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().
Modified:
cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp?rev=335366&r1=335365&r2=335366&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp Fri Jun 22 09:51:17 2018
@@ -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();
More information about the cfe-commits
mailing list