// RUN: %clang_cc1 %s -std=c++17 -fsyntax-only -fcxx-exceptions -verify
;
;
;
static_assert;
static_assert;
static_assert;
// Cannot overload on types that only differ by `annotate_type` attribute.
void // expected-note {{previous definition is here}}
void // expected-error {{redefinition of 'f'}}
// Cannot specialize on types that only differ by `annotate_type` attribute.
;
; // expected-note {{previous definition is here}}
; // expected-error {{redefinition of 'S2<int>'}}
// Test that the attribute supports parameter pack expansion.
void
int
// Make sure we correctly diagnose wrong number of arguments for
// [[clang::annotate_type]] inside a template argument.
void ;
void
// More error cases: Prohibit adding the attribute to declarations.
// Different declarations hit different code paths, so they need separate tests.
// expected-error {{'annotate_type' attribute cannot be applied to a declaration}}
; // expected-error {{'annotate_type' attribute cannot be applied to a declaration}}
;
void
T var_template; // expected-error {{'annotate_type' attribute cannot be applied to a declaration}}
extern "C" int ; // expected-error {{an attribute list cannot appear here}}
extern "C" int ; // expected-error {{'annotate_type' attribute cannot be applied to a declaration}}