1 // RUN: %clang_cc1 -fsyntax-only -verify %s
6 // Redeclarations are okay in a namespace.
9 void foo(Opaque0
); // expected-note 2 {{candidate function}}
16 foo(Opaque1()); // expected-error {{no matching function for call}}
24 foo(Opaque1()); // expected-error {{no matching function for call}}
36 // Make sure we handle transparent contexts the same way.
39 void foo(Opaque0
); // expected-note 2 {{candidate function}}
47 foo(Opaque1()); // expected-error {{no matching function for call}}
55 foo(Opaque1()); // expected-error {{no matching function for call}}
67 // Make sure we detect invalid redeclarations that can't be detected
68 // until template instantiation.
70 template <class T
> struct Base
{
75 template <class T
> struct Derived
: Base
<T
> {
76 // These are invalid redeclarations, detectable only after
78 using Base
<T
>::foo
; // expected-note {{previous using decl}}
79 using Base
<T
>::type::foo
; //expected-error {{redeclaration of using decl}}
82 template struct Derived
<int>; // expected-note {{in instantiation of template class}}
85 // Redeclarations are okay in a function.