summaryrefslogtreecommitdiff
path: root/clang/test/SemaCXX/PR5086-ambig-resolution-enum.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/PR5086-ambig-resolution-enum.cpp')
-rw-r--r--clang/test/SemaCXX/PR5086-ambig-resolution-enum.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/PR5086-ambig-resolution-enum.cpp b/clang/test/SemaCXX/PR5086-ambig-resolution-enum.cpp
new file mode 100644
index 0000000..b5aac5f
--- /dev/null
+++ b/clang/test/SemaCXX/PR5086-ambig-resolution-enum.cpp
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
+
+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);
+}