[PATCH] D26065: Improve diagnostics if friend function redefines file-level function.

2017-06-07 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304964: Improve diagnostics if friend function redefines file-level function. (authored by sepavloff). Changed prior to commit: https://reviews.llvm.org/D26065?vs=101666&id=101859#toc Repository: rL

[PATCH] D26065: Improve diagnostics if friend function redefines file-level function.

2017-06-07 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D26065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

[PATCH] D26065: Improve diagnostics if friend function redefines file-level function.

2017-06-06 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 101666. sepavloff added a comment. Rebased and enhance check https://reviews.llvm.org/D26065 Files: lib/Sema/SemaDeclCXX.cpp test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p4.cpp Index: test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p4.cpp =

[PATCH] D26065: Improve diagnostics if friend function redefines file-level function.

2017-06-06 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:646 + // in this case, redefinition will be diagnosed later. + (New->isInlineSpecified() || !New->isOutOfLine() || + !New->getLexicalDeclContext()->isRecord())) { --

[PATCH] D26065: Improve diagnostics if friend function redefines file-level function.

2017-06-06 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:646 + // in this case, redefinition will be diagnosed later. + (New->isInlineSpecified() || !New->isOutOfLine() || + !New->getLexicalDeclContext()->isRecord())) { ---

[PATCH] D26065: Improve diagnostics if friend function redefines file-level function.

2017-03-06 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Ping. https://reviews.llvm.org/D26065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26065: Improve diagnostics if friend function redefines file-level function.

2016-10-31 Thread Serge Pavlov via cfe-commits
sepavloff updated this revision to Diff 76520. sepavloff added a comment. Do not use getFriendObjectKind(), friend kind sometimes is set too late. https://reviews.llvm.org/D26065 Files: lib/Sema/SemaDeclCXX.cpp test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p4.cpp Index: test/CXX/dcl.dcl/dcl.spec

[PATCH] D26065: Improve diagnostics if friend function redefines file-level function.

2016-10-27 Thread Serge Pavlov via cfe-commits
sepavloff created this revision. sepavloff added a subscriber: cfe-commits. 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