Skip to content

Commit e73d6fa

Browse files
committed
chore: fix formatting
1 parent 12a9164 commit e73d6fa

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

clang/lib/Sema/SemaDecl.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13506,13 +13506,13 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) {
1350613506
// error must be generated.
1350713507
if (RealDecl->hasAttr<CHERIOTSharedObjectAttr>() ||
1350813508
RealDecl->hasAttr<CHERIOTMMIODeviceAttr>()) {
13509-
const IdentifierInfo *AttrName;
13509+
const IdentifierInfo *AttrName;
1351013510

13511-
if (auto *Attr = RealDecl->getAttr<CHERIOTSharedObjectAttr>())
13512-
AttrName = Attr->getAttrName();
13513-
else {
13511+
if (auto *Attr = RealDecl->getAttr<CHERIOTSharedObjectAttr>())
13512+
AttrName = Attr->getAttrName();
13513+
else {
1351413514
AttrName = RealDecl->getAttr<CHERIOTMMIODeviceAttr>()->getAttrName();
13515-
}
13515+
}
1351613516

1351713517
Diag(RealDecl->getLocation(),
1351813518
diag::err_cheriot_global_cap_import_initialized)

clang/lib/Sema/SemaDeclAttr.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2114,12 +2114,12 @@ static void handleCHERIOTMMIODevice(Sema &S, Decl *D, const ParsedAttr &Attr,
21142114
return;
21152115

21162116
if (!VD->hasExternalStorage()) {
2117-
VD->setStorageClass(clang::SC_Extern);
2117+
VD->setStorageClass(clang::SC_Extern);
21182118
}
21192119

21202120
QualType QT = VD->getType();
21212121
if (!QT.isVolatileQualified()) {
2122-
S.Diag(Attr.getLoc(), diag::warn_cheriot_global_cap_import_non_volatile)
2122+
S.Diag(Attr.getLoc(), diag::warn_cheriot_global_cap_import_non_volatile)
21232123
<< VD->getName() << Attr.getAttrName();
21242124
}
21252125

@@ -2176,11 +2176,11 @@ static void handleCHERIOTSharedObject(Sema &S, Decl *D, const ParsedAttr &Attr,
21762176

21772177
if (VD->hasInit()) {
21782178
S.Diag(Attr.getLoc(), diag::err_cheriot_global_cap_import_initialized)
2179-
<< VD->getName() << Attr.getAttrName();
2179+
<< VD->getName() << Attr.getAttrName();
21802180
}
21812181

21822182
if (!VD->hasExternalStorage()) {
2183-
VD->setStorageClass(clang::SC_Extern);
2183+
VD->setStorageClass(clang::SC_Extern);
21842184
}
21852185

21862186
StringRef ObjectName;

0 commit comments

Comments
 (0)