[clang] 061eb62 - [Clang] [NFC] Remove default argument in ASTUnit.h (#78566)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 19 05:29:27 PST 2024
Author: Sirraide
Date: 2024-01-19T08:29:23-05:00
New Revision: 061eb62a9051ed06935135ffa3ea03eb250fd55e
URL: https://github.com/llvm/llvm-project/commit/061eb62a9051ed06935135ffa3ea03eb250fd55e
DIFF: https://github.com/llvm/llvm-project/commit/061eb62a9051ed06935135ffa3ea03eb250fd55e.diff
LOG: [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.
Added:
Modified:
clang/include/clang/Frontend/ASTUnit.h
clang/tools/libclang/CIndexCodeCompletion.cpp
Removed:
################################################################################
diff --git a/clang/include/clang/Frontend/ASTUnit.h b/clang/include/clang/Frontend/ASTUnit.h
index fe99b3d5adbfa0..6af712afdcb6d8 100644
--- a/clang/include/clang/Frontend/ASTUnit.h
+++ b/clang/include/clang/Frontend/ASTUnit.h
@@ -902,7 +902,7 @@ class ASTUnit {
SourceManager &SourceMgr, FileManager &FileMgr,
SmallVectorImpl<StoredDiagnostic> &StoredDiagnostics,
SmallVectorImpl<const llvm::MemoryBuffer *> &OwnedBuffers,
- std::unique_ptr<SyntaxOnlyAction> Act = nullptr);
+ std::unique_ptr<SyntaxOnlyAction> Act);
/// Save this translation unit to a file with the given name.
///
diff --git a/clang/tools/libclang/CIndexCodeCompletion.cpp b/clang/tools/libclang/CIndexCodeCompletion.cpp
index 196c64e6172274..3c5f390f6d888a 100644
--- a/clang/tools/libclang/CIndexCodeCompletion.cpp
+++ b/clang/tools/libclang/CIndexCodeCompletion.cpp
@@ -765,7 +765,8 @@ clang_codeCompleteAt_Impl(CXTranslationUnit TU, const char *complete_filename,
IncludeBriefComments, Capture,
CXXIdx->getPCHContainerOperations(), *Results->Diag,
Results->LangOpts, *Results->SourceMgr, *Results->FileMgr,
- Results->Diagnostics, Results->TemporaryBuffers);
+ Results->Diagnostics, Results->TemporaryBuffers,
+ /*SyntaxOnlyAction=*/nullptr);
Results->DiagnosticsWrappers.resize(Results->Diagnostics.size());
More information about the cfe-commits
mailing list