[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Parser / builtin_source_location.c
blob02778bd86697cdde0c20203c7dd08aeb847c8681
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 int main(void) {
4 int line = __builtin_LINE();
5 __builtin_LINE(42); // expected-error {{expected ')'}}
6 __builtin_LINE(double); // expected-error {{expected ')'}}
8 int column = __builtin_COLUMN();
9 __builtin_COLUMN(42); // expected-error {{expected ')'}}
10 __builtin_COLUMN(double); // expected-error {{expected ')'}}
12 const char *func = __builtin_FUNCTION();
13 __builtin_FUNCTION(42); // expected-error {{expected ')'}}
14 __builtin_FUNCTION(double); // expected-error {{expected ')'}}
16 const char *file = __builtin_FILE();
17 __builtin_FILE(42); // expected-error {{expected ')'}}
18 __builtin_FILE(double); // expected-error {{expected ')'}}