[PATCH] D152140: [Clang] Limit FunctionTypeExtraBitfields::NumExceptionType to 16 bits.
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 5 07:21:42 PDT 2023
erichkeane requested changes to this revision.
erichkeane added inline comments.
This revision now requires changes to proceed.
================
Comment at: clang/lib/AST/Type.cpp:3374
auto &ExtraBits = *getTrailingObjects<FunctionTypeExtraBitfields>();
- ExtraBits.NumExceptionType = epi.ExceptionSpec.Exceptions.size();
+ auto NumExceptions = epi.ExceptionSpec.Exceptions.size();
+ assert(NumExceptions <= UINT16_MAX &&
----------------
So this isn't a place where we're allowed to use `auto`. We can only use it if the type is listed on the RHS (like in the case of casts/etc).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152140/new/
https://reviews.llvm.org/D152140
More information about the cfe-commits
mailing list