================
@@ -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);
----------------
pesdarshan wrote:

Thanks, I got it now. I pushed an update. `ExtractedTypeTraitInfo` now carries 
the std name and the `TT_IsTriviallyConstructible` case checks it, so the 
`const T&` argument is no longer added. Direct `__is_trivially_constructible(T, 
const T&)` calls still go through the two-argument check. Let me know if you 
would like anything else changed.

https://github.com/llvm/llvm-project/pull/225487
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to