[index] Include parameter types in the USRs for C functions marked with 'overloadable' attribute.

llvm-svn: 262694
This commit is contained in:
Argyrios Kyrtzidis 2016-03-04 07:17:48 +00:00
parent 9c99867386
commit 2682f9e5de
2 changed files with 7 additions and 1 deletions

View File

@ -218,7 +218,8 @@ void USRGenerator::VisitFunctionDecl(const FunctionDecl *D) {
D->getDeclName().print(Out, Policy);
ASTContext &Ctx = *Context;
if (!Ctx.getLangOpts().CPlusPlus || D->isExternC())
if ((!Ctx.getLangOpts().CPlusPlus || D->isExternC()) &&
!D->hasAttr<OverloadableAttr>())
return;
if (const TemplateArgumentList *

View File

@ -43,3 +43,8 @@ void goo(Base *b) {
// CHECK-NOT: ObjectType
-(ObjectType)getit;
@end
// CHECK: [[@LINE+1]]:6 | function/C | over_func | c:@F@over_func#I# | __Z9over_funci | Decl | rel: 0
void over_func(int x) __attribute__((overloadable));
// CHECK: [[@LINE+1]]:6 | function/C | over_func | c:@F@over_func#f# | __Z9over_funcf | Decl | rel: 0
void over_func(float x) __attribute__((overloadable));