[PATCH] D138514: Sema: diagnose PMFs passed through registers to inline assembly

2022-12-09 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. This revision is now accepted and ready to land. (Accepting Revision for Closing) I missed the trailing number of the differential revision, and it failed to tie it to this. The commit is at

[PATCH] D138514: Sema: diagnose PMFs passed through registers to inline assembly

2022-12-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Generally LGTM but I'd appreciate a second pass by @rnk in case I've missed something. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8845-8846 let CategoryName = "Inline Assembly Issue" in { + def err_asm_pmf_in_input +:

[PATCH] D138514: Sema: diagnose PMFs passed through registers to inline assembly

2022-12-06 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 480523. compnerd added a comment. Add a test case for member data. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138514/new/ https://reviews.llvm.org/D138514 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D138514: Sema: diagnose PMFs passed through registers to inline assembly

2022-12-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: clang/lib/Sema/SemaStmtAsm.cpp:381 +if (!Context.getTargetInfo().getCXXABI().isMicrosoft()) + if (const auto *UO = dyn_cast(InputExpr)) +if (UO->getOpcode() == UO_AddrOf) rnk wrote: > compnerd wrote: >

[PATCH] D138514: Sema: diagnose PMFs passed through registers to inline assembly

2022-12-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 479752. compnerd marked an inline comment as done. compnerd added a comment. Address feedback from review CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138514/new/ https://reviews.llvm.org/D138514 Files:

[PATCH] D138514: Sema: diagnose PMFs passed through registers to inline assembly

2022-12-02 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/lib/Sema/SemaStmtAsm.cpp:381 +if (!Context.getTargetInfo().getCXXABI().isMicrosoft()) + if (const auto *UO = dyn_cast(InputExpr)) +if (UO->getOpcode() == UO_AddrOf) compnerd wrote: > aaron.ballman

[PATCH] D138514: Sema: diagnose PMFs passed through registers to inline assembly

2022-12-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd marked an inline comment as done. compnerd added inline comments. Comment at: clang/test/Sema/gnu-asm-pmf.cpp:1-34 +// RUN: %clang_cc1 -triple x86_64-unknown-windows-msvc -std=c++2b -fsyntax-only -verify %s -DMICROSOFT_ABI +// RUN: %clang_cc1 -triple

[PATCH] D138514: Sema: diagnose PMFs passed through registers to inline assembly

2022-12-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: clang/lib/Sema/SemaStmtAsm.cpp:381 +if (!Context.getTargetInfo().getCXXABI().isMicrosoft()) + if (const auto *UO = dyn_cast(InputExpr)) +if (UO->getOpcode() == UO_AddrOf) aaron.ballman wrote: > rnk

[PATCH] D138514: Sema: diagnose PMFs passed through registers to inline assembly

2022-11-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8845-8846 let CategoryName = "Inline Assembly Issue" in { + def err_asm_pmf_in_input +: Error<"cannot pass pointer-to-member through a register on this ABI">; def

[PATCH] D138514: Sema: diagnose PMFs passed through registers to inline assembly

2022-11-22 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/lib/Sema/SemaStmtAsm.cpp:381 +if (!Context.getTargetInfo().getCXXABI().isMicrosoft()) + if (const auto *UO = dyn_cast(InputExpr)) +if (UO->getOpcode() == UO_AddrOf) This is too narrow, there are lots

[PATCH] D138514: Sema: diagnose PMFs passed through registers to inline assembly

2022-11-22 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added a reviewer: aaron.ballman. compnerd added a project: clang. Herald added a project: All. compnerd requested review of this revision. The itanium ABI represents the PMF as a pair of pointers. As such the structure cannot be passed through a single