[clang] P3394 - C++26 Annotation (PR #166287)
Yanzuo Liu via cfe-commits
cfe-commits at lists.llvm.org
Fri May 8 10:14:28 PDT 2026
================
@@ -6409,6 +6409,60 @@ static void handleRequiresCapabilityAttr(Sema &S, Decl *D,
D->addAttr(RCA);
}
+static void handleCxx26AnnotationAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
+ Expr *CE = AL.getArgAsExpr(0);
+ if (CE->isLValue()) {
----------------
zwuis wrote:
I think most checks of `handleCxx26AnnotationAttr` should be (maybe indirectly) delegated to `CheckTemplateArgument` in SemaTemplate.cpp . `meta::reflect_constant(E)` requires `E` as a valid template argument.
https://github.com/llvm/llvm-project/pull/166287
More information about the cfe-commits
mailing list