> On Mar 8, 2016, at 6:28 PM, Ben Langmuir <blangm...@apple.com> wrote:
> 
>> 
>> On Mar 8, 2016, at 6:12 PM, Argyrios Kyrtzidis via cfe-commits 
>> <cfe-commits@lists.llvm.org> wrote:
>> 
>> Author: akirtzidis
>> Date: Tue Mar  8 20:12:40 2016
>> New Revision: 262984
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=262984&view=rev
>> Log:
>> [index] Fix assertion hit when indexing re-declarations of built-in 
>> functions.
>> 
>> Modified:
>>   cfe/trunk/lib/Index/IndexingContext.cpp
>>   cfe/trunk/test/Index/Core/index-source.m
>> 
>> Modified: cfe/trunk/lib/Index/IndexingContext.cpp
>> URL: 
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Index/IndexingContext.cpp?rev=262984&r1=262983&r2=262984&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/Index/IndexingContext.cpp (original)
>> +++ cfe/trunk/lib/Index/IndexingContext.cpp Tue Mar  8 20:12:40 2016
>> @@ -298,6 +298,7 @@ bool IndexingContext::handleDeclOccurren
>>  if (Parent)
>>    Parent = getCanonicalDecl(Parent);
>>  assert(!Parent || !Parent->isImplicit() ||
>> +         isa<FunctionDecl>(Parent) ||
> 
> What is this assertion trying to cover?  Can we add a message or comment?

Checks whether the parent being implicit is expected or not; added a message in 
r262991, let me know if it is still unclear.

> 
>>         isa<ObjCInterfaceDecl>(Parent) || isa<ObjCMethodDecl>(Parent));
>> 
>>  SmallVector<SymbolRelation, 6> FinalRelations;
>> 
>> Modified: cfe/trunk/test/Index/Core/index-source.m
>> URL: 
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/Core/index-source.m?rev=262984&r1=262983&r2=262984&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/Index/Core/index-source.m (original)
>> +++ cfe/trunk/test/Index/Core/index-source.m Tue Mar  8 20:12:40 2016
>> @@ -65,3 +65,8 @@ enum {
>>  // CHECK-NEXT: RelChild | <no-name> | c:@Ea@One
>>  Two,
>> };
>> +
>> +// CHECK: [[@LINE+1]]:13 | typedef/C | jmp_buf | c:index-source.m@T@jmp_buf 
>> | <no-cgname> | Def | rel: 0
>> +typedef int jmp_buf[(18)];
>> +// CHECK: [[@LINE+1]]:19 | typedef/C | jmp_buf | c:index-source.m@T@jmp_buf 
>> | <no-cgname> | Ref | rel: 0
>> +extern int setjmp(jmp_buf);
>> 
>> 
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to