@@ -0,0 +1,164 @@
+// RUN: %clang_cc1 -fsyntax-only -verify=expected,c-local -x c %s
+// RUN: %clang_cc1 -fsyntax-only -verify=expected,cpp-local -pedantic -x c++
-std=c++11 %s
+
+void foo() {
+ int i;
+ int a[10], b[10];
+
+ [[clang::code_align(8)]]
+ for (i = 0; i < 10;
@@ -322,6 +322,81 @@ static Attr *handleUnlikely(Sema , Stmt *St, const
ParsedAttr ,
return ::new (S.Context) UnlikelyAttr(S.Context, A);
}
+CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo ,
+Expr *E) {
+ if
@@ -322,6 +322,77 @@ static Attr *handleUnlikely(Sema , Stmt *St, const
ParsedAttr ,
return ::new (S.Context) UnlikelyAttr(S.Context, A);
}
+CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo ,
+Expr *E) {
+ if
@@ -322,6 +322,77 @@ static Attr *handleUnlikely(Sema , Stmt *St, const
ParsedAttr ,
return ::new (S.Context) UnlikelyAttr(S.Context, A);
}
+CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo ,
+Expr *E) {
+ if
@@ -322,6 +322,73 @@ static Attr *handleUnlikely(Sema , Stmt *St, const
ParsedAttr ,
return ::new (S.Context) UnlikelyAttr(S.Context, A);
}
+CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo ,
+Expr *E) {
+ if
@@ -0,0 +1,126 @@
+// RUN: %clang_cc1 -fsyntax-only -verify=expected,c-local -x c %s
+// RUN: %clang_cc1 -fsyntax-only -verify=expected,cpp-local -pedantic -x c++
-std=c++11 %s
+
+void foo() {
+ int i;
+ int a[10], b[10];
+
+ [[clang::code_align(8)]]
+ for (i = 0; i < 10;