mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
AST: Replace ImplicitlyUnwrappedOptionalAttr with Decl::{is,set}ImplicitlyUnwrappedOptional()
This commit is contained in:
@@ -1172,9 +1172,7 @@ bool MissingOptionalUnwrapFailure::diagnoseAsError() {
|
||||
return true;
|
||||
|
||||
if (auto declRefExpr = dyn_cast<DeclRefExpr>(initializer)) {
|
||||
if (declRefExpr->getDecl()
|
||||
->getAttrs()
|
||||
.hasAttribute<ImplicitlyUnwrappedOptionalAttr>()) {
|
||||
if (declRefExpr->getDecl()->isImplicitlyUnwrappedOptional()) {
|
||||
emitDiagnostic(declRefExpr->getLoc(), diag::unwrap_iuo_initializer,
|
||||
baseType);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user