diff options
author | Eike Ziller <eike.ziller@qt.io> | 2018-12-07 08:53:11 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2018-12-07 08:53:11 +0100 |
commit | e5c2ee922a6cdac5252885a6f7938e1597fe042e (patch) | |
tree | aaf53359d0183fbfa76ca9f570aa765e7a2b8154 /src/tools | |
parent | 9d708f776fc0368b1150b4986318fb316a04336b (diff) | |
parent | 3e9d7d290c278b8043b7eb6d346c69c27173a506 (diff) | |
download | qt-creator-e5c2ee922a6cdac5252885a6f7938e1597fe042e.tar.gz |
Merge remote-tracking branch 'origin/4.8'
Conflicts:
src/plugins/cpptools/compileroptionsbuilder.cpp
Change-Id: I743ea39480cc5c7b6febcd2e93713d15a3ae6d9c
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/clangbackend/source/clangtooltipinfocollector.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/tools/clangbackend/source/clangtooltipinfocollector.cpp b/src/tools/clangbackend/source/clangtooltipinfocollector.cpp index a0b8223a18..8eb15eb89e 100644 --- a/src/tools/clangbackend/source/clangtooltipinfocollector.cpp +++ b/src/tools/clangbackend/source/clangtooltipinfocollector.cpp @@ -425,14 +425,24 @@ ToolTipInfo ToolTipInfoCollector::qDocInfo(const Cursor &cursor) const return result; } - if (cursor.kind() == CXCursor_VarDecl || cursor.kind() == CXCursor_FieldDecl) { - result.qdocMark = typeName(cursor.type()); + if (cursor.kind() == CXCursor_VarDecl || cursor.kind() == CXCursor_ParmDecl + || cursor.kind() == CXCursor_FieldDecl) { // maybe template instantiation if (cursor.type().kind() == CXType_Unexposed && cursor.type().canonical().kind() == CXType_Record) { result.qdocIdCandidates = qDocIdCandidates(cursor.type().canonical().declaration()); + result.qdocMark = typeName(cursor.type()); result.qdocCategory = ToolTipInfo::ClassOrNamespace; return result; } + + Type type = cursor.type(); + while (type.pointeeType().isValid()) + type = type.pointeeType(); + + const Cursor typeCursor = type.declaration(); + result.qdocIdCandidates = qDocIdCandidates(typeCursor); + result.qdocCategory = qdocCategory(typeCursor); + result.qdocMark = typeName(type); } // TODO: Handle also RValueReference() |