Skip to content

Commit 3f3b45c

Browse files
committed
Fixed small issues that where appointed
1 parent eef160b commit 3f3b45c

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

clang/lib/Sema/SemaDeclAttr.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8303,14 +8303,11 @@ void Sema::redelayDiagnostics(DelayedDiagnosticPool &pool) {
83038303
}
83048304

83058305
void Sema::ActOnCleanupAttr(Expr *E, Decl *D, const Attr *A) {
8306-
FunctionDecl *FD = nullptr;
8307-
DeclarationNameInfo NI;
8308-
CleanupAttr *Attr = D->getAttr<CleanupAttr>();
8309-
83108306
// Obtains the FunctionDecl that was found when handling the attribute
83118307
// earlier.
8312-
FD = Attr->getFunctionDecl();
8313-
NI = FD->getNameInfo();
8308+
CleanupAttr *Attr = D->getAttr<CleanupAttr>();
8309+
FunctionDecl *FD = Attr->getFunctionDecl();
8310+
DeclarationNameInfo NI = FD->getNameInfo();
83148311

83158312
// We're currently more strict than GCC about what function types we accept.
83168313
// If this ever proves to be a problem it should be easy to fix.

clang/test/Sema/type-dependent-attrs.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// RUN: %clang_cc1 -std=c23 -fsyntax-only -verify %s
22

3-
// #GH129631-CleanupAttr
43
int open() { return 0; }
54
void close(typeof(open()) *) {}
65

0 commit comments

Comments
 (0)