rsmith added a comment.

Is is feasible to check whether the corresponding template parameter either has 
a deduced type or is a parameter of a function template? If not, we don't need 
to clarify the type of the template argument and could leave off the suffix to 
shorten the printed argument.



================
Comment at: clang/lib/AST/TemplateBase.cpp:83-84
+        Out << "U";
+      if (Val.getBitWidth() == 64)
+        Out << "LL";
+    }
----------------
We shouldn't assume that we have a `long long` if and only if we have a 64-bit 
value. We should determine how to print the value based on the type `T` instead.

There are cases where there is no matching suffix, too, such as a `short` 
template argument. If there is no matching suffix, presumably we should print a 
cast instead.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77598/new/

https://reviews.llvm.org/D77598



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D77598: I... Richard Smith - zygoloid via Phabricator via cfe-commits

Reply via email to