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
diff --git a/test/SemaCXX/prefetch-enum.cpp b/test/SemaCXX/prefetch-enum.cpp
new file mode 100644
index 0000000..829321f
--- /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);
+}