aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/WasmObjectFile.cpp
diff options
context:
space:
mode:
authorKrystian Stasiowski <sdkrystian@gmail.com>2024-02-02 12:53:34 -0500
committerGitHub <noreply@github.com>2024-02-02 12:53:34 -0500
commit7ecfb66c77ad77dabbb705cbb1f3b17a3d1391a4 (patch)
treedc981fe439e5daf313e0923dab957a8b064985be /llvm/lib/Object/WasmObjectFile.cpp
parent7b08b4360b488b35428c97132b3f9d2a777bd770 (diff)
downloadllvm-7ecfb66c77ad77dabbb705cbb1f3b17a3d1391a4.zip
llvm-7ecfb66c77ad77dabbb705cbb1f3b17a3d1391a4.tar.gz
llvm-7ecfb66c77ad77dabbb705cbb1f3b17a3d1391a4.tar.bz2
[Clang][Sema] Correctly look up primary template for variable template specializations (#80359)
Consider the following: ``` namespace N0 { namespace N1 { template<typename T> int x1 = 0; } using namespace N1; } template<> int N0::x1<int>; ``` According to [dcl.meaning.general] p3.3: > - If the _declarator_ declares an explicit instantiation or a partial or explicit specialization, the _declarator_ does not bind a name. If it declares a class member, the terminal name of the _declarator-id_ is not looked up; otherwise, **only those lookup results that are nominable in `S` are considered when identifying any function template specialization being declared**. In particular, the requirement for lookup results to be nominal in the lookup context of the terminal name of the _declarator-id_ only applies to function template specializations -- not variable template specializations. We currently reject the above declaration, but we do (correctly) accept it if the using-directive is replaced with a `using` declaration naming `N0::N1::x1`. This patch makes it so the above specialization is (correctly) accepted.
Diffstat (limited to 'llvm/lib/Object/WasmObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions