File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -3703,17 +3703,17 @@ void Parser::ParseDeclarationSpecifiers(
37033703 // We reject AT_LifetimeBound and AT_AnyX86NoCfCheck, even though they
37043704 // are type attributes, because we historically haven't allowed these
37053705 // to be used as type attributes in C++11 / C23 syntax.
3706- if (PA.getKind () == ParsedAttr::AT_LifetimeBound) {
3706+ if (PA.isTypeAttr () && PA.getKind () != ParsedAttr::AT_LifetimeBound &&
3707+ PA.getKind () != ParsedAttr::AT_AnyX86NoCfCheck)
3708+ continue ;
3709+
3710+ if (PA.getKind () == ParsedAttr::AT_LifetimeBound)
37073711 Diag (PA.getLoc (), diag::err_attribute_wrong_decl_type_str)
37083712 << PA << PA.isRegularKeywordAttribute ()
37093713 << " parameters and implicit object parameters" ;
3710- PA.setInvalid ();
3711- continue ;
3712- }
3713- if (PA.isTypeAttr () && PA.getKind () != ParsedAttr::AT_AnyX86NoCfCheck)
3714- continue ;
3715- Diag (PA.getLoc (), diag::err_attribute_not_type_attr)
3716- << PA << PA.isRegularKeywordAttribute ();
3714+ else
3715+ Diag (PA.getLoc (), diag::err_attribute_not_type_attr)
3716+ << PA << PA.isRegularKeywordAttribute ();
37173717 PA.setInvalid ();
37183718 }
37193719
You can’t perform that action at this time.
0 commit comments