[modules] Don't require the 'inline' specifier when merging an inline function;

any source of the inline nature is sufficient.

llvm-svn: 241146
This commit is contained in:
Richard Smith 2015-07-01 07:24:18 +00:00
parent 6d4ed05830
commit 7655381aa1
2 changed files with 7 additions and 1 deletions

View File

@ -10385,7 +10385,7 @@ Sema::CheckForFunctionRedefinition(FunctionDecl *FD,
// through a deduced return type, or instantiate templates with local types.
if (!hasVisibleDefinition(Definition) &&
(Definition->getFormalLinkage() == InternalLinkage ||
Definition->isInlineSpecified() ||
Definition->isInlined() ||
Definition->getDescribedFunctionTemplate() ||
Definition->getNumTemplateParameterLists()))
return;

View File

@ -74,3 +74,9 @@ namespace FriendDefArg {
template<typename, int, template<typename> class> friend struct D;
};
}
namespace SeparateInline {
inline void f();
void f() {}
constexpr int g() { return 0; }
}