[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 09:39:30 PDT 2016
I've downloaded:
~/dwnlds/llvm/3.8/prebuilt $ wget
http://www.llvm.org/releases/3.8.0/clang+llvm-3.8.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz.sig
untarred it, and compiled a simple program:
#include <vector>
int main()
{
std::vector<float > vecf(2);
std::vector<double> vecd(2);
vecf = vecd;
return 0;
}
resulting in, as expected, an indented error message showing the tree:
candidate function not viable: no known conversion from argument
type to parameter type for 1st argument
vector<
[double != float],
allocator<
[double != float]>>
vector& operator=(vector&& __x)
^
However, when compiling a much more complex template program, there's no
tree evident by the indentation:
/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
In file included from texpressions.cpp:1:
./texpressions.hpp:1264:46: error: no member named 'size' in
'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,
my_symbols<symb_kinds::literl_kind>::syms::literl0>> > > > >
>::attr_expr<op_assoc<ops_non_nullary::op_bitor,
associativity::assoc_left>,
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,
my_symbols<symb_kinds::literl_kind>::syms::literl0>> > > > >
>::attr_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,
my_symbols<symb_kinds::literl_kind>::syms::literl0>>,
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,
my_symbols<symb_kinds::literl_kind>::syms::literl0>> > > > >
>::attr_expr<op_assoc<ops_non_nullary::op_bitand,
associativity::assoc_left>,
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,
my_symbols<symb_kinds::literl_kind>::syms::literl0>> > > > >
>::attr_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,
my_symbols<symb_kinds::literl_kind>::syms::literl1>>,
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,
my_symbols<symb_kinds::literl_kind>::syms::literl0>> > > > >
>::attr_expr<texpressions<my_symbols>::op_symb<symb_kinds::literl_kind,
my_symbols<symb_kinds::literl_kind>::syms::literl0>> > >'
now_index=DefNow::now_t::size-num_rands;
^
./texpressions.hpp:1150:19: note: in instantiation of function template
specialization
'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,
my_symbols<symb_kinds::literl_kind>::syms::literl0>> > > > >
>::read_fold_from<ops_non_nullary::op_bitor,
iter_range<my_symbols<symb_kinds::literl_kind>::syms,
inp_out_type<my_symbols<symb_kinds::literl_kind>::syms>::out_type>,
def_now_t,
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,
my_symbols<symb_kinds::literl_kind>::syms::literl0>> > >'
requested here
read_fold_from
^
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.
How do I get the expected indentation?
TIA.
-regards,
Larry
More information about the cfe-users
mailing list