On Thu, Jul 16, 2015 at 7:39 AM, Andrey Bokhanko
<andreybokha...@gmail.com> wrote:
> andreybokhanko added a comment.
>
> Ping!
>
>
> http://reviews.llvm.org/D10805

LGTM with one minor nit:

> Index: lib/Sema/SemaDecl.cpp
> ===================================================================
> --- lib/Sema/SemaDecl.cpp
> +++ lib/Sema/SemaDecl.cpp
> @@ -5561,15 +5561,12 @@
>    return true;
>  }
>
> -/// \brief Returns true if given declaration is TU-scoped and externally
> -/// visible.
> -static bool isDeclTUScopedExternallyVisible(const Decl *D) {
> +/// \brief Returns true if given declaration has external C language linkage.
> +static bool isDeclExternC(const Decl *D) {
>    if (auto *FD = dyn_cast<FunctionDecl>(D))
> -    return (FD->getDeclContext()->isTranslationUnit() || FD->isExternC()) &&
> -           FD->hasExternalFormalLinkage();
> -  else if (auto *VD = dyn_cast<VarDecl>(D))
> -    return (VD->getDeclContext()->isTranslationUnit() || VD->isExternC()) &&
> -           VD->hasExternalFormalLinkage();
> +    return FD->isExternC();
> +  if (auto *VD = dyn_cast<VarDecl>(D))

const auto *

~Aaron
_______________________________________________
cfe-commits mailing list
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to