[llvm-bugs] [Bug 47369] New: No compiler error when having an invalid definition in friend declaration
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Aug 31 10:41:13 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=47369
Bug ID: 47369
Summary: No compiler error when having an invalid definition in
friend declaration
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++17
Assignee: unassignedclangbugs at nondot.org
Reporter: anders.granlund.0 at gmail.com
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
Program (main.cpp):
template<typename T>
void f()
{
}
class C
{
friend void f<int>()
{
}
};
int main()
{
}
Compilation command line:
clang++ -std=c++17 -pedantic-errors main.cpp
Observed behaviour:
No compilation errors.
Expected behaviour:
Compilation error about the definition in the friend declaration being
invalid.
Note:
g++ gives the expected error message.
--
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/20200831/685425fb/attachment.html>
More information about the llvm-bugs
mailing list