[LLVMbugs] [Bug 6513] crash on invalid (enum forward decl in template arg list)
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Oct 5 04:16:18 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=6513
Gabor Greif <ggreif at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #1 from Gabor Greif <ggreif at gmail.com> 2010-10-05 06:16:18 CDT ---
A recent clang does give sensible error messages and does not crash any more:
gabor at google7:~$ cat > goo.cpp
template <enum PortRole ROLE, typename FACILITY, template <enum PortRole,
typename> class GOVERN>
class Role : public FACILITY, protected GOVERN<ROLE, FACILITY>
{
friend class GOVERN<ROLE, FACILITY>;
};
gabor at google7:~$ ~/llvm-build/Debug+Asserts/bin/clang++ -o hh goo.cpp
goo.cpp:1:16: error: ISO C++ forbids forward references to 'enum' types
template <enum PortRole ROLE, typename FACILITY, template <enum PortRole,
^
goo.cpp:1:25: error: a non-type template parameter cannot have type 'enum
PortRole'
template <enum PortRole ROLE, typename FACILITY, template <enum PortRole,
^
goo.cpp:1:73: error: a non-type template parameter cannot have type 'enum
PortRole'
template <enum PortRole ROLE, typename FACILITY, template <enum PortRole,
^
goo.cpp:4:1: error: expected class name
{
^
4 errors generated.
gabor at google7:~$ ~/llvm-build/Debug+Asserts/bin/clang++ --version
clang version 2.9 (trunk 115312)
Target: x86_64-unknown-linux-gnu
Thread model: posix
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list