[PATCH] D103040: Print default template argument if manually specified in typedef declaration.

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 30 09:58:30 PDT 2021


dblaikie added inline comments.


================
Comment at: clang/test/SemaTemplate/class-template-id.cpp:12-14
+    return ptr2; // expected-error{{cannot initialize return object of type 'A<int, FLOAT> *' (aka 'A<int, float> *') with an lvalue of type 'const A<int> *'}}
   else {
+    return ptr3; // expected-error{{cannot initialize return object of type 'A<int, FLOAT> *' (aka 'A<int, float> *') with an lvalue of type 'A<int, double> *'}}
----------------
dblaikie wrote:
> FWIW, looks like this was a reduction in quality - printing the value of the default argument in these error messages, when omitting it was probably desirable?
> 
> & doesn't seem to be a necessary consequence of the patch description's goals.
Nevermind - I was looking at the parameter types, not the return type. I see the return type is written out more explicitly, so it makes sense that that fuller name be rendered in the message too.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103040



More information about the cfe-commits mailing list