Skip to content

Commit 1c1bb77

Browse files
committed
[libc++abi] Fix issue when building the demangler in C++11
Captures with an initializer only work in C++14. This broke the C++11 CI but wasn't noticed because our CI was down.
1 parent 78c6506 commit 1c1bb77

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

libcxxabi/src/demangle/ItaniumDemangle.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2632,7 +2632,8 @@ template<typename NodeT> struct NodeKind;
26322632
#include "ItaniumNodes.def"
26332633

26342634
inline bool NodeArray::printAsString(OutputBuffer &OB) const {
2635-
auto Fail = [&OB, StartPos = OB.getCurrentPosition()] {
2635+
auto StartPos = OB.getCurrentPosition();
2636+
auto Fail = [&OB, StartPos] {
26362637
OB.setCurrentPosition(StartPos);
26372638
return false;
26382639
};

llvm/include/llvm/Demangle/ItaniumDemangle.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2632,7 +2632,8 @@ template<typename NodeT> struct NodeKind;
26322632
#include "ItaniumNodes.def"
26332633

26342634
inline bool NodeArray::printAsString(OutputBuffer &OB) const {
2635-
auto Fail = [&OB, StartPos = OB.getCurrentPosition()] {
2635+
auto StartPos = OB.getCurrentPosition();
2636+
auto Fail = [&OB, StartPos] {
26362637
OB.setCurrentPosition(StartPos);
26372638
return false;
26382639
};

0 commit comments

Comments
 (0)