[clang] [BPF] Support preserve_access_index attribute for enum (PR #232498)

via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 8 09:22:00 PST 2026


================
@@ -6789,10 +6789,12 @@ ExprResult Sema::BuiltinShuffleVector(CallExpr *TheCall) {
       continue;
 
     std::optional<llvm::APSInt> Result = Arg->getIntegerConstantExpr(Context);
-    if (!Result)
-      return ExprError(Diag(TheCall->getBeginLoc(),
-                            diag::err_shufflevector_nonconstant_argument)
-                       << Arg->getSourceRange());
+    if (!Result) {
+      Diag(TheCall->getBeginLoc(), diag::err_shufflevector_nonconstant_argument)
+          << Arg->getSourceRange();
+      BPF().notePreserveAIEnumerator(Arg);
----------------
yonghong-song wrote:

Will remove.

https://github.com/llvm/llvm-project/pull/232498


More information about the cfe-commits mailing list