[clang] [Clang][RISCV] Allow three SiFive CLIC interrupt arguments (PR #216159)
Sam Elliott via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 13 13:57:50 PDT 2026
================
@@ -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
More information about the cfe-commits
mailing list