xref: /aosp_15_r20/external/clang/test/Parser/empty-translation-unit.c (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -fsyntax-only -std=c99 -pedantic -W -verify %s
2*67e74705SXin Li // RUN: %clang_cc1 -fsyntax-only -x c++ -std=c++03 -pedantic-errors -W %s
3*67e74705SXin Li 
4*67e74705SXin Li #include "completely-empty-header-file.h"
5*67e74705SXin Li // no-warning -- an empty file is OK
6*67e74705SXin Li 
7*67e74705SXin Li #define A_MACRO_IS_NOT_GOOD_ENOUGH 1
8*67e74705SXin Li 
9*67e74705SXin Li // In C we should get this warning, but in C++ we shouldn't.
10*67e74705SXin Li // expected-warning{{ISO C requires a translation unit to contain at least one declaration}}
11