[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)
Maksim Ivanov via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 2 17:36:44 PST 2024
================
@@ -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:
Sure! Let me create a follow-up PR, since that'll be a work for a different (although very similar) attribute.
https://github.com/llvm/llvm-project/pull/118281
More information about the cfe-commits
mailing list