16 lines · plain
1// Verify that we can parse a simple CUDA file with different attributes order.2// RUN: %clang_cc1 "-triple" "nvptx-nvidia-cuda" -fsyntax-only -verify %s3// expected-no-diagnostics4#include "Inputs/cuda.h"5 6struct alignas(16) float4 {7 float x, y, z, w;8};9 10__attribute__((device)) float func() {11 __shared__ alignas(alignof(float4)) float As[4][4]; // Both combinations12 alignas(alignof(float4)) __shared__ float Bs[4][4]; // must be legal13 14 return As[0][0] + Bs[0][0];15}16