aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Sema/vector-ast.cpp
blob: c9823719feabe19143802fd3c0b1d99d6328b158 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// RUN: %clang_cc1 %s -verify -ast-dump | FileCheck %s

// expected-no-diagnostics

//      CHECK: ExtVectorType {{.*}} 'int __attribute__((ext_vector_type(4)))' 4
// CHECK-NEXT: BuiltinType {{.*}} 'int'
int x __attribute__((ext_vector_type(4)));
using ExtVecType = decltype(x);

// CHECK: FunctionDecl {{.*}} 'int () __attribute__((ext_vector_type(4)))'
int __attribute__((ext_vector_type(4))) foo() { return x; }
//      CHECK:  CompoundStmt
// CHECK-NEXT: ReturnStmt
// CHECK-NEXT: ImplicitCastExpr {{.*}} 'int __attribute__((ext_vector_type(4)))' <LValueToRValue>
// CHECK-NEXT: DeclRefExpr {{.*}} 'int __attribute__((ext_vector_type(4)))' lvalue Var {{.*}} 'x' 'int __attribute__((ext_vector_type(4)))'