[PATCH] D133586: [clang] initialize type qualifiers for FunctionNoProtoType

Volodymyr Sapsai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 6 17:14:01 PDT 2022


vsapsai added a comment.

In D133586#3833274 <https://reviews.llvm.org/D133586#3833274>, @aaron.ballman wrote:

> Personally, I think the next step is to add a local `assert()` to this function to try to find out why we're calling this on functions without a prototype and fix up the call sites. I think the intent is that you should not be calling this function on an unprototyped function and it'd be good for debug builds to yell if we're doing that, but returning a default constructed object is a safe recovery for release builds.

The problem with that approach is it won't work with the unit test we have. When we have more ODR hashing in C, we can replace the unit test with the one in D104963 <https://reviews.llvm.org/D104963> but I wasn't able to make that one fail reliably (no MSAN on macOS), so not sure it is a sufficient testing.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133586



More information about the cfe-commits mailing list