mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-25 06:18:56 -04:00

For 'x::template y', consistently give a "no member named 'y' in 'x'" diagnostic if there is no such member, and give a 'template keyword not followed by a template' name error if there is such a member but it's not a template. In the latter case, add a note pointing at the non-template. Don't suggest inserting a 'template' keyword in 'X::Y<' if X is dependent if the lookup of X::Y was actually not a dependent lookup and found only non-templates. llvm-svn: 332076
13 lines
456 B
C++
13 lines
456 B
C++
// RUN: %clang_cc1 %s -verify -fsyntax-only
|
|
// PR4809
|
|
// This test is primarily checking that this doesn't crash, not the particular
|
|
// diagnostics.
|
|
|
|
const template basic_istream<char>; // expected-error {{expected unqualified-id}}
|
|
|
|
namespace S {}
|
|
template <class X> class Y {
|
|
void x() { S::template y<char>(1); } // expected-error {{no member named 'y' in namespace 'S'}} \
|
|
// expected-error {{unqualified-id}}
|
|
};
|