diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AST/Decl.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index 5cd98584bf..3e5c253737 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -1856,7 +1856,12 @@ bool FunctionDecl::isInlineDefinitionExternallyVisible() const { // Only consider file-scope declarations in this test. if (!Redecl->getLexicalDeclContext()->isTranslationUnit()) continue; - + + // Only consider explicit declarations; the presence of a builtin for a + // libcall shouldn't affect whether a definition is externally visible. + if (Redecl->isImplicit()) + continue; + if (!Redecl->isInlineSpecified() || Redecl->getStorageClass() == SC_Extern) return true; // Not an inline definition } |