[Lldb-commits] [lldb] [lldb] Const some ASTContext pointers in TypeSystemClang (NFC) (PR #189975)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Apr 1 08:17:48 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Dave Lee (kastiglione)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/189975.diff
1 Files Affected:
- (modified) lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp (+4-4)
``````````diff
diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
index 624cdeada4eb9..ca5d5d12e00b5 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -2605,7 +2605,7 @@ TypeSystemClang::GetDeclContextForType(clang::QualType type) {
/// by the specified \ref allow_completion). If we fail to return a *complete*
/// type, returns nullptr.
static const clang::RecordType *
-GetCompleteRecordType(clang::ASTContext *ast, clang::QualType qual_type) {
+GetCompleteRecordType(const clang::ASTContext *ast, clang::QualType qual_type) {
assert(qual_type->isRecordType());
const auto *tag_type = llvm::cast<clang::RecordType>(qual_type.getTypePtr());
@@ -2646,7 +2646,7 @@ GetCompleteRecordType(clang::ASTContext *ast, clang::QualType qual_type) {
/// function will try to complete the type if necessary (and allowed
/// by the specified \ref allow_completion). If we fail to return a *complete*
/// type, returns nullptr.
-static const clang::EnumType *GetCompleteEnumType(clang::ASTContext *ast,
+static const clang::EnumType *GetCompleteEnumType(const clang::ASTContext *ast,
clang::QualType qual_type) {
assert(qual_type->isEnumeralType());
assert(ast);
@@ -2679,7 +2679,7 @@ static const clang::EnumType *GetCompleteEnumType(clang::ASTContext *ast,
/// by the specified \ref allow_completion). If we fail to return a *complete*
/// type, returns nullptr.
static const clang::ObjCObjectType *
-GetCompleteObjCObjectType(clang::ASTContext *ast, QualType qual_type) {
+GetCompleteObjCObjectType(const clang::ASTContext *ast, QualType qual_type) {
assert(qual_type->isObjCObjectType());
assert(ast);
@@ -2710,7 +2710,7 @@ GetCompleteObjCObjectType(clang::ASTContext *ast, QualType qual_type) {
return objc_class_type;
}
-static bool GetCompleteQualType(clang::ASTContext *ast,
+static bool GetCompleteQualType(const clang::ASTContext *ast,
clang::QualType qual_type) {
qual_type = RemoveWrappingTypes(qual_type);
const clang::Type::TypeClass type_class = qual_type->getTypeClass();
``````````
</details>
https://github.com/llvm/llvm-project/pull/189975
More information about the lldb-commits
mailing list