[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdevelop] languages/clang/codegen: Don't offer to update signature if we aren't inside the signatur
From:       Olivier JG <olivier.jg () gmail ! com>
Date:       2015-10-11 10:54:33
Message-ID: E1ZlEGv-0002ph-IU () scm ! kde ! org
[Download RAW message or body]

Git commit 1559f5ad1df0e7839d27c819f4604cd85383eb10 by Olivier JG.
Committed on 11/10/2015 at 10:58.
Pushed by olivierjg into branch 'master'.

Don't offer to update signature if we aren't inside the signature

M  +2    -2    languages/clang/codegen/adaptsignatureassistant.cpp

http://commits.kde.org/kdevelop/1559f5ad1df0e7839d27c819f4604cd85383eb10

diff --git a/languages/clang/codegen/adaptsignatureassistant.cpp \
b/languages/clang/codegen/adaptsignatureassistant.cpp index afaa9be..5354991 100644
--- a/languages/clang/codegen/adaptsignatureassistant.cpp
+++ b/languages/clang/codegen/adaptsignatureassistant.cpp
@@ -44,8 +44,8 @@ Declaration *getDeclarationAtCursor(const KTextEditor::Cursor \
&cursor, const QUr  clangDebug() << "no context found for document" << documentUrl;
         return nullptr;
     }
-    Declaration* functionDecl = DUChainUtils::declarationInLine(cursor, top.data());
-    return functionDecl;
+    const auto *context = top->findContextAt(top->transformToLocalRevision(cursor), \
true); +    return context->type() == DUContext::Function ? context->owner() : \
nullptr;  }
 
 Signature getDeclarationSignature(const Declaration *functionDecl, const DUContext \
*functionCtxt, bool includeDefaults)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic