[PATCH] D150528: [Clang] Fix the diagnoses when the argument to alignas is an incomplete type

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 15 08:39:20 PDT 2023


aaron.ballman added a comment.

In D150528#4342535 <https://reviews.llvm.org/D150528#4342535>, @yronglin wrote:

> Thanks a lot for your review @aaron.ballman ! BTW, does the most good approach is that we just add a new `ParsedAttribute` with `TypeSourceInfo` but not an `UnaryExprOrTypeTraitExpr`, and only do a sema check same as `alignof(type-id)`?

Because you've already got a `ParsedAttr`, I think you'd use this constructor: https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Sema/ParsedAttr.h#L274 and move the call to `GetTypeFromParser()` until later, but it should still be modelled as a `UnaryExprOrTypeTraitExpr`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150528/new/

https://reviews.llvm.org/D150528



More information about the cfe-commits mailing list