[clang] [clang] Fix underlying type of EmbedExpr (PR #99050)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 16 09:06:09 PDT 2024


https://github.com/AaronBallman commented:

Changes LGTM but I agree with @cor3ntin that we should add the test case from https://github.com/llvm/llvm-project/pull/97274#issuecomment-2230410564 explicitly. Some other tests to consider adding at the same time:
```
static_assert(_Generic(
#embed __FILE__ limit(1)
  , int : 1, default : 0));

static_assert(alignof(typeof(
#embed __FILE__ limit(1)
)) == alignof(int));

printf("%hhu", // Do we get a -Wformat diagnostic about the specifier mismatch?
#embed __FILE__ limit(1)
);
```

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


More information about the cfe-commits mailing list