https://github.com/azmat-y created 
https://github.com/llvm/llvm-project/pull/91841

Added check for unexpanded parameter pack in attribute [[assume]]. This solves 
#91232. 

>From c9f0887b5af64387938e0d80a4210af296e68f31 Mon Sep 17 00:00:00 2001
From: Azmat Yusuf <azmatyusuf2...@gmail.com>
Date: Sat, 11 May 2024 09:56:02 +0530
Subject: [PATCH] [Clang] Added check for unexpanded pack in attribute
 [[assume]]

---
 clang/lib/Sema/SemaStmtAttr.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/clang/lib/Sema/SemaStmtAttr.cpp b/clang/lib/Sema/SemaStmtAttr.cpp
index 1c84830b6ddd2..36f8ecadcfab7 100644
--- a/clang/lib/Sema/SemaStmtAttr.cpp
+++ b/clang/lib/Sema/SemaStmtAttr.cpp
@@ -670,6 +670,11 @@ ExprResult Sema::ActOnCXXAssumeAttr(Stmt *St, const 
ParsedAttr &A,
   }
 
   auto *Assumption = A.getArgAsExpr(0);
+
+  if (DiagnoseUnexpandedParameterPack(Assumption)) {
+    return ExprError();
+  }
+
   if (Assumption->getDependence() == ExprDependence::None) {
     ExprResult Res = BuildCXXAssumeExpr(Assumption, A.getAttrName(), Range);
     if (Res.isInvalid())

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to