================ @@ -0,0 +1,19 @@ +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s + +// expected-error@+1{{'clang::sycl_external' attribute only applies to functions}} +[[clang::sycl_external]] int a; + + +// expected-error@+2{{'clang::sycl_external' attribute only applies to functions}} +struct s { +[[clang::sycl_external]] int b; +}; + +// expected-error@+1{{'clang::sycl_external' attribute takes no arguments}} +[[clang::sycl_external(3)]] void bar() {} + +// FIXME: The first declaration of a function is required to have the attribute. +// The attribute may be optionally present on subsequent declarations +int foo(int c); + +[[clang::sycl_external]] void foo(); ---------------- schittir wrote:
Thank you for your observations. This was a mistake - I planned to move these tests to the appropriate places like you suggested, but clearly, I overlooked it. https://github.com/llvm/llvm-project/pull/140282 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits