aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorKrystian Stasiowski <sdkrystian@gmail.com>2024-02-20 13:25:12 -0500
committerGitHub <noreply@github.com>2024-02-20 13:25:12 -0500
commitfb615cf3b9c2d887441a4c0cca326eddc592351a (patch)
treeb779a4f9feedd0796c9c66e5bbb0455545958be1 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parentc625b996527335c4fd6b6aa246655a993487e846 (diff)
downloadllvm-fb615cf3b9c2d887441a4c0cca326eddc592351a.zip
llvm-fb615cf3b9c2d887441a4c0cca326eddc592351a.tar.gz
llvm-fb615cf3b9c2d887441a4c0cca326eddc592351a.tar.bz2
[Clang][Sema] Diagnose declarative nested-name-specifiers naming alias templates (#80842)
According to [expr.prim.id.qual] p3: > The _nested-name-specifier_ `​::` nominates the global namespace. A _nested-name-specifier_ with a _computed-type-specifier_ nominates the type denoted by the _computed-type-specifier_, which shall be a class or enumeration type. **If a _nested-name-specifier_ `N` is declarative and has a _simple-template-id_ with a template argument list `A` that involves a template parameter, let `T` be the template nominated by `N` without `A`. `T` shall be a class template.** Meaning, the out-of-line definition of `A::f` in the following example is ill-formed: ``` template<typename T> struct A { void f(); }; template<typename T> using B = A<T>; template<typename T> void B<T>::f() { } // error: a declarative nested name specifier cannot name an alias template ``` This patch diagnoses such cases as an extension (in group `alias-template-in-declaration-name`).
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions