[clang] (reland) [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118501)
Maksim Ivanov via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 9 11:22:53 PST 2025
================
@@ -8612,7 +8612,11 @@ static void HandleLifetimeBoundAttr(TypeProcessingState &State,
CurType = State.getAttributedType(
createSimpleAttr<LifetimeBoundAttr>(State.getSema().Context, Attr),
CurType, CurType);
+ return;
}
+ State.getSema().Diag(Attr.getLoc(), diag::err_attribute_wrong_decl_type_str)
+ << Attr << Attr.isRegularKeywordAttribute()
+ << "parameters and implicit object parameters";
----------------
emaxx-google wrote:
Yes, I'm going to address this as well. Thanks for reminding about this.
https://github.com/llvm/llvm-project/pull/118501
More information about the cfe-commits
mailing list