AST: Replace ImplicitlyUnwrappedOptionalAttr with Decl::{is,set}ImplicitlyUnwrappedOptional()

This commit is contained in:
Slava Pestov
2019-08-15 15:33:48 -04:00
parent 3639bc4c24
commit 19d283d9dc
31 changed files with 132 additions and 168 deletions

View File

@@ -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);
}