diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-12-08 05:40:03 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-12-08 05:40:03 +0000 |
commit | 6bc20135a2c46f97da15994095616a305be35c6a (patch) | |
tree | 39dba06bea1e9f55e5d7786b926a1f7e9fc2e120 /test/CodeGenCXX/function-template-explicit-specialization.cpp | |
parent | 77f41659186b1f731ce6e82eb904330a21ddf639 (diff) |
Fix for PR5710: make sure to put function template specializations into the
DeclContext, so they don't completely disappear from the AST.
I don't particularly like this fix, but I don't see any obviously better way
to deal with it, and I think it's pretty clearly an improvement; comments
welcome.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90835 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/function-template-explicit-specialization.cpp')
-rw-r--r-- | test/CodeGenCXX/function-template-explicit-specialization.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGenCXX/function-template-explicit-specialization.cpp b/test/CodeGenCXX/function-template-explicit-specialization.cpp new file mode 100644 index 0000000000..046bc325a5 --- /dev/null +++ b/test/CodeGenCXX/function-template-explicit-specialization.cpp @@ -0,0 +1,13 @@ +// RUN: clang-cc -emit-llvm %s -o - | FileCheck %s + +template<typename T> void a(T); +template<> void a(int) {} + +// CHECK: define void @_Z1aIiEvT_ + +namespace X { +template<typename T> void b(T); +template<> void b(int) {} +} + +// CHECK: define void @_ZN1X1bIiEEvT_ |