[PATCH] D103611: Correct the behavior of va_arg checking in C++

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 4 05:24:56 PDT 2021


aaron.ballman added a comment.

In D103611#2797044 <https://reviews.llvm.org/D103611#2797044>, @efriedma wrote:

> I'm a little nervous about using C type merging in C++; it's not designed to support C++ types, so it might end up crashing or something like that.  I think I'd prefer to explicitly convert enum types to their underlying type.

I got lulled into thinking `mergeTypes()` worked for C++ because it handles references and cites the C++ standard first thing. But I see later that it also claims some C++ types are unreachable. So I switched to the underlying type for the enumeration, good suggestion!


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

https://reviews.llvm.org/D103611



More information about the cfe-commits mailing list