forked from OSchip/llvm-project
[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:
parent
6d4ed05830
commit
7655381aa1
|
@ -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;
|
||||
|
|
|
@ -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; }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue