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)
commit9963adeaefaf0dca48b8c207a3ed7098528f338c
treebd0cbced341e0970c7f18f4ae5ff0eba696e8aa9
parent731089bbce16d5d40e0c89c24cbc9923623240c9
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.

llvm-svn: 224316
clang/lib/AST/Decl.cpp
clang/test/CodeGenCXX/function-template-specialization.cpp