[llvm-bugs] [Bug 46198] New: Spurious extra qualification warning for redeclaration of inline namespace member
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jun 4 07:32:54 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=46198
Bug ID: 46198
Summary: Spurious extra qualification warning for redeclaration
of inline namespace member
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: hstong at ca.ibm.com
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
Given the source below, Clang produces a warning by default about the use of
`A::` as part of the //declarator-id// of a declaration within the namespace
`A`. The warning about "extra qualification" is unwarranted because removing
the qualification causes the redeclaration of an inline namespace member to
stop being a redeclaration of the said member.
### SOURCE (<stdin>):
namespace A {
inline
namespace Q {
void f();
}
void A::f() { }
}
### COMPILER INVOCATION:
clang -cc1 -fsyntax-only -xc++ -
### ACTUAL OUTPUT:
<stdin>:6:11: warning: extra qualification on member 'f'
[-Wextra-qualification]
void A::f() { }
^
1 warning generated.
### EXPECTED OUTPUT:
(no warning)
### COMPILER VERSION INFO (clang++ -v):
clang version 11.0.0 (https://github.com/llvm/llvm-project.git
2d2a603d663328e25774982947e3a8a65e098678)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/wandbox/clang-head/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.5.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200604/fc81ef2f/attachment.html>
More information about the llvm-bugs
mailing list