llvm-project/clang/test/CXX/dcl.dcl
Serge Pavlov 673f44c769 Improve diagnostics if friend function redefines file-level function.
Clang makes check for function redefinition after it merged the new
declaration with the existing one. As a result, it produces poor
diagnostics in the case of a friend function defined inline, as in
the code:
```
    void func() {}
    class C { friend void func() {} };
```
Error message in this case states that `inline declaration of 'func'
follows non-inline definition`, which is misleading, as `func` does
not have explicit `inline` specifier.

With this changes compiler reports function redefinition if the new
function is a friend defined inline and it does not have explicit
`inline` specifier.

Differential Revision: https://reviews.llvm.org/D26065

llvm-svn: 304964
2017-06-08 06:07:07 +00:00
..
basic.namespace PR31606: Generalize our tentative DR resolution for inheriting copy/move 2017-01-13 20:46:54 +00:00
dcl.attr Correct class-template deprecation behavior-REDUX 2017-03-23 18:51:54 +00:00
dcl.enum PR18400: ignore cv-qualifiers on the underlying type of an enumeration. 2014-01-08 01:16:19 +00:00
dcl.link More tests for r201536. 2014-02-18 22:47:10 +00:00
dcl.spec Improve diagnostics if friend function redefines file-level function. 2017-06-08 06:07:07 +00:00
p4-0x.cpp