[llvm-bugs] [Bug 27793] New: Long typenames produce extremely hard to read diagnostics and slow down compilation time
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue May 17 12:09:16 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27793
Bug ID: 27793
Summary: Long typenames produce extremely hard to read
diagnostics and slow down compilation time
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: vittorio.romeo at outlook.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Long typenames, usually generated by heavy template metaprogramming code,
result in errors that are extremely hard to read and parse. Furthermore, they
slow down compilation time significantly.
Here's a benchmark and example from the boost::di project:
http://melpon.org/wandbox/permlink/7Fh0u2oaQbDmkNV0
The benchmark shows:
* How unnecessarily long and hard-to-understand errors are.
* How typename erasure techniques can improve compilation times (define
TYPENAME_ERASURE to see compilation time improvements).
I've encountered this same issue in one of my projects (ECST) - errors were
impossible to understand before GCC 6 was released. GCC 6's produced errors
pinpoint the issue more accurately, but still produce an enormous amount of
unnecessary output.
I think this is primarily a defect in error reporting. A flag to control long
typename output would be desired and possibly necessary for projects that
require the generation of long typenames.
I also think that having compilation times speed up when erasing typenames
signals some sort of potential compilation optimization for long typenames.
P.S.: gcc has similar issues.
Links:
boost::di -> https://github.com/boost-experimental/di
ECST -> https://github.com/SuperV1234/ecst
--
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/20160517/4fe223d4/attachment.html>
More information about the llvm-bugs
mailing list