Clang: Fix built-in's ExtractFunction action

Since

  Clang: Provide highlighting for identifier under cursor
  commit ca72c29462

the LocalUseMap, used for some refactoring actions, was not updated
anymore. Fall back to the built-in implementation for the LocalUseMap
because it contains pointers to built-in AST that clang obviously can't
provide.

Task-number: QTCREATORBUG-18607
Change-Id: I08762fe457835d4d83aca719febcb3497ee9696b
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Nikolai Kosjar
2017-08-18 14:51:32 +02:00
parent a9ddbb61a4
commit 0db7ad77a0
6 changed files with 53 additions and 31 deletions

View File

@@ -26,17 +26,21 @@
#pragma once
#include "cppcursorinfo.h"
#include "cpptools_global.h"
#include <cplusplus/CppDocument.h>
#include <QFuture>
namespace CppTools {
namespace Internal {
class BuiltinCursorInfo
class CPPTOOLS_EXPORT BuiltinCursorInfo
{
public:
static QFuture<CursorInfo> run(const CursorInfoParams &params);
static CppTools::SemanticInfo::LocalUseMap
findLocalUses(const CPlusPlus::Document::Ptr &document, int line, int column);
};
} // namespace Internal
} // namespace CppTools