https://bugs.kde.org/show_bug.cgi?id=292228
Aaron Puchert <aaronpuch...@alice-dsl.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aaronpuch...@alice-dsl.net --- Comment #5 from Aaron Puchert <aaronpuch...@alice-dsl.net> --- (In reply to Nicolás Alvarez from comment #4) > Well, I tried it in a current KDevelop with the new clang-based parser and > the code above shows both calls to foo as void foo( T x ). Is it dropping > references when doing type deduction? Probably (so I'll close the bug as > fixed), but I can't really tell, it's not showing any template parameters in > the tooltip anymore... Clang at least does the type deduction right. You can convince yourself on the command line by running it with "-fsyntax-only -Xclang -ast-dump". > Maybe showing template parameters in the tooltip is a feature that should be > brought back. Tough. The c-index that we use doesn't contain that information apparently. At least "c-index-test -index-file" on the example code spits out [startedTranslationUnit] [enteredMainFile]: <stdin> [indexDeclaration]: kind: function-template | name: foo | USR: c:@FT@>1#Tfoo#t0.0#v# | lang: C++ | cursor: FunctionDecl=foo:1:27 | loc: 1:27 | semantic-container: [TU] | lexical-container: [TU] | isRedecl: 0 | isDef: 0 | isContainer: 0 | isImplicit: 0 [indexDeclaration]: kind: function | name: main | USR: c:@F@main# | lang: C | cursor: FunctionDecl=main:3:5 (Definition) | loc: 3:5 | semantic-container: [TU] | lexical-container: [TU] | isRedecl: 0 | isDef: 1 | isContainer: 1 | isImplicit: 0 [indexEntityReference]: kind: function-template | name: foo | USR: c:@FT@>1#Tfoo#t0.0#v# | lang: C++ | cursor: DeclRefExpr=foo:1:27 | loc: 6:4 | <parent>:: kind: function | name: main | USR: c:@F@main# | lang: C | container: [main:3:5] | refkind: direct | role: ref call [indexEntityReference]: kind: function-template | name: foo | USR: c:@FT@>1#Tfoo#t0.0#v# | lang: C++ | cursor: DeclRefExpr=foo:1:27 | loc: 7:4 | <parent>:: kind: function | name: main | USR: c:@F@main# | lang: C | container: [main:3:5] | refkind: direct | role: ref call As you can see the calls at 6:4 and 7:4 just contain a reference to the function template foo:1:27 (the numbers are line:column). One would think that the magic string tells us something alas another line foo(1.0); produces the same magic string: [indexEntityReference]: kind: function-template | name: foo | USR: c:@FT@>1#Tfoo#t0.0#v# | lang: C++ | cursor: DeclRefExpr=foo:1:27 | loc: 8:4 | <parent>:: kind: function | name: main | USR: c:@F@main# | lang: C | container: [main:3:5] | refkind: direct | role: ref call -- You are receiving this mail because: You are watching all bug changes.