Skip to content

Commit 061eb62

Browse files
authored
[Clang] [NFC] Remove default argument in ASTUnit.h (#78566)
This removes a default argument that is currently broken in C++23 mode due to `std::default_delete` now being `constexpr`. This is a known problem (see #74963, #59966, #69996, and a couple more), fixing which will probably take some time, so this at least makes it possible to compile `ASTUnit.h` in C++23 mode. Note that we can’t simply include the header that provides the definition of the class causing the problem either, as that would create a circular dependency.
1 parent 9ad7d8f commit 061eb62

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

clang/include/clang/Frontend/ASTUnit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ class ASTUnit {
902902
SourceManager &SourceMgr, FileManager &FileMgr,
903903
SmallVectorImpl<StoredDiagnostic> &StoredDiagnostics,
904904
SmallVectorImpl<const llvm::MemoryBuffer *> &OwnedBuffers,
905-
std::unique_ptr<SyntaxOnlyAction> Act = nullptr);
905+
std::unique_ptr<SyntaxOnlyAction> Act);
906906

907907
/// Save this translation unit to a file with the given name.
908908
///

clang/tools/libclang/CIndexCodeCompletion.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,8 @@ clang_codeCompleteAt_Impl(CXTranslationUnit TU, const char *complete_filename,
765765
IncludeBriefComments, Capture,
766766
CXXIdx->getPCHContainerOperations(), *Results->Diag,
767767
Results->LangOpts, *Results->SourceMgr, *Results->FileMgr,
768-
Results->Diagnostics, Results->TemporaryBuffers);
768+
Results->Diagnostics, Results->TemporaryBuffers,
769+
/*SyntaxOnlyAction=*/nullptr);
769770

770771
Results->DiagnosticsWrappers.resize(Results->Diagnostics.size());
771772

0 commit comments

Comments
 (0)