1 // RUN: %clang_cc1 -std=c++20 -fsyntax-only %s -pedantic -verify
3 #define UIE __attribute__((using_if_exists))
9 using NS::x
__attribute__((using_if_exists
));
11 using NS::x
[[clang::using_if_exists
]]; // expected-warning{{ISO C++ does not allow an attribute list to appear here}}
13 [[clang::using_if_exists
]] // expected-warning{{ISO C++ does not allow an attribute list to appear here}}
17 using NS::not_there3
, // expected-error {{no member named 'not_there3' in namespace 'NS'}}
18 NS::not_there4
[[clang::using_if_exists
]]; // expected-warning{{C++ does not allow an attribute list to appear here}}
20 [[clang::using_if_exists
]] using NS::not_there5
[[clang::using_if_exists
]]; // expected-warning 2 {{ISO C++ does not allow}}
23 struct Derived
: Base
{
24 [[clang::using_if_exists
]] using Base::x
; // expected-warning {{ISO C++ does not allow an attribute list to appear here}}
25 using Base::y
[[clang::using_if_exists
]]; // expected-warning {{ISO C++ does not allow an attribute list to appear here}}
26 [[clang::using_if_exists
]] using Base::z
, Base::q
; // expected-warning {{C++ does not allow an attribute list to appear here}}