<div dir="ltr">Should this test that some specific mangling comes out the other end (tests that amount to "test that this does anything other than crashing" always make me a bit suspicious that there's /some/ specific behavior that is intended/should be tested for)</div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jan 20, 2017 at 11:01 AM Richard Smith via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rsmith<br class="gmail_msg">
Date: Fri Jan 20 12:50:12 2017<br class="gmail_msg">
New Revision: 292632<br class="gmail_msg">
<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=292632&view=rev" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project?rev=292632&view=rev</a><br class="gmail_msg">
Log:<br class="gmail_msg">
Fix actually-reachable llvm_unreachable.<br class="gmail_msg">
<br class="gmail_msg">
Modified:<br class="gmail_msg">
cfe/trunk/lib/AST/ItaniumMangle.cpp<br class="gmail_msg">
cfe/trunk/test/CodeGenCXX/mangle.cpp<br class="gmail_msg">
<br class="gmail_msg">
Modified: cfe/trunk/lib/AST/ItaniumMangle.cpp<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ItaniumMangle.cpp?rev=292632&r1=292631&r2=292632&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ItaniumMangle.cpp?rev=292632&r1=292631&r2=292632&view=diff</a><br class="gmail_msg">
==============================================================================<br class="gmail_msg">
--- cfe/trunk/lib/AST/ItaniumMangle.cpp (original)<br class="gmail_msg">
+++ cfe/trunk/lib/AST/ItaniumMangle.cpp Fri Jan 20 12:50:12 2017<br class="gmail_msg">
@@ -3043,6 +3043,7 @@ void CXXNameMangler::mangleType(const De<br class="gmail_msg">
// ::= Te <name> # dependent elaborated type specifier using<br class="gmail_msg">
// # 'enum'<br class="gmail_msg">
switch (T->getKeyword()) {<br class="gmail_msg">
+ case ETK_None:<br class="gmail_msg">
case ETK_Typename:<br class="gmail_msg">
break;<br class="gmail_msg">
case ETK_Struct:<br class="gmail_msg">
@@ -3056,8 +3057,6 @@ void CXXNameMangler::mangleType(const De<br class="gmail_msg">
case ETK_Enum:<br class="gmail_msg">
Out << "Te";<br class="gmail_msg">
break;<br class="gmail_msg">
- default:<br class="gmail_msg">
- llvm_unreachable("unexpected keyword for dependent type name");<br class="gmail_msg">
}<br class="gmail_msg">
// Typename types are always nested<br class="gmail_msg">
Out << 'N';<br class="gmail_msg">
<br class="gmail_msg">
Modified: cfe/trunk/test/CodeGenCXX/mangle.cpp<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/mangle.cpp?rev=292632&r1=292631&r2=292632&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/mangle.cpp?rev=292632&r1=292631&r2=292632&view=diff</a><br class="gmail_msg">
==============================================================================<br class="gmail_msg">
--- cfe/trunk/test/CodeGenCXX/mangle.cpp (original)<br class="gmail_msg">
+++ cfe/trunk/test/CodeGenCXX/mangle.cpp Fri Jan 20 12:50:12 2017<br class="gmail_msg">
@@ -1125,3 +1125,14 @@ namespace test57 {<br class="gmail_msg">
// CHECK-LABEL: @_ZN6test571fILi0EEEvDTplcldtL_ZNS_1xEE1fIXLi0EEEET_E<br class="gmail_msg">
template void f<0>(int);<br class="gmail_msg">
}<br class="gmail_msg">
+<br class="gmail_msg">
+namespace test58 {<br class="gmail_msg">
+ struct State {<br class="gmail_msg">
+ bool m_fn1();<br class="gmail_msg">
+ } a;<br class="gmail_msg">
+ template <class T> struct identity_ { typedef T type; };<br class="gmail_msg">
+ struct A {<br class="gmail_msg">
+ template <typename T> A(T, bool (identity_<T>::type::*)());<br class="gmail_msg">
+ };<br class="gmail_msg">
+ void fn1() { A(a, &State::m_fn1); }<br class="gmail_msg">
+}<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
cfe-commits mailing list<br class="gmail_msg">
<a href="mailto:cfe-commits@lists.llvm.org" class="gmail_msg" target="_blank">cfe-commits@lists.llvm.org</a><br class="gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br class="gmail_msg">
</blockquote></div>