r288207 - Don't try to merge DLL attributes on redeclaration of invalid decl (PR31069)

Hans Wennborg via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 29 16:41:55 PST 2016


On Tue, Nov 29, 2016 at 4:37 PM, David Majnemer via cfe-commits
<cfe-commits at lists.llvm.org> wrote:
>
>
> On Tue, Nov 29, 2016 at 2:31 PM, Hans Wennborg via cfe-commits
> <cfe-commits at lists.llvm.org> wrote:
>>
>> Author: hans
>> Date: Tue Nov 29 16:31:00 2016
>> New Revision: 288207
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=288207&view=rev
>> Log:
>> Don't try to merge DLL attributes on redeclaration of invalid decl
>> (PR31069)
>>
>> Modified:
>>     cfe/trunk/lib/Sema/SemaDecl.cpp
>>     cfe/trunk/test/Sema/dllimport.c
>>
>> Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=288207&r1=288206&r2=288207&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
>> +++ cfe/trunk/lib/Sema/SemaDecl.cpp Tue Nov 29 16:31:00 2016
>> @@ -5651,6 +5651,9 @@ static void checkDLLAttributeRedeclarati
>>                                             NamedDecl *NewDecl,
>>                                             bool IsSpecialization,
>>                                             bool IsDefinition) {
>> +  if(OldDecl->isInvalidDecl())
>> +    return;
>> +
>
>
> Formatting looks weird here.

Should be fixed with r288223.

Cheers,
Hans


More information about the cfe-commits mailing list