forked from OSchip/llvm-project
[index] Fix assertion hit when indexing re-declarations of built-in functions.
llvm-svn: 262984
This commit is contained in:
parent
3dbf9a31b5
commit
0ad65ac816
|
@ -298,6 +298,7 @@ bool IndexingContext::handleDeclOccurrence(const Decl *D, SourceLocation Loc,
|
|||
if (Parent)
|
||||
Parent = getCanonicalDecl(Parent);
|
||||
assert(!Parent || !Parent->isImplicit() ||
|
||||
isa<FunctionDecl>(Parent) ||
|
||||
isa<ObjCInterfaceDecl>(Parent) || isa<ObjCMethodDecl>(Parent));
|
||||
|
||||
SmallVector<SymbolRelation, 6> FinalRelations;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue