Sema: diagnose PMFs passed through registers to inline assembly
authorSaleem Abdulrasool <compnerd@compnerd.org>
Fri, 9 Dec 2022 16:58:15 +0000 (16:58 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Fri, 9 Dec 2022 16:58:46 +0000 (16:58 +0000)
commit707cc06e1570b5966efcd6a9124191c80fa7a754
tree88237e84b1942844f6332a93b5470e9e0a75bd16
parentcc6b10d1ee915e47b3beb68384c6a60b6453ddc7
Sema: diagnose PMFs passed through registers to inline assembly

The itanium ABI represents the PMF as a pair of pointers.  As such the
structure cannot be passed through a single register.  Diagnose such
cases in the frontend rather than trying to generate IR to perform this
operation.

Fixes: 59033

Differential Revision: https://reviews.llvm.org/D13851
Reviewed By: aaron.ballman
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaStmtAsm.cpp
clang/test/Sema/gnu-asm-pmf.cpp [new file with mode: 0644]