[Lldb-commits] [lldb] [lldb][ObjC][NFCI] Replace StringLexer with llvm::StringRef (PR #172466)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Dec 16 03:56:51 PST 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- lldb/include/lldb/DataFormatters/FormattersContainer.h lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.h --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp
index b4dbb2a86..21e78dc11 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp
@@ -200,7 +200,8 @@ clang::QualType AppleObjCTypeEncodingParser::BuildArray(
// consume but ignore the type info and always return an 'id'; if anything,
// dynamic typing will resolve things for us anyway
clang::QualType AppleObjCTypeEncodingParser::BuildObjCObjectPointerType(
- TypeSystemClang &clang_ast_ctx, llvm::StringRef &type, bool for_expression) {
+ TypeSystemClang &clang_ast_ctx, llvm::StringRef &type,
+ bool for_expression) {
if (!consumeChar(type, _C_ID))
return clang::QualType();
@@ -287,10 +288,9 @@ clang::QualType AppleObjCTypeEncodingParser::BuildObjCObjectPointerType(
}
}
-clang::QualType
-AppleObjCTypeEncodingParser::BuildType(TypeSystemClang &clang_ast_ctx,
- llvm::StringRef &type, bool for_expression,
- uint32_t *bitfield_bit_size) {
+clang::QualType AppleObjCTypeEncodingParser::BuildType(
+ TypeSystemClang &clang_ast_ctx, llvm::StringRef &type, bool for_expression,
+ uint32_t *bitfield_bit_size) {
if (type.empty())
return clang::QualType();
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.h
index c207fc6f9..6a6461b04 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.h
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.h
@@ -34,8 +34,8 @@ private:
~StructElement() = default;
};
- clang::QualType BuildType(TypeSystemClang &clang_ast_ctx, llvm::StringRef &type,
- bool for_expression,
+ clang::QualType BuildType(TypeSystemClang &clang_ast_ctx,
+ llvm::StringRef &type, bool for_expression,
uint32_t *bitfield_bit_size = nullptr);
clang::QualType BuildStruct(TypeSystemClang &ast_ctx, llvm::StringRef &type,
@@ -53,8 +53,8 @@ private:
std::string ReadStructName(llvm::StringRef &type);
- StructElement ReadStructElement(TypeSystemClang &ast_ctx, llvm::StringRef &type,
- bool for_expression);
+ StructElement ReadStructElement(TypeSystemClang &ast_ctx,
+ llvm::StringRef &type, bool for_expression);
clang::QualType BuildObjCObjectPointerType(TypeSystemClang &clang_ast_ctx,
llvm::StringRef &type,
``````````
</details>
https://github.com/llvm/llvm-project/pull/172466
More information about the lldb-commits
mailing list