xref: /minix3/external/bsd/llvm/dist/clang/test/SemaCXX/PR5086-ambig-resolution-enum.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
2*f4a2713aSLionel Sambuc // expected-no-diagnostics
3*f4a2713aSLionel Sambuc 
4*f4a2713aSLionel Sambuc class C {
5*f4a2713aSLionel Sambuc public:
6*f4a2713aSLionel Sambuc         enum E { e1=0 };
7*f4a2713aSLionel Sambuc         const char * fun1(int , enum E) const;
8*f4a2713aSLionel Sambuc         int fun1(unsigned, const char *) const;
9*f4a2713aSLionel Sambuc };
10*f4a2713aSLionel Sambuc 
foo(const C & rc)11*f4a2713aSLionel Sambuc void foo(const C& rc) {
12*f4a2713aSLionel Sambuc         enum {BUFLEN = 128 };
13*f4a2713aSLionel Sambuc         const char *p = rc.fun1(BUFLEN - 2, C::e1);
14*f4a2713aSLionel Sambuc }
15