annotate clang/test/Sema/attr-min-vector-width.c @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children 2e18cbf3894f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -verify %s
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 int i;
anatofuz
parents:
diff changeset
4 void f(void) __attribute__((__min_vector_width__(i))); /* expected-error {{'__min_vector_width__' attribute requires an integer constant}} */
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6 void f2(void) __attribute__((__min_vector_width__(128)));
anatofuz
parents:
diff changeset
7
anatofuz
parents:
diff changeset
8 void f3(void) __attribute__((__min_vector_width__(128), __min_vector_width__(256))); /* expected-warning {{attribute '__min_vector_width__' is already applied with different parameters}} */
anatofuz
parents:
diff changeset
9
anatofuz
parents:
diff changeset
10 void f4(void) __attribute__((__min_vector_width__())); /* expected-error {{'__min_vector_width__' attribute takes one argument}} */
anatofuz
parents:
diff changeset
11
anatofuz
parents:
diff changeset
12 void f5(void) __attribute__((__min_vector_width__(128, 256))); /* expected-error {{'__min_vector_width__' attribute takes one argument}} */
anatofuz
parents:
diff changeset
13
anatofuz
parents:
diff changeset
14 void f6(void) {
anatofuz
parents:
diff changeset
15 int x __attribute__((__min_vector_width__(128))) = 0; /* expected-error {{'__min_vector_width__' attribute only applies to functions}} */
anatofuz
parents:
diff changeset
16 }