// RUN: %clang_cc1 -Wfinal-macro %s -fsyntax-only -isystem %S/Inputs -verify
// Test warning production
// expected-note@+1 4{{macro marked 'final' here}}
// expected-warning@+2{{macro 'Foo' has been marked as final and should not be redefined}}
// expected-note@+1{{previous definition is here}}
// expected-warning@+2{{macro 'Foo' has been marked as final and should not be redefined}}
// expected-warning@+1{{'Foo' macro redefined}}
// expected-warning@+1{{redefining builtin macro}}
// expected-warning@+1{{undefining builtin macro}}
// expected-warning@+1{{macro 'Foo' has been marked as final and should not be undefined}}
// expected-warning@+1{{macro 'Foo' has been marked as final and should not be redefined}}
// Test parse errors
// expected-error@+1{{expected (}}
// expected-error@+1{{expected )}}
// expected-error@+1{{no macro named 'Baz'}}
// expected-error@+1{{expected identifier}}
// expected-error@+1{{expected (}}
// no diagnostics triggered by these pragmas.
// expected-note@+1 2{{macro marked 'final' here}}