aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/PR5086-ambig-resolution-enum.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/PR5086-ambig-resolution-enum.cpp')
-rw-r--r--test/SemaCXX/PR5086-ambig-resolution-enum.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/SemaCXX/PR5086-ambig-resolution-enum.cpp b/test/SemaCXX/PR5086-ambig-resolution-enum.cpp
new file mode 100644
index 000000000000..838bc6f3c716
--- /dev/null
+++ b/test/SemaCXX/PR5086-ambig-resolution-enum.cpp
@@ -0,0 +1,13 @@
+// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x
+
+class C {
+public:
+ enum E { e1=0 };
+ const char * fun1(int , enum E) const;
+ int fun1(unsigned, const char *) const;
+};
+
+void foo(const C& rc) {
+ enum {BUFLEN = 128 };
+ const char *p = rc.fun1(BUFLEN - 2, C::e1);
+}