annotate clang/test/Parser/builtin_source_location.c @ 223:5f17cb93ff66 llvm-original

LLVM13 (2021/7/18)
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:43:00 +0900
parents 1d019706d866
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 int main() {
anatofuz
parents:
diff changeset
4 int line = __builtin_LINE();
anatofuz
parents:
diff changeset
5 __builtin_LINE(42); // expected-error {{expected ')'}}
anatofuz
parents:
diff changeset
6 __builtin_LINE(double); // expected-error {{expected ')'}}
anatofuz
parents:
diff changeset
7
anatofuz
parents:
diff changeset
8 int column = __builtin_COLUMN();
anatofuz
parents:
diff changeset
9 __builtin_COLUMN(42); // expected-error {{expected ')'}}
anatofuz
parents:
diff changeset
10 __builtin_COLUMN(double); // expected-error {{expected ')'}}
anatofuz
parents:
diff changeset
11
anatofuz
parents:
diff changeset
12 const char *func = __builtin_FUNCTION();
anatofuz
parents:
diff changeset
13 __builtin_FUNCTION(42); // expected-error {{expected ')'}}
anatofuz
parents:
diff changeset
14 __builtin_FUNCTION(double); // expected-error {{expected ')'}}
anatofuz
parents:
diff changeset
15
anatofuz
parents:
diff changeset
16 const char *file = __builtin_FILE();
anatofuz
parents:
diff changeset
17 __builtin_FILE(42); // expected-error {{expected ')'}}
anatofuz
parents:
diff changeset
18 __builtin_FILE(double); // expected-error {{expected ')'}}
anatofuz
parents:
diff changeset
19 }