aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/prefetch-enum.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-12-04 00:30:06 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-12-04 00:30:06 +0000
commit9aef7263d84d9224575e113878cfbb06b8343cbf (patch)
tree938804879de0f6f088ab1b24be6965fa5d3a6077 /test/SemaCXX/prefetch-enum.cpp
parentb48ad64a0e9e8d6488adebe597b6af32c1eb84f4 (diff)
Fix for PR5679: make __builtin_prefetch a bit more flexible in what it accepts
as a constant integer. Also, some minor cleanup and improvements to the diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90504 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/prefetch-enum.cpp')
-rw-r--r--test/SemaCXX/prefetch-enum.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/SemaCXX/prefetch-enum.cpp b/test/SemaCXX/prefetch-enum.cpp
new file mode 100644
index 0000000000..829321fb0e
--- /dev/null
+++ b/test/SemaCXX/prefetch-enum.cpp
@@ -0,0 +1,9 @@
+// RUN: clang-cc -fsyntax-only %s -verify
+// PR5679
+
+enum X { A = 3 };
+
+void Test() {
+ char ch;
+ __builtin_prefetch(&ch, 0, A);
+}