// RUN: %clang_cc1 -Wdeprecated %s -fsyntax-only -verify
// expected-error@+1{{expected (}}
// expected-error@+1{{expected identifier}}
// expected-error@+1{{no macro named 'foo'}}
// expected-note@+1{{macro marked 'deprecated' here}}
// expected-warning@+1{{macro 'bar' has been marked as deprecated: bar is deprecated use 1}}
// expected-note@+8{{macro marked 'deprecated' here}}
// expected-note@+7{{macro marked 'deprecated' here}}
// expected-note@+6{{macro marked 'deprecated' here}}
// expected-note@+5{{macro marked 'deprecated' here}}
// expected-note@+4{{macro marked 'deprecated' here}}
// expected-note@+3{{macro marked 'deprecated' here}}
// expected-note@+2{{macro marked 'deprecated' here}}
// expected-note@+1{{macro marked 'deprecated' here}}
// expected-error@+1{{expected )}}
// expected-warning@+1{{macro 'foo' has been marked as deprecated}}
// expected-warning@+1{{macro 'foo' has been marked as deprecated}}
// expected-warning@+1{{macro 'foo' has been marked as deprecated}}
// expected-warning@+1{{macro 'foo' has been marked as deprecated}}
int
// not-expected-warning@+1{{macro 'frobble' has been marked as deprecated}}
// not-expected-warning@+1{{macro 'frobble' has been marked as deprecated}}
// not-expected-warning@+1{{macro 'frobble' has been marked as deprecated}}
// Test that we diagnose on #elif.
#elif foo
// expected-warning@-1{{macro 'foo' has been marked as deprecated}}
// Test that we diagnose on #elifdef.
#elifdef foo
// expected-warning@-1{{macro 'foo' has been marked as deprecated}}
// expected-warning@-2{{use of a '#elifdef' directive is a C2x extension}}
// Test that we diagnose on #elifndef.
#elifndef foo
// expected-warning@-2{{macro 'foo' has been marked as deprecated}}
// expected-warning@-3{{use of a '#elifndef' directive is a C2x extension}}
// FIXME: These cases are currently not handled because clang doesn't expand
// conditions on skipped #elif* blocks. See the FIXME notes in
// Preprocessor::SkipExcludedConditionalBlock.
// not-expected-warning@+2{{macro 'foo' has been marked as deprecated}}
// expected-warning@+1{{use of a '#elifndef' directive is a C2x extension}}
#elifndef foo
// not-expected-warning@+2{{macro 'foo' has been marked as deprecated}}
// expected-warning@+1{{use of a '#elifdef' directive is a C2x extension}}
#elifdef foo
// not-expected-warning@+1{{macro 'foo' has been marked as deprecated}}