<div dir="ltr">Hi Larry,<div><br></div><div>Right now, the template type diffing only works when there are two templated types in the diagnostics message, and the templated types share the same base.  It your first example, the two types are vector<double> and vector<float>.</div><div><br></div><div>In the second error message, only one type is printed with the diagnostic message.  This does not trigger the template type diffing.  The first message is "no member named 'size' in <<very long type name>>" and the second message is "in instantiation of function template specialization <<long type name>> requested here"</div><div><br></div><div>Richard</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 24, 2016 at 9:39 AM, Larry Evans via cfe-users <span dir="ltr"><<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I've downloaded:<br>
<br>
~/dwnlds/llvm/3.8/prebuilt $ wget <a href="http://www.llvm.org/releases/3.8.0/clang+llvm-3.8.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz.sig" rel="noreferrer" target="_blank">http://www.llvm.org/releases/3.8.0/clang+llvm-3.8.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz.sig</a><br>
<br>
untarred it, and compiled a simple program:<br>
<br>
#include <vector><br>
<br>
int main()<br>
{<br>
  std::vector<float > vecf(2);<br>
  std::vector<double> vecd(2);<br>
  vecf = vecd;<br>
  return 0;<br>
}<br>
<br>
resulting in, as expected, an indented error message showing the tree:<br>
<br>
      candidate function not viable: no known conversion from argument type to parameter type for 1st argument<br>
  vector<<br>
    [double != float],<br>
    allocator<<br>
      [double != float]>><br>
    vector& operator=(vector&& __x)<br>
            ^<br>
<br>
However, when compiling a much more complex template program, there's no tree evident by the indentation:<br>
<br>
/home/evansl/dwnlds/llvm/3.8/prebuilt/clang+llvm-3.8.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang++ -c -O0 -stdlib=libc++  -std=c++14 -ftemplate-backtrace-limit=0 -fdiagnostics-show-template-tree -fno-elide-type -fmacro-backtrace-limit=0 -I/home/evansl/prog_dev/boost/github/TBoost.Conversion -I/home/evansl/prog_dev/boost/sandbox/lje/non_variadic_templates -I/home/evansl/prog_dev/clang/libcxx/sandbox/libs/composite_storage/include -I../../../../../../boost/sandbox/lje/sandbox/lje -I/home/evansl/prog_dev/boost/releases/ro/boost_1_59_0  -DTYPE_AT_IMPL=0   -ftemplate-depth=100  texpressions.cpp -MMD -o /tmp/build/clangxx3_8_pkg/clang/libcxx/sandbox/libs/gram_stk/sandbox/texpressions.o <br>
In file included from texpressions.cpp:1:<br>
./texpressions.hpp:1264:46: error: no member named 'size' in 'texpressions<my_symbols>::gram_defs<my_attrs,<br>
<br>
composite_storage::type_sequence<texpressions<my_symbols>::gram_def1<my_symbols<symb_kinds::varble_kind>::syms::varble0,<br>
      def_ops::def_act, composite_storage::top (), var_ptr_bool::var_ptr_yes,<br>
<br>
texpressions<my_symbols>::gram_expr<op_assoc<ops_non_nullary::op_bitor, associativity::assoc_left>,<br>
<br>
texpressions<my_symbols>::gram_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,<br>
      my_symbols<symb_kinds::literl_kind>::syms::literl0>>,<br>
<br>
texpressions<my_symbols>::gram_expr<op_assoc<ops_non_nullary::op_bitand, associativity::assoc_left>,<br>
<br>
texpressions<my_symbols>::gram_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,<br>
      my_symbols<symb_kinds::literl_kind>::syms::literl1>>,<br>
<br>
texpressions<my_symbols>::gram_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,<br>
      my_symbols<symb_kinds::literl_kind>::syms::literl0>> > > > > >::attr_expr<op_assoc<ops_non_nullary::op_bitor,<br>
      associativity::assoc_left>, texpressions<my_symbols>::gram_defs<my_attrs,<br>
<br>
composite_storage::type_sequence<texpressions<my_symbols>::gram_def1<my_symbols<symb_kinds::varble_kind>::syms::varble0,<br>
      def_ops::def_act, composite_storage::top (), var_ptr_bool::var_ptr_yes,<br>
<br>
texpressions<my_symbols>::gram_expr<op_assoc<ops_non_nullary::op_bitor, associativity::assoc_left>,<br>
<br>
texpressions<my_symbols>::gram_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,<br>
      my_symbols<symb_kinds::literl_kind>::syms::literl0>>,<br>
<br>
texpressions<my_symbols>::gram_expr<op_assoc<ops_non_nullary::op_bitand, associativity::assoc_left>,<br>
<br>
texpressions<my_symbols>::gram_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,<br>
      my_symbols<symb_kinds::literl_kind>::syms::literl1>>,<br>
<br>
texpressions<my_symbols>::gram_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,<br>
      my_symbols<symb_kinds::literl_kind>::syms::literl0>> > > > ><br>
<br>
>::attr_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,<br>
      my_symbols<symb_kinds::literl_kind>::syms::literl0>>, texpressions<my_symbols>::gram_defs<my_attrs,<br>
<br>
composite_storage::type_sequence<texpressions<my_symbols>::gram_def1<my_symbols<symb_kinds::varble_kind>::syms::varble0,<br>
      def_ops::def_act, composite_storage::top (), var_ptr_bool::var_ptr_yes,<br>
<br>
texpressions<my_symbols>::gram_expr<op_assoc<ops_non_nullary::op_bitor, associativity::assoc_left>,<br>
<br>
texpressions<my_symbols>::gram_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,<br>
      my_symbols<symb_kinds::literl_kind>::syms::literl0>>,<br>
<br>
texpressions<my_symbols>::gram_expr<op_assoc<ops_non_nullary::op_bitand, associativity::assoc_left>,<br>
<br>
texpressions<my_symbols>::gram_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,<br>
      my_symbols<symb_kinds::literl_kind>::syms::literl1>>,<br>
<br>
texpressions<my_symbols>::gram_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,<br>
      my_symbols<symb_kinds::literl_kind>::syms::literl0>> > > > > >::attr_expr<op_assoc<ops_non_nullary::op_bitand,<br>
      associativity::assoc_left>, texpressions<my_symbols>::gram_defs<my_attrs,<br>
<br>
composite_storage::type_sequence<texpressions<my_symbols>::gram_def1<my_symbols<symb_kinds::varble_kind>::syms::varble0,<br>
      def_ops::def_act, composite_storage::top (), var_ptr_bool::var_ptr_yes,<br>
<br>
texpressions<my_symbols>::gram_expr<op_assoc<ops_non_nullary::op_bitor, associativity::assoc_left>,<br>
<br>
texpressions<my_symbols>::gram_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,<br>
      my_symbols<symb_kinds::literl_kind>::syms::literl0>>,<br>
<br>
texpressions<my_symbols>::gram_expr<op_assoc<ops_non_nullary::op_bitand, associativity::assoc_left>,<br>
<br>
texpressions<my_symbols>::gram_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,<br>
      my_symbols<symb_kinds::literl_kind>::syms::literl1>>,<br>
<br>
texpressions<my_symbols>::gram_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,<br>
      my_symbols<symb_kinds::literl_kind>::syms::literl0>> > > > ><br>
<br>
>::attr_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,<br>
      my_symbols<symb_kinds::literl_kind>::syms::literl1>>, texpressions<my_symbols>::gram_defs<my_attrs,<br>
<br>
composite_storage::type_sequence<texpressions<my_symbols>::gram_def1<my_symbols<symb_kinds::varble_kind>::syms::varble0,<br>
      def_ops::def_act, composite_storage::top (), var_ptr_bool::var_ptr_yes,<br>
<br>
texpressions<my_symbols>::gram_expr<op_assoc<ops_non_nullary::op_bitor, associativity::assoc_left>,<br>
<br>
texpressions<my_symbols>::gram_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,<br>
      my_symbols<symb_kinds::literl_kind>::syms::literl0>>,<br>
<br>
texpressions<my_symbols>::gram_expr<op_assoc<ops_non_nullary::op_bitand, associativity::assoc_left>,<br>
<br>
texpressions<my_symbols>::gram_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,<br>
      my_symbols<symb_kinds::literl_kind>::syms::literl1>>,<br>
<br>
texpressions<my_symbols>::gram_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,<br>
      my_symbols<symb_kinds::literl_kind>::syms::literl0>> > > > ><br>
<br>
>::attr_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,<br>
      my_symbols<symb_kinds::literl_kind>::syms::literl0>> > >'<br>
                    now_index=DefNow::now_t::size-num_rands;<br>
                                             ^<br>
./texpressions.hpp:1150:19: note: in instantiation of function template specialization<br>
      'texpressions<my_symbols>::gram_defs<my_attrs,<br>
<br>
composite_storage::type_sequence<texpressions<my_symbols>::gram_def1<my_symbols<symb_kinds::varble_kind>::syms::varble0,<br>
      def_ops::def_act, composite_storage::top (), var_ptr_bool::var_ptr_yes,<br>
<br>
texpressions<my_symbols>::gram_expr<op_assoc<ops_non_nullary::op_bitor, associativity::assoc_left>,<br>
<br>
texpressions<my_symbols>::gram_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,<br>
      my_symbols<symb_kinds::literl_kind>::syms::literl0>>,<br>
<br>
texpressions<my_symbols>::gram_expr<op_assoc<ops_non_nullary::op_bitand, associativity::assoc_left>,<br>
<br>
texpressions<my_symbols>::gram_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,<br>
      my_symbols<symb_kinds::literl_kind>::syms::literl1>>,<br>
<br>
texpressions<my_symbols>::gram_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,<br>
      my_symbols<symb_kinds::literl_kind>::syms::literl0>> > > > > >::read_fold_from<ops_non_nullary::op_bitor,<br>
      iter_range<my_symbols<symb_kinds::literl_kind>::syms,<br>
<br>
inp_out_type<my_symbols<symb_kinds::literl_kind>::syms>::out_type>, def_now_t,<br>
<br>
texpressions<my_symbols>::gram_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,<br>
      my_symbols<symb_kinds::literl_kind>::syms::literl0>>,<br>
<br>
texpressions<my_symbols>::gram_expr<op_assoc<ops_non_nullary::op_bitand, associativity::assoc_left>,<br>
<br>
texpressions<my_symbols>::gram_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,<br>
      my_symbols<symb_kinds::literl_kind>::syms::literl1>>,<br>
<br>
texpressions<my_symbols>::gram_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,<br>
      my_symbols<symb_kinds::literl_kind>::syms::literl0>> > >' requested here<br>
                  read_fold_from<br>
                  ^<br>
<br>
As you can see from the output, there's only *one* level of indentation when several levels, reflecting the tree structure, are what I expected.<br>
<br>
How do I get the expected indentation?<br>
<br>
TIA.<br>
<br>
-regards,<br>
Larry<br>
<br>
_______________________________________________<br>
cfe-users mailing list<br>
<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users</a><br>
</blockquote></div><br></div>