forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/5.0'
Change-Id: I4ea793c0b2d1980e5ed79bcc985c0f26a4de7aa4
This commit is contained in:
@@ -98,12 +98,5 @@ const char SYMBOLS_FIND_FILTER_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("CppTools", "C
|
||||
constexpr const char CLANG_STATIC_ANALYZER_DOCUMENTATION_URL[]
|
||||
= "https://clang-analyzer.llvm.org/available_checks.html";
|
||||
|
||||
// CLANG-UPGRADE-CHECK: Checks/update URLs.
|
||||
//
|
||||
// Once it gets dedicated documentation pages for released versions,
|
||||
// use them instead of pointing to master, as checks might vanish.
|
||||
constexpr const char CLAZY_DOCUMENTATION_URL_TEMPLATE[]
|
||||
= "https://github.com/KDE/clazy/blob/master/docs/checks/README-%1.md";
|
||||
|
||||
} // namespace Constants
|
||||
} // namespace CppTools
|
||||
|
||||
@@ -146,7 +146,9 @@ TypeHierarchy TypeHierarchyBuilder::buildDerivedTypeHierarchy(QFutureInterfaceBa
|
||||
return hierarchy;
|
||||
}
|
||||
|
||||
LookupItem TypeHierarchyBuilder::followTypedef(const LookupContext &context, const Name *symbolName, Scope *enclosingScope)
|
||||
LookupItem TypeHierarchyBuilder::followTypedef(const LookupContext &context, const Name *symbolName,
|
||||
Scope *enclosingScope,
|
||||
std::set<const Symbol *> typedefs)
|
||||
{
|
||||
QList<LookupItem> items = context.lookup(symbolName, enclosingScope);
|
||||
|
||||
@@ -159,6 +161,8 @@ LookupItem TypeHierarchyBuilder::followTypedef(const LookupContext &context, con
|
||||
continue;
|
||||
if (!s->isClass() && !s->isTemplate() && !s->isTypedef())
|
||||
continue;
|
||||
if (!typedefs.insert(s).second)
|
||||
continue;
|
||||
actualBaseSymbol = s;
|
||||
matchingItem = item;
|
||||
break;
|
||||
@@ -173,7 +177,8 @@ LookupItem TypeHierarchyBuilder::followTypedef(const LookupContext &context, con
|
||||
// Anonymous aggregate such as: typedef struct {} Empty;
|
||||
return LookupItem();
|
||||
}
|
||||
return followTypedef(context, namedType->name(), actualBaseSymbol->enclosingScope());
|
||||
return followTypedef(context, namedType->name(), actualBaseSymbol->enclosingScope(),
|
||||
typedefs);
|
||||
}
|
||||
|
||||
return matchingItem;
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
#include <QList>
|
||||
#include <QSet>
|
||||
|
||||
#include <set>
|
||||
|
||||
namespace CPlusPlus {
|
||||
class LookupContext;
|
||||
class LookupItem;
|
||||
@@ -72,7 +74,8 @@ public:
|
||||
const CPlusPlus::Snapshot &snapshot);
|
||||
static CPlusPlus::LookupItem followTypedef(const CPlusPlus::LookupContext &context,
|
||||
const CPlusPlus::Name *symbolName,
|
||||
CPlusPlus::Scope *enclosingScope);
|
||||
CPlusPlus::Scope *enclosingScope,
|
||||
std::set<const CPlusPlus::Symbol *> typedefs = {});
|
||||
private:
|
||||
TypeHierarchyBuilder() = default;
|
||||
void buildDerived(QFutureInterfaceBase &futureInterface, TypeHierarchy *typeHierarchy,
|
||||
|
||||
Reference in New Issue
Block a user