// RUN: %clang_cc1 %s -Eonly -verify
/* expected-warning@+2 {{use of a '#elifdef' directive is a C2x extension}} */
#elifdef BAR
/* expected-error@+5 {{"got it"}} */
/* expected-warning@+2 {{use of a '#elifdef' directive is a C2x extension}} */
#elifdef BAR
/* expected-error@+4 {{"got it"}} */
/* expected-warning@+2 {{use of a '#elifndef' directive is a C2x extension}} */
#elifndef BAR
/* expected-error@+4 {{"got it"}} */
/* expected-warning@+2 {{use of a '#elifndef' directive is a C2x extension}} */
#elifndef BAR
/* expected-error@+4 {{"got it"}} */
/* expected-warning@+2 {{use of a '#elifdef' directive is a C2x extension}} */
#elifdef BAR
/* expected-warning@+2 {{use of a '#elifdef' directive is a C2x extension}} */
#elifdef BAR // test that comments aren't an issue
/* expected-error@+5 {{"got it"}} */
/* expected-warning@+2 {{use of a '#elifdef' directive is a C2x extension}} */
#elifdef BAR // test that comments aren't an issue
/* expected-error@+4 {{"got it"}} */
/* expected-warning@+2 {{use of a '#elifndef' directive is a C2x extension}} */
#elifndef BAR // test that comments aren't an issue
/* expected-error@+4 {{"got it"}} */
/* expected-warning@+2 {{use of a '#elifndef' directive is a C2x extension}} */
#elifndef BAR // test that comments aren't an issue
/* expected-error@+4 {{"got it"}} */
/* expected-warning@+2 {{use of a '#elifdef' directive is a C2x extension}} */
#elifdef BAR // test that comments aren't an issue
/* expected-error@+7 {{"got it"}} */
/* expected-warning@+3 {{use of a '#elifndef' directive is a C2x extension}} */
#elifndef BAR
/* expected-error@+4 {{#elifdef after #else}} */
/* expected-warning@+3 {{use of a '#elifdef' directive is a C2x extension}} */
#elifdef BAR
/* expected-error@+4 {{#elifndef after #else}} */
/* expected-warning@+3 {{use of a '#elifndef' directive is a C2x extension}} */
#elifndef BAR
/* expected-warning@+1 {{use of a '#elifdef' directive is a C2x extension}} */
#elifdef FOO /* expected-error {{#elifdef without #if}} */
/* expected-error {{#endif without #if}} */
/* expected-warning@+1 {{use of a '#elifndef' directive is a C2x extension}} */
#elifndef FOO /* expected-error {{#elifndef without #if}} */
/* expected-error {{#endif without #if}} */
/* Note, we do not expect errors about the missing macro name in the skipped
blocks. This is consistent with #elif behavior. */
/* expected-error@+4 {{"got it"}} */
/* expected-warning@+4 {{use of a '#elifdef' directive is a C2x extension}} */
/* expected-warning@+4 {{use of a '#elifndef' directive is a C2x extension}} */
#elifdef
#elifndef
/* expected-error@+3 {{#elif after #else}}*/
#elif