Author: akirtzidis Date: Fri Mar 4 01:17:48 2016 New Revision: 262694 URL: http://llvm.org/viewvc/llvm-project?rev=262694&view=rev Log: [index] Include parameter types in the USRs for C functions marked with 'overloadable' attribute.
Modified: cfe/trunk/lib/Index/USRGeneration.cpp cfe/trunk/test/Index/Core/index-source.m Modified: cfe/trunk/lib/Index/USRGeneration.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Index/USRGeneration.cpp?rev=262694&r1=262693&r2=262694&view=diff ============================================================================== --- cfe/trunk/lib/Index/USRGeneration.cpp (original) +++ cfe/trunk/lib/Index/USRGeneration.cpp Fri Mar 4 01:17:48 2016 @@ -218,7 +218,8 @@ void USRGenerator::VisitFunctionDecl(con 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 * 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=262694&r1=262693&r2=262694&view=diff ============================================================================== --- cfe/trunk/test/Index/Core/index-source.m (original) +++ cfe/trunk/test/Index/Core/index-source.m Fri Mar 4 01:17:48 2016 @@ -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)); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits