mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 22:16:46 +00:00

This clears up the printing of a NestedNameSpecifier so a trailing '::' is not printed, unless it refers into the global scope. This fixes a bunch of diagnostics where the trailing :: was awkward. This also prints the NNS quoted consistenty. There is a drive-by improvement to error recovery, where now we print the actual type instead of `<dependent type>`. This will clear up further uses of NNS printing in further patches.
8 lines
466 B
C++
8 lines
466 B
C++
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
|
|
// Don't crash (PR25181).
|
|
|
|
template <typename T> class Foo { // expected-note {{template parameter is declared here}}
|
|
template <typename T> // expected-error {{declaration of 'T' shadows template parameter}}
|
|
void Foo<T>::method(T *) const throw() {} // expected-error {{nested name specifier 'Foo<T>' for declaration does not refer into a class, class template or class template partial specialization}}
|
|
};
|