[clang] [Clang] Added explanation why a is constructible evaluated to false. (PR #143309)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 12 08:57:00 PDT 2025
================
@@ -1981,8 +1982,14 @@ static ExtractedTypeTraitInfo ExtractTypeTraitFromExpression(const Expr *E) {
Trait = StdNameToTypeTrait(Name);
if (!Trait)
return std::nullopt;
- for (const auto &Arg : VD->getTemplateArgs().asArray())
- Args.push_back(Arg.getAsType());
+ for (const auto &Arg : VD->getTemplateArgs().asArray()) {
+ if (Arg.getKind() == TemplateArgument::ArgKind::Pack) {
+ for (const auto &InnerArg : Arg.pack_elements())
+ Args.push_back(InnerArg.getAsType());
----------------
erichkeane wrote:
IS this a valid assumption here (that this is a type?). Presumably this could be an NTTP pack as well...
Though `getAsType` would assert for us?
https://github.com/llvm/llvm-project/pull/143309
More information about the cfe-commits
mailing list