[PATCH] D156192: [-Wunsafe-buffer-usage] Stop generating incorrect fix-its for variable declarations with unsupported specifiers

Ziqing Luo via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 1 12:43:37 PDT 2023


ziqingluo-90 added a comment.

> Note that your patch doesn't actually address //type// attributes, only //declaration// attributes.

It does not address type attribute.  We can address it in a follow-up patch.

> So it's likely that we have to give up on unsupported type attributes very early, even before the fixit stage. Maybe on `hasPointerType()` stage; in such cases we aren't even sure that's a pointer, what if it's like an `int *__attribute__((vector_size(8)))`? (This actually can't happen; you can't have vectors of pointers. But something similar totally could.)

This is a good idea!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156192



More information about the cfe-commits mailing list