Skip to content
  • Nikolai Kosjar's avatar
    CppEditor: Fix Follow Symbol on trailing return type · 251b444c
    Nikolai Kosjar authored
    
    
    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: default avatarErik Verbruggen <erik.verbruggen@theqtcompany.com>
    251b444c