[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)
Ilya Biryukov via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 2 05:52:07 PST 2024
================
@@ -8612,7 +8612,10 @@ 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_not_type_attr)
----------------
ilya-biryukov wrote:
The other error that says "only applies to parameters and implicit object parameters" seems to be provide more context.
Should we maybe use that instead? Are there any reasons to use the more generic one?
https://github.com/llvm/llvm-project/pull/118281
More information about the cfe-commits
mailing list