summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorMichael Han <fragmentshaders@gmail.com>2013-02-01 01:19:17 +0000
committerMichael Han <fragmentshaders@gmail.com>2013-02-01 01:19:17 +0000
commitaf02bbe84f653125d50bfded5f854baf48c307f9 (patch)
treeb39061a7071ee992e3ce68b7f0ce9945833d2519 /clang/test
parentc79cdff1959fb3e54ad3d24c18ecfb9f5b4b1c76 (diff)
downloadbcm5719-llvm-af02bbe84f653125d50bfded5f854baf48c307f9.tar.gz
bcm5719-llvm-af02bbe84f653125d50bfded5f854baf48c307f9.zip
[Sema][Attr]Fix alignment attribute printing.
Remove "IsMSDeclspec" argument from Align attribute since the arguments in Attr.td should only model those appear in source code. Introduce attribute Accessor, and teach TableGen to generate syntax kind accessors for Align attribute, and use those accessors to decide if an alignment attribute is a declspec attribute. llvm-svn: 174133
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Sema/attr-print.c7
-rw-r--r--clang/test/SemaCXX/attr-print.cpp6
-rw-r--r--clang/test/SemaCXX/cxx11-attr-print.cpp13
3 files changed, 10 insertions, 16 deletions
diff --git a/clang/test/Sema/attr-print.c b/clang/test/Sema/attr-print.c
index b523c18cab8..2659508e562 100644
--- a/clang/test/Sema/attr-print.c
+++ b/clang/test/Sema/attr-print.c
@@ -1,13 +1,10 @@
// RUN: %clang_cc1 %s -ast-print -fms-extensions | FileCheck %s
-// FIXME: we need to fix the "BoolArgument<"IsMSDeclSpec">"
-// hack in Attr.td for attribute "Aligned".
-
-// CHECK: int x __attribute__((aligned(4, 0)));
+// CHECK: int x __attribute__((aligned(4)));
int x __attribute__((aligned(4)));
// FIXME: Print this at a valid location for a __declspec attr.
-// CHECK: int y __declspec(align(4, 1));
+// CHECK: int y __declspec(align(4));
__declspec(align(4)) int y;
// CHECK: void foo() __attribute__((const));
diff --git a/clang/test/SemaCXX/attr-print.cpp b/clang/test/SemaCXX/attr-print.cpp
index c7335c5e3bf..2e7478904f1 100644
--- a/clang/test/SemaCXX/attr-print.cpp
+++ b/clang/test/SemaCXX/attr-print.cpp
@@ -1,12 +1,10 @@
// RUN: %clang_cc1 %s -ast-print -fms-extensions | FileCheck %s
-// FIXME: align attribute print
-
-// CHECK: int x __attribute__((aligned(4, 0)));
+// CHECK: int x __attribute__((aligned(4)));
int x __attribute__((aligned(4)));
// FIXME: Print this at a valid location for a __declspec attr.
-// CHECK: int y __declspec(align(4, 1));
+// CHECK: int y __declspec(align(4));
__declspec(align(4)) int y;
// CHECK: void foo() __attribute__((const));
diff --git a/clang/test/SemaCXX/cxx11-attr-print.cpp b/clang/test/SemaCXX/cxx11-attr-print.cpp
index b4f5859409b..336e7b3f767 100644
--- a/clang/test/SemaCXX/cxx11-attr-print.cpp
+++ b/clang/test/SemaCXX/cxx11-attr-print.cpp
@@ -1,14 +1,13 @@
// RUN: %clang_cc1 -std=c++11 -ast-print -fms-extensions %s | FileCheck %s
-// FIXME: align attribute print
-
-// CHECK: int x __attribute__((aligned(4, 0)));
+//
+// CHECK: int x __attribute__((aligned(4)));
int x __attribute__((aligned(4)));
// FIXME: Print this at a valid location for a __declspec attr.
-// CHECK: int y __declspec(align(4, 1));
+// CHECK: int y __declspec(align(4));
__declspec(align(4)) int y;
-// CHECK: gnu::aligned(4, 0)]];
+// CHECK: gnu::aligned(4)]];
int z [[gnu::aligned(4)]];
// CHECK: __attribute__((deprecated("warning")));
@@ -17,10 +16,10 @@ int a __attribute__((deprecated("warning")));
// CHECK: gnu::deprecated("warning")]];
int b [[gnu::deprecated("warning")]];
-// CHECK: int cxx11_alignas alignas(4, 0);
+// CHECK: int cxx11_alignas alignas(4);
alignas(4) int cxx11_alignas;
-// CHECK: int c11_alignas _Alignas(alignof(int), 0);
+// CHECK: int c11_alignas _Alignas(alignof(int));
_Alignas(int) int c11_alignas;
// CHECK: void foo() __attribute__((const));
OpenPOWER on IntegriCloud