Skip to content

Commit f3bffb7

Browse files
committed
Fixed small issues that where appointed
1 parent e65806e commit f3bffb7

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
@@ -8283,14 +8283,11 @@ void Sema::redelayDiagnostics(DelayedDiagnosticPool &pool) {
82838283
}
82848284

82858285
void Sema::ActOnCleanupAttr(Expr *E, Decl *D, const Attr *A) {
8286-
FunctionDecl *FD = nullptr;
8287-
DeclarationNameInfo NI;
8288-
CleanupAttr *Attr = D->getAttr<CleanupAttr>();
8289-
82908286
// Obtains the FunctionDecl that was found when handling the attribute
82918287
// earlier.
8292-
FD = Attr->getFunctionDecl();
8293-
NI = FD->getNameInfo();
8288+
CleanupAttr *Attr = D->getAttr<CleanupAttr>();
8289+
FunctionDecl *FD = Attr->getFunctionDecl();
8290+
DeclarationNameInfo NI = FD->getNameInfo();
82948291

82958292
// We're currently more strict than GCC about what function types we accept.
82968293
// 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)