Skip to content

Commit ba78dbb

Browse files
authored
Merge pull request swiftlang#30468 from martinboehme/protect-nonidentifier-getname
2 parents 9f94fd1 + 490021f commit ba78dbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ClangImporter/ImportDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7680,7 +7680,7 @@ void ClangImporter::Implementation::importAttributes(
76807680
// Ban CFRelease|CFRetain|CFAutorelease(CFTypeRef) as well as custom ones
76817681
// such as CGColorRelease(CGColorRef).
76827682
if (auto FD = dyn_cast<clang::FunctionDecl>(ClangDecl)) {
7683-
if (FD->getNumParams() == 1 &&
7683+
if (FD->getNumParams() == 1 && FD->getDeclName().isIdentifier() &&
76847684
(FD->getName().endswith("Release") ||
76857685
FD->getName().endswith("Retain") ||
76867686
FD->getName().endswith("Autorelease")) &&

0 commit comments

Comments
 (0)