[clang] [Clang] Constant Expressions inside of GCC' asm strings (PR #131003)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 17 09:50:52 PDT 2025
================
@@ -1958,6 +1958,24 @@ references can be used instead of numeric references.
return -1;
}
+
+Constexpr strings in GNU ASM statememts
+=======================================
+
+In C++11 mode (and greater), Clang supports specifying the template,
+constraints, and clobber strings with a parenthesized constant expression
+producing an object with ``data`` and ``size`` member functions,
+such as ``std::string``.
----------------
erichkeane wrote:
I'd rather reference the standard, but say something along the lines of "follow the same rules as static_assert message in C++2<whatever>, see `[dcl.pre] p12`.
https://github.com/llvm/llvm-project/pull/131003
More information about the cfe-commits
mailing list