diff options
author | John McCall <rjmccall@apple.com> | 2011-02-01 08:20:08 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-02-01 08:20:08 +0000 |
commit | cde5a400dbc9655eddf0f383585d3cf67c11c539 (patch) | |
tree | 95782a2323c20e3242d0b3b3adcbe876141bf5e7 /test/CodeGenCXX/mangle-unnamed.cpp | |
parent | 071d3af0de273b1079d79f7f979264f28d567373 (diff) |
The code trying to assign a typedef to an anonymous tag declaration was
extremely rambunctious, both on parsing and on template instantiation.
Calm it down, fixing an internal consistency assert on anonymous enum
instantiation manglings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124653 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/mangle-unnamed.cpp')
-rw-r--r-- | test/CodeGenCXX/mangle-unnamed.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGenCXX/mangle-unnamed.cpp b/test/CodeGenCXX/mangle-unnamed.cpp index 83b46d6945..e9f60d0450 100644 --- a/test/CodeGenCXX/mangle-unnamed.cpp +++ b/test/CodeGenCXX/mangle-unnamed.cpp @@ -69,3 +69,14 @@ int f7() { // CHECK: _ZZ2f7vE1a return a.b; } + +// This used to cause an assert because the typedef-for-anonymous-tag +// code was trying to claim the enum for the template. +enum { T8 }; +template <class T> struct Test8 { + typedef T type; + // define internal void @"_ZN5Test8I3$_2EC1ES0_"( + Test8(type t) {} +}; +template <class T> void make_test8(T value) { Test8<T> t(value); } +void test8() { make_test8(T8); } |