[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:01 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());
+ }
+ if (Arg.getKind() == TemplateArgument::ArgKind::Type)
+ Args.push_back(Arg.getAsType());
+ }
----------------
erichkeane wrote:
If the kind is neither, we should probably do SOMETHING about it, even if it is just an assert.
https://github.com/llvm/llvm-project/pull/143309
More information about the cfe-commits
mailing list