forked from qt-creator/qt-creator
Clang: Fix SOFT ASSERT: "!m_functionName.isEmpty()"
...that ocurred for e.g. "foo (<COMPLETE HERE>". We did not handle the following cases: 1) white space after the function name 2) nothing before parenthesis Change-Id: If6aedd2cc938df30516e13a860d07d7a509633ae Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
This commit is contained in:
@@ -64,7 +64,12 @@ public:
|
||||
private:
|
||||
ClangCompletionContextAnalyzer();
|
||||
|
||||
struct FunctionInfo { int functionNamePosition; QString functionName; };
|
||||
struct FunctionInfo {
|
||||
bool isValid() const { return functionNamePosition != -1 && !functionName.isEmpty(); }
|
||||
|
||||
int functionNamePosition = -1;
|
||||
QString functionName;
|
||||
};
|
||||
FunctionInfo analyzeFunctionCall(int endOfExpression) const;
|
||||
|
||||
void setActionAndClangPosition(CompletionAction action, int position);
|
||||
|
||||
Reference in New Issue
Block a user