[PATCH] D10805: Disabling of "redefine_extname" pragma for C++ code

Aaron Ballman aaron.ballman at gmail.com
Thu Jul 16 10:07:23 PDT 2015


On Thu, Jul 16, 2015 at 11:45 AM, Andrey Bokhanko
<andreybokhanko at gmail.com> wrote:
> On Thu, Jul 16, 2015 at 2:58 PM, Aaron Ballman <aaron.ballman at gmail.com> wrote:
>> 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 *
>
> Fixed. Patch updated.
>
> Aaron, thank you for the review!
>
> Alexey [Bataev] / Aaron, I don't have commit access yet; could you,
> please, commit this patch on my behalf?

I've commit in r242420. Thank you!

~Aaron



More information about the cfe-commits mailing list