[PATCH] D26065: Improve diagnostics if friend function redefines file-level function.
Alex Lorenz via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 6 11:54:59 PDT 2017
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())) {
----------------
This is somewhat confusing to me: are you using the `!New->isOutOfLine() || !New->getLexicalDeclContext()->isRecord()` check to ensure that this new declaration is not a `friend`?
https://reviews.llvm.org/D26065
More information about the cfe-commits
mailing list