summaryrefslogtreecommitdiffstats
path: root/test/Tooling/clang-check-ast-dump.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-08-16 02:43:29 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-08-16 02:43:29 +0000
commit0dae729a69c4fccc38c97d5dd44f7b20bb20de1c (patch)
tree59d219e04c685b1ce878d38b8830bf3a7828926f /test/Tooling/clang-check-ast-dump.cpp
parentd01258641a0695ed9112d18b0f79632579c1bbca (diff)
Don't constant-fold when pretty-printing alignment attribute. This fixes a
potential crasher -- Context is sometimes a null reference (!!) here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162007 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Tooling/clang-check-ast-dump.cpp')
-rw-r--r--test/Tooling/clang-check-ast-dump.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Tooling/clang-check-ast-dump.cpp b/test/Tooling/clang-check-ast-dump.cpp
index 86533af3e1..53a4c2b418 100644
--- a/test/Tooling/clang-check-ast-dump.cpp
+++ b/test/Tooling/clang-check-ast-dump.cpp
@@ -22,6 +22,10 @@
// CHECK-LIST-NEXT: test_namespace::TheClass
// CHECK-LIST-NEXT: test_namespace::TheClass::theMethod
// CHECK-LIST-NEXT: x
+//
+// RUN: clang-check -ast-dump -ast-dump-filter test_namespace::TheClass::n "%s" -- 2>&1 | FileCheck -check-prefix CHECK-ATTR %s
+// CHECK-ATTR: test_namespace
+// CHECK-ATTR-NEXT: int n __attribute__((aligned(1 + 1
namespace test_namespace {
@@ -30,6 +34,7 @@ public:
int theMethod(int x) {
return x + x;
}
+ int n __attribute__((aligned(1+1)));
};
}