llvm-for-llvmta/tools/clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p1.cpp

7 lines
317 B
C++
Raw Normal View History

2022-04-25 13:02:35 +02:00
// RUN: %clang_cc1 -std=c++11 -verify %s
typedef int A alignas(4); // expected-error {{'alignas' attribute only applies to variables, data members and tag types}}
template<int N> void f() {
typedef int B alignas(N); // expected-error {{'alignas' attribute only applies to variables, data members and tag types}}
}