[clang] [clang] Inject tokens containing #embed back into token stream (PR #97274)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 11 02:02:53 PDT 2024


================
@@ -1018,6 +1018,7 @@ ExprResult Parser::ParseCastExpression(CastParseKind ParseKind,
 
     // primary-expression
   case tok::numeric_constant:
----------------
cor3ntin wrote:

These cases

```cpp
[[clang::availability(
   #embed "smth.txt"
)]] void f();

struct S {
   virtual void f() =
#embed "zero.bin"
    ;
};
```

However, it's a bit ambiguous whether these should be supported at all in the proposed C++ wording for embed. I sent a mail to the C++ committee

It's probably fine to ignore that for now, the patch is a great improvement as it is

https://github.com/llvm/llvm-project/pull/97274


More information about the cfe-commits mailing list