summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2014-03-01 14:48:57 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2014-03-01 14:48:57 +0000
commit802ac72495558ab109f0ce407383ef3547d4ca59 (patch)
tree9efacbc8b40e26410c630b6980071598275405aa /utils
parentedea9113ff3b36fe7939ab054e0db9ed9a3b9c3b (diff)
downloadclang-802ac72495558ab109f0ce407383ef3547d4ca59.tar.gz
clang-802ac72495558ab109f0ce407383ef3547d4ca59.tar.bz2
clang-802ac72495558ab109f0ce407383ef3547d4ca59.tar.xz
[C++11] Replace verbose functors with succinct lambdas
No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202590 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/ClangDiagnosticsEmitter.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/utils/TableGen/ClangDiagnosticsEmitter.cpp b/utils/TableGen/ClangDiagnosticsEmitter.cpp
index 2c265aff62..40af9f6000 100644
--- a/utils/TableGen/ClangDiagnosticsEmitter.cpp
+++ b/utils/TableGen/ClangDiagnosticsEmitter.cpp
@@ -761,17 +761,6 @@ struct RecordIndexElement
std::string Name;
};
-
-struct RecordIndexElementSorter :
- public std::binary_function<RecordIndexElement, RecordIndexElement, bool> {
-
- bool operator()(RecordIndexElement const &Lhs,
- RecordIndexElement const &Rhs) const {
- return Lhs.Name < Rhs.Name;
- }
-
-};
-
} // end anonymous namespace.
namespace clang {
@@ -786,7 +775,9 @@ void EmitClangDiagsIndexName(RecordKeeper &Records, raw_ostream &OS) {
Index.push_back(RecordIndexElement(R));
}
- std::sort(Index.begin(), Index.end(), RecordIndexElementSorter());
+ std::sort(Index.begin(), Index.end(),
+ [](const RecordIndexElement &Lhs,
+ const RecordIndexElement &Rhs) { return Lhs.Name < Rhs.Name; });
for (unsigned i = 0, e = Index.size(); i != e; ++i) {
const RecordIndexElement &R = Index[i];