[LLVMbugs] [Bug 23782] New: Use clang-format on types error messages
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jun 8 07:22:12 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23782
Bug ID: 23782
Summary: Use clang-format on types error messages
Product: clang
Version: 3.6
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: schnetter at gmail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Here is a "typical" compiler error message I'm receiving from clang:
{{{
./fun/grid_impl.hpp:84:4: note: candidate template ignored: substitution
failure
[with D = 2, F = fun::detail::tree_fmapStencilMulti_g<2,
cxx::detail::funobj_impl<cell_t (*)(const cell_t &, long),
&cell_get_face>
> &, G = unsigned long &, C = adt::maxarray<adt::dummy, 16>, T =
adt::tree<adt::nested<std::__1::shared_ptr<adt::dummy>,
adt::grid<adt::maxarray<adt::dummy, 16>, adt::dummy, 2>, adt::dummy,
adt::detail::nested_default_policy<adt::dummy> >, cell_t>, Args =
<cxx::detail::funobj_impl<cell_t (*)(const cell_t &, unsigned long, const
cell_t &, const cell_t &, const cell_t &, const cell_t &), &cell_rhs>,
cxx::detail::funobj_impl<cell_t (*)(const cell_t &, long),
&cell_get_face>
&>, $6 = nullptr, CT = adt::grid<adt::maxarray<adt::dummy, 16>,
adt::tree<adt::nested<std::__1::shared_ptr<adt::dummy>,
adt::grid<adt::maxarray<adt::dummy, 16>, adt::dummy, 2>, adt::dummy,
adt::detail::nested_default_policy<adt::dummy> >, cell_t>, 2>, BC =
adt::grid<adt::maxarray<adt::dummy, 16>, adt::dummy, 1>]: no type named
'type' in 'cxx::invoke_of<unsigned long &,
adt::tree<adt::nested<std::__1::shared_ptr<adt::dummy>,
adt::grid<adt::maxarray<adt::dummy, 16>, adt::dummy, 2>, adt::dummy,
adt::detail::nested_default_policy<adt::dummy> >, cell_t>, long>'
}}}
To understand this tapeworm, I have to copy-paste it into an editor, look for
matching single quotes, and then manually format (indent) the text between the
quotes. Here is an idea: Couldn't one use clang-format to automated? The error
message would then look like
{{{
./fun/grid_impl.hpp:84:4: note: candidate template ignored: substitution
failure
[with:
D = 2, F = fun::detail::tree_fmapStencilMulti_g<
2, cxx::detail::funobj_impl<cell_t (*)(const cell_t &, long),
&cell_get_face>> &,
G = unsigned long &, C = adt::maxarray<adt::dummy, 16>,
T = adt::tree<
adt::nested<std::__1::shared_ptr<adt::dummy>,
adt::grid<adt::maxarray<adt::dummy, 16>, adt::dummy, 2>,
adt::dummy, adt::detail::nested_default_policy<adt::dummy>>,
cell_t>,
Args = <cxx::detail::funobj_impl<cell_t (*)(const cell_t &, unsigned long,
const cell_t &, const cell_t &,
const cell_t &, const cell_t &),
&cell_rhs>,
cxx::detail::funobj_impl<cell_t (*)(const cell_t &, long),
&cell_get_face> &>,
$6 = nullptr,
CT = adt::grid<
adt::maxarray<adt::dummy, 16>,
adt::tree<adt::nested<
std::__1::shared_ptr<adt::dummy>,
adt::grid<adt::maxarray<adt::dummy, 16>, adt::dummy, 2>,
adt::dummy,
adt::detail::nested_default_policy<adt::dummy>>,
cell_t>,
2>,
BC = adt::grid<adt::maxarray<adt::dummy, 16>, adt::dummy, 1>
]: no type named 'type' in
cxx::invoke_of<
unsigned long &,
adt::tree<
adt::nested<std::__1::shared_ptr<adt::dummy>,
adt::grid<adt::maxarray<adt::dummy, 16>, adt::dummy, 2>,
adt::dummy,
adt::detail::nested_default_policy<adt::dummy>>,
cell_t>,
long>
}}}
which is orders of magnitude more readable.
Alternatively, a simple hierarchical output would also be good...
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150608/fa9bc013/attachment.html>
More information about the llvm-bugs
mailing list