Skip to content

Commit caacb57

Browse files
committed
fixup! clang-format
1 parent 6ce188c commit caacb57

File tree

3 files changed

+25
-27
lines changed

3 files changed

+25
-27
lines changed

lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -836,10 +836,9 @@ bool ClangASTImporter::CompleteObjCInterfaceDecl(
836836
if (result)
837837
return true;
838838

839-
llvm::handleAllErrors(result.takeError(),
840-
[](const clang::ASTImportError &e) {
841-
llvm::errs() << "ERR: " << e.toString() << "\n";
842-
});
839+
llvm::handleAllErrors(result.takeError(), [](const clang::ASTImportError &e) {
840+
llvm::errs() << "ERR: " << e.toString() << "\n";
841+
});
843842

844843
return false;
845844
}

lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp

+17-19
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,8 @@ static void PrepareContextToReceiveMembers(TypeSystemClang &ast,
277277

278278
// We have already completed the type, or we have found its definition and are
279279
// ready to complete it later (cf. ParseStructureLikeDIE).
280-
if (tag_decl_ctx->getDefinition() != nullptr || tag_decl_ctx->isBeingDefined())
280+
if (tag_decl_ctx->getDefinition() != nullptr ||
281+
tag_decl_ctx->isBeingDefined())
281282
return;
282283

283284
// We reach this point of the tag was present in the debug info as a
@@ -1127,9 +1128,8 @@ std::pair<bool, TypeSP> DWARFASTParserClang::ParseCXXMethod(
11271128
// Neither GCC 4.2 nor clang++ currently set a valid
11281129
// accessibility in the DWARF for C++ methods...
11291130
// Default to public for now...
1130-
const auto accessibility = attrs.accessibility == eAccessNone
1131-
? eAccessPublic
1132-
: attrs.accessibility;
1131+
const auto accessibility =
1132+
attrs.accessibility == eAccessNone ? eAccessPublic : attrs.accessibility;
11331133

11341134
clang::CXXMethodDecl *cxx_method_decl = m_ast.AddMethodToCXXRecordType(
11351135
class_opaque_type.GetOpaqueQualType(), attrs.name.GetCString(),
@@ -1889,8 +1889,8 @@ DWARFASTParserClang::ParseStructureLikeDIE(const SymbolContext &sc,
18891889
clang_type_was_created = true;
18901890
clang_type = m_ast.CreateRecordType(
18911891
decl_ctx, GetOwningClangModule(die), attrs.accessibility,
1892-
attrs.name.GetCString(), tag_decl_kind, attrs.class_language,
1893-
&metadata, attrs.exports_symbols);
1892+
attrs.name.GetCString(), tag_decl_kind, attrs.class_language, &metadata,
1893+
attrs.exports_symbols);
18941894
RegisterDIE(die.GetDIE(), clang_type);
18951895
if (!should_directly_complete)
18961896
if (auto *source = llvm::dyn_cast_or_null<ImporterBackedASTSource>(
@@ -1955,15 +1955,15 @@ DWARFASTParserClang::ParseStructureLikeDIE(const SymbolContext &sc,
19551955
} else if (clang_type_was_created && !should_directly_complete) {
19561956
if (attrs.class_language != eLanguageTypeObjC &&
19571957
attrs.class_language != eLanguageTypeObjC_plus_plus)
1958-
// Leave this as a forward declaration until we need to know the
1959-
// details of the type. lldb_private::Type will automatically call
1960-
// the SymbolFile virtual function
1961-
// "SymbolFileDWARF::CompleteType(Type *)" When the definition
1962-
// needs to be defined.
1963-
assert(!dwarf->GetForwardDeclCompilerTypeToDIE().count(
1964-
ClangUtil::RemoveFastQualifiers(clang_type)
1965-
.GetOpaqueQualType()) &&
1966-
"Type already in the forward declaration map!");
1958+
// Leave this as a forward declaration until we need to know the
1959+
// details of the type. lldb_private::Type will automatically call
1960+
// the SymbolFile virtual function
1961+
// "SymbolFileDWARF::CompleteType(Type *)" When the definition
1962+
// needs to be defined.
1963+
assert(!dwarf->GetForwardDeclCompilerTypeToDIE().count(
1964+
ClangUtil::RemoveFastQualifiers(clang_type)
1965+
.GetOpaqueQualType()) &&
1966+
"Type already in the forward declaration map!");
19671967
// Can't assume m_ast.GetSymbolFile() is actually a
19681968
// SymbolFileDWARF, it can be a SymbolFileDWARFDebugMap for Apple
19691969
// binaries.
@@ -2243,15 +2243,13 @@ bool DWARFASTParserClang::CompleteRecordType(const DWARFDIE &die,
22432243
// declarations. If we don't do this, clang will crash with an
22442244
// assertion in the call to clang_type.TransferBaseClasses()
22452245
for (const auto &base_class : bases) {
2246-
clang::TypeSourceInfo *type_source_info =
2247-
base_class->getTypeSourceInfo();
2246+
clang::TypeSourceInfo *type_source_info = base_class->getTypeSourceInfo();
22482247
if (type_source_info)
22492248
TypeSystemClang::RequireCompleteType(
22502249
m_ast.GetType(type_source_info->getType()));
22512250
}
22522251

2253-
m_ast.TransferBaseClasses(clang_type.GetOpaqueQualType(),
2254-
std::move(bases));
2252+
m_ast.TransferBaseClasses(clang_type.GetOpaqueQualType(), std::move(bases));
22552253
}
22562254

22572255
adjustArgPassing(m_ast, attrs, clang_type);

lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -2665,9 +2665,9 @@ static const clang::EnumType *GetCompleteEnumType(clang::ASTContext *ast,
26652665
/// function will try to complete the type if necessary (and allowed
26662666
/// by the specified \ref allow_completion). If we fail to return a *complete*
26672667
/// type, returns nullptr.
2668-
static const clang::Type *
2669-
GetCompleteObjCObjectType(clang::ASTContext *ast, QualType qual_type,
2670-
bool allow_completion) {
2668+
static const clang::Type *GetCompleteObjCObjectType(clang::ASTContext *ast,
2669+
QualType qual_type,
2670+
bool allow_completion) {
26712671
assert(qual_type->isObjCObjectType());
26722672
assert(ast);
26732673

@@ -5398,7 +5398,8 @@ TypeSystemClang::GetNumChildren(lldb::opaque_compiler_type_t type,
53985398
objc_class_type->getInterface();
53995399

54005400
if (class_interface_decl) {
5401-
class_interface_decl = class_interface_decl->getDefinition();;
5401+
class_interface_decl = class_interface_decl->getDefinition();
5402+
;
54025403

54035404
clang::ObjCInterfaceDecl *superclass_interface_decl =
54045405
class_interface_decl->getSuperClass();

0 commit comments

Comments
 (0)