summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/mangle-exprs.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2015-05-21 18:28:18 +0000
committerDouglas Gregor <dgregor@apple.com>2015-05-21 18:28:18 +0000
commit3c523c4a3708988c7faf5d0782a3704f85252aa4 (patch)
treebbab201babaf22bc947a5784b0bc8c4739e3c148 /clang/test/CodeGenCXX/mangle-exprs.cpp
parent47fc26f9feeeb345c1c42330c8731b3b834897a5 (diff)
downloadbcm5719-llvm-3c523c4a3708988c7faf5d0782a3704f85252aa4.tar.gz
bcm5719-llvm-3c523c4a3708988c7faf5d0782a3704f85252aa4.zip
Itanium mangler: don't trip an assertion when unresolved members have implicit bases.
When we find a member of the current instantation, the base of the unresolved member expression is implicit; use nullptr for such bases. This is not a change in behavior: the AST already contains null in such cases, so non-asserts builds do the right thing already. Fixes rdar://problem/21020559. llvm-svn: 237929
Diffstat (limited to 'clang/test/CodeGenCXX/mangle-exprs.cpp')
-rw-r--r--clang/test/CodeGenCXX/mangle-exprs.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/mangle-exprs.cpp b/clang/test/CodeGenCXX/mangle-exprs.cpp
index ee2d546938e..ee7594b2fdd 100644
--- a/clang/test/CodeGenCXX/mangle-exprs.cpp
+++ b/clang/test/CodeGenCXX/mangle-exprs.cpp
@@ -329,3 +329,15 @@ namespace test7 {
fF2(1); // CHECK-LABEL: define {{.*}} @_ZN5test73fF2IiEEDTcmcvNS_1FEilLi1ELi2EEcvT__EES2_
}
}
+
+
+namespace test8 {
+ template <class>
+ struct X {
+ template<typename T> T foo() const { return 0; }
+ template <class T> auto bar() const -> decltype(foo<T>()) { return 0; }
+ };
+
+ // CHECK-LABEL: define weak_odr i32 @_ZNK5test81XIiE3barIiEEDTcl3fooIT_EEEv
+ template int X<int>::bar<int>() const;
+}
OpenPOWER on IntegriCloud