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

via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 7 20:05:32 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);
----------------
4ast wrote:

This is a BPF hook in shared code for one note. I don't think BPF progs shuffle vectors. can we drop this hunk and the `shuffle()` test ?

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


More information about the cfe-commits mailing list