Skip to content

Commit 83c242a

Browse files
Fix bugs in st_entry, and in tests
1 parent bbd3f1e commit 83c242a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

libcxx/include/__stacktrace/entry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class _LIBCPP_EXPORTED_FROM_ABI stacktrace_entry : private __stacktrace::entry_b
6262
return {};
6363
}
6464
[[nodiscard]] _LIBCPP_EXPORTED_FROM_ABI string source_file() const {
65-
if (__desc_.has_value()) {
65+
if (__file_.has_value()) {
6666
return {__file_->data(), __file_->size()};
6767
}
6868
return {};

libcxx/test/std/diagnostics/stacktrace/entry.cons/copy_assign.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ _LIBCPP_NO_TAIL_CALLS
2727
int main(int, char**) {
2828
static_assert(std::is_nothrow_copy_assignable_v<std::stacktrace_entry>);
2929

30-
std::stacktrace_entry e1 = std::stacktrace::current()[0];
30+
auto& e1 = std::stacktrace::current()[0];
3131
std::stacktrace_entry e2;
3232
static_assert(noexcept(e2 = e1));
3333
e2 = e1;

libcxx/test/std/diagnostics/stacktrace/entry.cons/copy_construct.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ _LIBCPP_NO_TAIL_CALLS
2727
int main(int, char**) {
2828
static_assert(std::is_nothrow_copy_constructible_v<std::stacktrace_entry>);
2929

30-
std::stacktrace_entry e1 = std::stacktrace::current()[0];
30+
auto& e1 = std::stacktrace::current()[0];
3131
static_assert(noexcept(std::stacktrace_entry(e1)));
3232
std::stacktrace_entry e2(e1);
3333
assert(e2 == e1);

0 commit comments

Comments
 (0)