================
@@ -1686,6 +1686,15 @@ void SemaRISCV::handleInterruptAttr(Decl *D, const 
ParsedAttr &AL) {
     Types.insert(Type);
   }
 
+  const bool IsSiFiveCLICTriple =
+      Types.size() == 3 && Types.contains(RISCVInterruptAttr::machine) &&
+      Types.contains(RISCVInterruptAttr::SiFiveCLICPreemptible) &&
+      Types.contains(RISCVInterruptAttr::SiFiveCLICStackSwap);
+  if (AL.getNumArgs() == 3 && !IsSiFiveCLICTriple) {
+    Diag(AL.getLoc(), diag::err_riscv_attribute_interrupt_invalid_combination);
+    return;
+  }
----------------
lenary wrote:

I don't think this error is useful - surely if you include 3 items that include 
any other values, they will get an error because it's an invalid combination?

https://github.com/llvm/llvm-project/pull/216159
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to