Skip to content

Conversation

@keith
Copy link
Member

@keith keith commented Nov 22, 2025

It seems like this fails on macOS with C++20

It seems like this fails on macOS with C++20
@keith keith requested a review from JDevlieghere as a code owner November 22, 2025 00:01
@llvmbot llvmbot added the lldb label Nov 22, 2025
@llvmbot
Copy link
Member

llvmbot commented Nov 22, 2025

@llvm/pr-subscribers-lldb

Author: Keith Smiley (keith)

Changes

It seems like this fails on macOS with C++20


Full diff: https://github.com/llvm/llvm-project/pull/169130.diff

1 Files Affected:

  • (modified) lldb/include/lldb/Utility/NonNullSharedPtr.h (-1)
diff --git a/lldb/include/lldb/Utility/NonNullSharedPtr.h b/lldb/include/lldb/Utility/NonNullSharedPtr.h
index d084e79759d1b..e0da293b9629e 100644
--- a/lldb/include/lldb/Utility/NonNullSharedPtr.h
+++ b/lldb/include/lldb/Utility/NonNullSharedPtr.h
@@ -56,7 +56,6 @@ template <typename T> class NonNullSharedPtr : private std::shared_ptr<T> {
   using Base::operator*;
   using Base::operator->;
   using Base::get;
-  using Base::unique;
   using Base::use_count;
   using Base::operator bool;
 

@keith
Copy link
Member Author

keith commented Nov 22, 2025

this was fallout from #168624, ptal @JDevlieghere

here's the full error:

external/+llvm_configure+llvm-project/lldb/include/lldb/Utility/NonNullSharedPtr.h:57:15: error: no member named 'unique' in 'std::shared_ptr<lldb_private::SupportFile>'
   57 |   using Base::unique;
      |         ~~~~~~^
external/+llvm_configure+llvm-project/lldb/include/lldb/Symbol/LineEntry.h:140:18: note: in instantiation of template class 'lldb_private::NonNullSharedPtr<lldb_private::SupportFile>' requested here
  140 |   SupportFileNSP file_sp;
      |                  ^
external/+llvm_configure+llvm-project/lldb/source/Utility/FileSpecList.cpp:49:16: error: cannot initialize object parameter of type 'const std::shared_ptr<lldb_private::SupportFile>' with an expression of type 'const SupportFileNSP' (aka 'const NonNullSharedPtr<lldb_private::SupportFile>')
   49 |         return support_file->GetSpecOnly() == file_spec;
      |                ^~~~~~~~~~~~

Copy link
Member

@JDevlieghere JDevlieghere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, apparently that method was deprecated in C++17 and removed in C++20 (https://en.cppreference.com/w/cpp/memory/shared_ptr/unique.html).

@github-actions
Copy link

🐧 Linux x64 Test Results

  • 33162 tests passed
  • 495 tests skipped

@keith keith merged commit 13011fe into llvm:main Nov 22, 2025
10 of 11 checks passed
@keith keith deleted the ks/lldb-remove-base-unique-from-nonnullsharedptr branch November 22, 2025 00:10
aadeshps-mcw pushed a commit to aadeshps-mcw/llvm-project that referenced this pull request Nov 26, 2025
It seems like this fails on macOS with C++20
Priyanshu3820 pushed a commit to Priyanshu3820/llvm-project that referenced this pull request Nov 26, 2025
It seems like this fails on macOS with C++20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants