diff options
author | Serge Pavlov <sepavloff@gmail.com> | 2017-06-08 06:07:07 +0000 |
---|---|---|
committer | Serge Pavlov <sepavloff@gmail.com> | 2017-06-08 06:07:07 +0000 |
commit | 673f44c769ee85e592a8e00d77a6ce4231edf1dc (patch) | |
tree | 7f19bc65c1c74591519e96f470cbe1344381ab1e /llvm/lib/Object/COFFModuleDefinition.cpp | |
parent | 0c64e27207564763a588b743646b7cefa727e113 (diff) | |
download | llvm-673f44c769ee85e592a8e00d77a6ce4231edf1dc.zip llvm-673f44c769ee85e592a8e00d77a6ce4231edf1dc.tar.gz llvm-673f44c769ee85e592a8e00d77a6ce4231edf1dc.tar.bz2 |
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
Diffstat (limited to 'llvm/lib/Object/COFFModuleDefinition.cpp')
0 files changed, 0 insertions, 0 deletions