diff options
| author | Eli Friedman <eli.friedman@gmail.com> | 2012-09-26 02:36:12 +0000 |
|---|---|---|
| committer | Eli Friedman <eli.friedman@gmail.com> | 2012-09-26 02:36:12 +0000 |
| commit | b826a00857718ff0a51336213a21cab02bd6fdf8 (patch) | |
| tree | c7010a3358bffd0a53506aa681956c5f0e27a934 /clang/test | |
| parent | 6e0605d6540da56bf778a4fb2598764cf004723a (diff) | |
| download | bcm5719-llvm-b826a00857718ff0a51336213a21cab02bd6fdf8.tar.gz bcm5719-llvm-b826a00857718ff0a51336213a21cab02bd6fdf8.zip | |
Fix the AST representation for non-type template arguments to encode
enough information so we can mangle them correctly in cases involving
dependent parameter types. (This specifically impacts cases involving
null pointers and cases involving parameters of reference type.)
Fix the mangler to use this information instead of trying to scavenge
it out of the parameter declaration.
<rdar://problem/12296776>.
llvm-svn: 164656
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CodeGenCXX/mangle-nullptr-arg.cpp | 3 | ||||
| -rw-r--r-- | clang/test/CodeGenCXX/mangle-template.cpp | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/clang/test/CodeGenCXX/mangle-nullptr-arg.cpp b/clang/test/CodeGenCXX/mangle-nullptr-arg.cpp index 393de0b0ece..07bf52fc906 100644 --- a/clang/test/CodeGenCXX/mangle-nullptr-arg.cpp +++ b/clang/test/CodeGenCXX/mangle-nullptr-arg.cpp @@ -11,3 +11,6 @@ template<int X::*pm> struct PM {}; // CHECK: define void @_Z5test22PMILM1Xi0EE void test2(PM<nullptr>) { } +// CHECK: define void @_Z5test316DependentTypePtrIPiLS0_0EE +template<typename T, T x> struct DependentTypePtr {}; +void test3(DependentTypePtr<int*,nullptr>) { } diff --git a/clang/test/CodeGenCXX/mangle-template.cpp b/clang/test/CodeGenCXX/mangle-template.cpp index 488f6f3bb1d..15a85c7bd2e 100644 --- a/clang/test/CodeGenCXX/mangle-template.cpp +++ b/clang/test/CodeGenCXX/mangle-template.cpp @@ -162,11 +162,11 @@ namespace test12 { void use() { // CHECK: define internal void @_ZN6test124testIFivEXadL_ZNS_L1fEvEEEEvv( test<int(), &f>(); - // CHECK: define internal void @_ZN6test124testIRFivEXadL_ZNS_L1fEvEEEEvv( + // CHECK: define internal void @_ZN6test124testIRFivELZNS_L1fEvEEEvv( test<int(&)(), f>(); // CHECK: define internal void @_ZN6test124testIPKiXadL_ZNS_L1nEEEEEvv( test<const int*, &n>(); - // CHECK: define internal void @_ZN6test124testIRKiXadL_ZNS_L1nEEEEEvv( + // CHECK: define internal void @_ZN6test124testIRKiLZNS_L1nEEEEvv( test<const int&, n>(); } } |

