]> granicus.if.org Git - clang/commit
If we see an explicit instantiation declaration or definition of a function
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 24 Apr 2014 22:45:46 +0000 (22:45 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 24 Apr 2014 22:45:46 +0000 (22:45 +0000)
commit0ba2e26a594f6a420b6daf7e371b8c1579968f52
tree4c895e95909b6b1fef9adb21416ef615519d7670
parent57218ee935e495ef17164e7f6580777e1a376430
If we see an explicit instantiation declaration or definition of a function
after we've already instantiated a definition for the function, pass it to the
ASTConsumer again so that it knows the specialization kind has changed and can
update the function's linkage.

This only matters if we instantiate the definition of the function before we
reach the end of the TU; this can happen in at least three different ways:
C++11 constexpr functions, C++14 deduced return types, and functions
instantiated within modules.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207152 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaTemplate.cpp
lib/Sema/SemaTemplateInstantiate.cpp
test/CodeGenCXX/explicit-instantiation.cpp
test/Modules/Inputs/templates-left.h
test/Modules/Inputs/templates-top.h
test/Modules/templates.mm