[PATCH] D133029: [Sema] Allow to diagnose the references to std::vector<T> with incomplete T

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 31 08:49:24 PDT 2022


ilya-biryukov added a comment.

In D133029#3761400 <https://reviews.llvm.org/D133029#3761400>, @gribozavr2 wrote:

> In D133029#3761344 <https://reviews.llvm.org/D133029#3761344>, @ilya-biryukov wrote:
>
>> [...] I don't think there is an easy way to write it outside `Sema` and `Sema` is not readily available for `clang-tidy`.
>
> What information is missing, exactly?

Whether a type was incomplete at a certain point in code.

  struct IncompleteAtUse;
  std::vector<Incomplete> x; // want to catch this, not visible in the resulting AST.
  struct IncompleteAtUse {};


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133029



More information about the cfe-commits mailing list