[cfe-users] 3.8 indentation with -fdiagnostics-show-template-tree doesn't show tree

Larry Evans via cfe-users cfe-users at lists.llvm.org
Tue May 24 15:21:44 PDT 2016


On 05/24/2016 04:09 PM, Richard Trieu via cfe-users wrote:
> Hi Larry,
>
> 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>.
>
> 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"
>
> Richard
>
Thanks Richard.

That's too bad.  It finally dawned on me that I might could use
clang-format on the part of the error message I wanted indented.
It worked:

~/prog_dev/clang/libcxx/sandbox/libs/gram_stk/sandbox $ head test.cpp
texpressions<my_symbols>::gram_defs<my_attrs,
 
composite_storage::type_sequence<texpressions<my_symbols>::gram_def1<my_symbols<symb_kinds::varble_kind>::syms::varble0,
       def_ops::def_act, composite_storage::top (), 
var_ptr_bool::var_ptr_yes,
 
texpressions<my_symbols>::gram_expr<op_assoc<ops_non_nullary::op_bitor, 
associativity::assoc_left>,
 
texpressions<my_symbols>::gram_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,
       my_symbols<symb_kinds::literl_kind>::syms::literl0>>,
 
texpressions<my_symbols>::gram_expr<op_assoc<ops_non_nullary::op_bitand, 
associativity::assoc_left>,
 
texpressions<my_symbols>::gram_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,
       my_symbols<symb_kinds::literl_kind>::syms::literl1>>,
 
texpressions<my_symbols>::gram_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,
~/prog_dev/clang/libcxx/sandbox/libs/gram_stk/sandbox $ clang-format 
test.cpp|head
Can't find usable .clang-format, using LLVM style
texpressions<my_symbols>::gram_defs<
     my_attrs,
     composite_storage::type_sequence<texpressions<my_symbols>::gram_def1<
         my_symbols<symb_kinds::varble_kind>::syms::varble0, 
def_ops::def_act,
         composite_storage::top(), var_ptr_bool::var_ptr_yes,
         texpressions<my_symbols>::gram_expr<
             op_assoc<ops_non_nullary::op_bitor, associativity::assoc_left>,
             texpressions<my_symbols>::gram_expr<
                 texpressions<my_symbols>::op_symb<
~/prog_dev/clang/libcxx/sandbox/libs/gram_stk/sandbox $

Hope that helps others which have similar problem deciphering
error messages ;)

-regards,
Larry






More information about the cfe-users mailing list