forked from qt-creator/qt-creator
Clang: Provide tooltips
This includes also the query data for the help system (F1) for an
identifier under cursor.
Regressions (libclang changes necessary):
- Function signatures do not contain default values.
- Aliases are not resolved for/at:
- template types
- qualified name of a type
Fixes/Improvements:
- Resolve "auto"
- On a template type, show also the template parameter.
- For a typedef like
typedef long long superlong;
the tooltip was "long long superlong", which was confusing.
Now, "long long" is shown.
New:
- Show first or \brief paragraph of a documentation comment.
- Show size of a class at definition.
- Show size of a field member in class definition.
Task-number: QTCREATORBUG-11259
Change-Id: Ie1a07930d0e882015d07dc43e35bb81a685cdeb8
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -67,6 +67,7 @@ public:
|
||||
bool isFunctionLike() const;
|
||||
bool isConstructorOrDestructor() const;
|
||||
bool isTemplateLike() const;
|
||||
bool isAnyTypeAlias() const;
|
||||
bool hasFinalFunctionAttribute() const;
|
||||
bool hasFinalClassAttribute() const;
|
||||
bool isUnexposed() const;
|
||||
@@ -81,6 +82,10 @@ public:
|
||||
|
||||
Type type() const;
|
||||
Type nonPointerTupe() const;
|
||||
Type enumType() const;
|
||||
|
||||
long long enumConstantValue() const;
|
||||
unsigned long long enumConstantUnsignedValue() const;
|
||||
|
||||
SourceLocation sourceLocation() const;
|
||||
CXSourceLocation cxSourceLocation() const;
|
||||
@@ -92,17 +97,19 @@ public:
|
||||
|
||||
Cursor definition() const;
|
||||
Cursor canonical() const;
|
||||
Cursor alias() const;
|
||||
Cursor referenced() const;
|
||||
Cursor semanticParent() const;
|
||||
Cursor lexicalParent() const;
|
||||
Cursor functionBaseDeclaration() const;
|
||||
Cursor functionBase() const;
|
||||
Type resultType() const;
|
||||
Cursor argument(int index) const;
|
||||
unsigned overloadedDeclarationsCount() const;
|
||||
Cursor overloadedDeclaration(unsigned index) const;
|
||||
Cursor specializedCursorTemplate() const;
|
||||
|
||||
CXFile includedFile() const;
|
||||
|
||||
void collectOutputArgumentRangesTo(
|
||||
std::vector<CXSourceRange> &outputArgumentRanges) const;
|
||||
std::vector<CXSourceRange> outputArgumentRanges() const;
|
||||
@@ -112,6 +119,8 @@ public:
|
||||
template <class VisitorCallback>
|
||||
void visit(VisitorCallback visitorCallback) const;
|
||||
|
||||
CXCursor cx() const;
|
||||
|
||||
private:
|
||||
CXCursor cxCursor;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user