[llvm-bugs] [Bug 25857] New: Clang hangs in template instantiation after diagnosing C++11 narrowing in NTTP.
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Dec 16 14:54:29 PST 2015
https://llvm.org/bugs/show_bug.cgi?id=25857
Bug ID: 25857
Summary: Clang hangs in template instantiation after diagnosing
C++11 narrowing in NTTP.
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: eric at efcs.ca
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 15474
--> https://llvm.org/bugs/attachment.cgi?id=15474&action=edit
reproducer.cpp
The attached reproducer causes clang to hang after in instantiates the `__make`
template with `-3`. Clang will emit a C++11 narrowing error before silently
hanging. My guess is that clang trys to instantiate the base class of
`__parity` with the converted value 4294967293.
metaprogramming often uses an integer NTTP to control the number of
instantiations. If clang instantiates a template with a narrowed NTTP it could
be in for a long ride.
I would be willing to work on a fix if somebody could offer direction on the
solution.
--
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/20151216/a18e671d/attachment.html>
More information about the llvm-bugs
mailing list