Files
qt-creator/src/plugins/cppeditor/cppfollowsymbolundercursor.cpp
Nikolai Kosjar 251b444cfd CppEditor: Fix Follow Symbol on trailing return type
For the function

    auto foo() -> @Foo {}

whereas '@' denotes the cursor position, we detected the expression
under cursor as "foo() -> Foo" and tried to resolve the member "Foo"
within the type of "foo()".

ExpressionUnderCursor can't detect whether we are on a trailing return
type since it only looks at the tokens. Thus, check also the AST.

Task-number: QTCREATORBUG-13096
Change-Id: Ifc14e402fb70e722940e5fa13f1eaaa9973362e4
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-03-13 13:41:08 +00:00

30 KiB