]> granicus.if.org Git - clang/commit
AST: Fix the linkage of static vars in fn template specializations
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 16 Dec 2014 04:52:14 +0000 (04:52 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 16 Dec 2014 04:52:14 +0000 (04:52 +0000)
commit0419e401d392d3664259a3ad1c25e2fb64abcb15
treefc943d1bd3e3b61e5647f9bde2e787e667f5c755
parent7e5d25d7aa07c3df3ebf83dfeb8d44b96cecaedd
AST: Fix the linkage of static vars in fn template specializations

We that static variables in function template specializations were
externally visible.  The manglers assumed that externally visible static
variables were numbered in Sema.  We would end up mangling static
variables in the same specialization with the same mangling number which
would give all of them the same name.

This fixes PR21904.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224316 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/Decl.cpp
test/CodeGenCXX/function-template-specialization.cpp