[clang] [Clang] add wraps and no_wraps attributes (PR #115094)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 8 15:04:01 PST 2024
================
@@ -6536,6 +6536,30 @@ static void HandleBTFTypeTagAttribute(QualType &Type, const ParsedAttr &Attr,
::new (Ctx) BTFTypeTagAttr(Ctx, Attr, BTFTypeTag), Type);
}
+static void handleWrapsAttr(QualType &Type, const ParsedAttr &Attr,
+ TypeProcessingState &State, bool NoWraps = false) {
+ Sema &S = State.getSema();
+ ASTContext &Ctx = S.Context;
+
+ // wraps and no_wraps are most useful and consistent when used with C. Other
+ // languages have better alternatives within their type systems.
+ if (S.LangOpts.CPlusPlus || S.LangOpts.ObjC)
----------------
erichkeane wrote:
This should diagnose.
https://github.com/llvm/llvm-project/pull/115094
More information about the cfe-commits
mailing list