Skip to content

Commit 5774610

Browse files
committed
[cxx-interop] Fix patch formatting with clang-format.
Fix all formatting of the changes made by this patch.
1 parent 4364af3 commit 5774610

File tree

5 files changed

+13
-14
lines changed

5 files changed

+13
-14
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3590,8 +3590,8 @@ void ClangImporter::getMangledName(raw_ostream &os,
35903590
Impl.Mangler.reset(Impl.getClangASTContext().createMangleContext());
35913591

35923592
if (auto ctor = dyn_cast<clang::CXXConstructorDecl>(clangDecl)) {
3593-
auto ctorGlobalDecl = clang::GlobalDecl(ctor,
3594-
clang::CXXCtorType::Ctor_Complete);
3593+
auto ctorGlobalDecl =
3594+
clang::GlobalDecl(ctor, clang::CXXCtorType::Ctor_Complete);
35953595
Impl.Mangler->mangleCXXName(ctorGlobalDecl, os);
35963596
} else {
35973597
Impl.Mangler->mangleName(clangDecl, os);

lib/ClangImporter/ImportDecl.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3485,8 +3485,7 @@ namespace {
34853485
result->setHasUnreferenceableStorage(hasUnreferenceableStorage);
34863486

34873487
if (cxxRecordDecl) {
3488-
result->setIsCxxNonTrivial(
3489-
!cxxRecordDecl->isTriviallyCopyable());
3488+
result->setIsCxxNonTrivial(!cxxRecordDecl->isTriviallyCopyable());
34903489

34913490
for (auto ctor : cxxRecordDecl->ctors()) {
34923491
if (ctor->isCopyConstructor() &&
@@ -3925,10 +3924,10 @@ namespace {
39253924
} else {
39263925
auto resultTy = importedType.getType();
39273926

3928-
FuncDecl *func = createFuncOrAccessor(
3929-
Impl.SwiftContext, loc, accessorInfo, name,
3930-
nameLoc, bodyParams, resultTy,
3931-
/*async*/ false, /*throws*/ false, dc, decl);
3927+
FuncDecl *func =
3928+
createFuncOrAccessor(Impl.SwiftContext, loc, accessorInfo, name,
3929+
nameLoc, bodyParams, resultTy,
3930+
/*async*/ false, /*throws*/ false, dc, decl);
39323931
result = func;
39333932

39343933
if (!dc->isModuleScopeContext()) {

lib/IRGen/GenCall.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2821,7 +2821,7 @@ static void externalizeArguments(IRGenFunction &IGF, const Callee &callee,
28212821
== SILFunctionTypeRepresentation::Block) {
28222822
// Ignore the physical block-object parameter.
28232823
firstParam += 1;
2824-
// Or the indirect result parameter.
2824+
// Or the indirect result parameter.
28252825
} else if (fnType->getNumResults() > 0 &&
28262826
fnType->getSingleResult().isFormalIndirect()) {
28272827
// Ignore the indirect result parameter.

lib/SIL/IR/SILFunctionType.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2806,9 +2806,9 @@ class CXXMethodConventions : public CFunctionTypeConventions {
28062806
// actual ABI doesn't match the assumed ABI, we try to get as close as
28072807
// possible to make it easy for LLVM to optimize away the thunk.
28082808
return ResultConvention::Indirect;
2809-
}
2810-
return CFunctionTypeConventions::getResult(resultTL);
2811-
}
2809+
}
2810+
return CFunctionTypeConventions::getResult(resultTL);
2811+
}
28122812
static bool classof(const Conventions *C) {
28132813
return C->getKind() == ConventionsKind::CXXMethod;
28142814
}

lib/SILGen/SILGenApply.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@
2727
#include "swift/AST/ForeignErrorConvention.h"
2828
#include "swift/AST/GenericEnvironment.h"
2929
#include "swift/AST/GenericSignature.h"
30-
#include "swift/AST/ParameterList.h"
3130
#include "swift/AST/Module.h"
3231
#include "swift/AST/ModuleLoader.h"
32+
#include "swift/AST/ParameterList.h"
3333
#include "swift/AST/SubstitutionMap.h"
3434
#include "swift/Basic/ExternalUnion.h"
3535
#include "swift/Basic/Range.h"
3636
#include "swift/Basic/STLExtras.h"
3737
#include "swift/Basic/Unicode.h"
3838
#include "swift/SIL/PrettyStackTrace.h"
3939
#include "swift/SIL/SILArgument.h"
40-
#include "llvm/Support/Compiler.h"
4140
#include "clang/AST/DeclCXX.h"
41+
#include "llvm/Support/Compiler.h"
4242

4343
using namespace swift;
4444
using namespace Lowering;

0 commit comments

Comments
 (0)