[llvm-bugs] [Bug 44531] New: clang-cl unqualified friend declaration
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Jan 12 17:16:53 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=44531
Bug ID: 44531
Summary: clang-cl unqualified friend declaration
Product: clang
Version: 9.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Driver
Assignee: unassignedclangbugs at nondot.org
Reporter: tiagomacarios at gmail.com
CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
richard-llvm at metafoo.co.uk
The code below warns on windows but compiles fine on linux.
https://godbolt.org/z/20iVGc
> type a.cpp
class S;
namespace N
{
class SS
{
friend class S;
};
}
>clang -c -std=c++17 -Weverything -v a.cpp
clang version 9.0.0 (tags/RELEASE_900/final)
Target: x86_64-pc-windows-msvc
...
a.cpp:7:22: warning: unqualified friend declaration referring to type outside
of the nearest enclosing namespace is a Microsoft extension;
add a nested name specifier [-Wmicrosoft-unqualified-friend]
friend class S;
^
::
1 warning generated.
--
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/20200113/11fed569/attachment.html>
More information about the llvm-bugs
mailing list