================
@@ -2071,11 +2087,13 @@ static ExtractedTypeTraitInfo
ExtractTypeTraitFromExpression(const Expr *E) {
const TemplateDecl *D = Ts->getTemplateName().getAsTemplateDecl();
if (!D || !D->isInStdNamespace())
return std::nullopt;
- Trait = StdNameToTypeTrait(D->getIdentifier()->getName());
+ StringRef Name = D->getIdentifier()->getName();
+ Trait = StdNameToTypeTrait(Name);
if (!Trait)
return std::nullopt;
for (const auto &Arg : Ts->template_arguments())
Args.push_back(Arg.getAsType());
+ AddCopySourceArg(D->getASTContext(), Name);
----------------
zyn0217 wrote:
I'm still uncomfortable with the synthesizing approach.
Isn't it possible to extend ExtractedTypeTraitInfo to include a verbatim name
i.e. `is_trivially_copy_constructible` in this case and when we deal with
TT_IsTriviallyConstructible, we also check that name?
https://github.com/llvm/llvm-project/pull/225487
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits