https://bugs.llvm.org/show_bug.cgi?id=47316

            Bug ID: 47316
           Summary: 'error: parameter declarator cannot be qualified' on
                    seemingly valid code
           Product: clang
           Version: 10.0
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++14
          Assignee: unassignedclangb...@nondot.org
          Reporter: sly...@inbox.ru
                CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
                    llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk

Original bug is observed on https://bugs.gentoo.org/739036 where
source-highlight was buildable by g++-10 and failed b clang++-10.

Reduced example:

  namespace a {

  enum c { d };
  class e {
  public:
    e(c);
  };

  }; // namespace a
  a::e f(a::e(a::d));

gcc succeeds to build the example, clang fails:

$ g++-10.2.0 -std=c++14 -c -o test_exception_main.o bug.cpp && echo OK || echo
FAIL
OK
$ clang++-10 -std=c++14 -c -o test_exception_main.o bug.cpp  && echo OK || echo
FAIL
bug.cpp:10:16: error: parameter declarator cannot be qualified
a::e f(a::e(a::d));
            ~~~^
1 error generated.
FAIL

gcc bug, clang bug or known ambiguity? Looks like clang does not see a::d as an
enum value.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to