summaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2014-03-07 21:51:58 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2014-03-07 21:51:58 +0000
commitf1d5d4597f9ca2aead1cd3bad805f9def94f2e7d (patch)
tree9f2b6817d57d2bc6c19e4e9565e2765d02a3bbde /lib/StaticAnalyzer/Checkers/DebugCheckers.cpp
parent3344f96e8b727bd47bd6e845541b5e5682aeae81 (diff)
downloadclang-f1d5d4597f9ca2aead1cd3bad805f9def94f2e7d.tar.gz
[C++11] Revert uses of lambdas with array_pod_sort.
Looks like GCC implements the lambda->function pointer conversion differently. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203293 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/DebugCheckers.cpp')
-rw-r--r--lib/StaticAnalyzer/Checkers/DebugCheckers.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp b/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp
index fbb130bc17..51e7a3d3ce 100644
--- a/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp
+++ b/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp
@@ -161,6 +161,11 @@ namespace {
class ConfigDumper : public Checker< check::EndOfTranslationUnit > {
typedef AnalyzerOptions::ConfigTable Table;
+ static int compareEntry(const Table::MapEntryTy *const *LHS,
+ const Table::MapEntryTy *const *RHS) {
+ return (*LHS)->getKey().compare((*RHS)->getKey());
+ }
+
public:
void checkEndOfTranslationUnit(const TranslationUnitDecl *TU,
AnalysisManager& mgr,
@@ -171,11 +176,7 @@ public:
for (Table::const_iterator I = Config.begin(), E = Config.end(); I != E;
++I)
Keys.push_back(&*I);
- llvm::array_pod_sort(Keys.begin(), Keys.end(),
- [](const Table::MapEntryTy *const *LHS,
- const Table::MapEntryTy *const *RHS) {
- return (*LHS)->getKey().compare((*RHS)->getKey());
- });
+ llvm::array_pod_sort(Keys.begin(), Keys.end(), compareEntry);
llvm::errs() << "[config]\n";
for (unsigned I = 0, E = Keys.size(); I != E; ++I)