forked from qt-creator/qt-creator
C++: Fix crash when deducing auto (with invalid ids)
Task-number: QTCREATORBUG-7801 Change-Id: I61436148ed1428a50a6840ba9109310a57dabaa4 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include <ASTVisitor.h>
|
||||
#include <FullySpecifiedType.h>
|
||||
#include <Bind.h>
|
||||
#include <set>
|
||||
|
||||
namespace CPlusPlus {
|
||||
|
||||
@@ -118,12 +119,20 @@ protected:
|
||||
// Objective-C expressions
|
||||
virtual bool visit(ObjCMessageExpressionAST *ast);
|
||||
|
||||
|
||||
private:
|
||||
struct IdentifierComp
|
||||
{
|
||||
bool operator()(const Identifier *a, const Identifier *b) const
|
||||
{ return strcmp(a->chars(), b->chars()) < 0; }
|
||||
};
|
||||
|
||||
Scope *_scope;
|
||||
LookupContext _context;
|
||||
Bind bind;
|
||||
QList<LookupItem> _results;
|
||||
bool _reference;
|
||||
std::set<const Identifier *, IdentifierComp> _blockedIds; // Replace by a hash impl.
|
||||
};
|
||||
|
||||
} // namespace CPlusPlus
|
||||
|
||||
Reference in New Issue
Block a user