forked from qt-creator/qt-creator
		
	C++: fixed completion in braceless statements following a control statement.
- Changed generator to generate: - Changed AST::lastToken to return 1 if there is none - Changed Bind.cpp to set the scope of the block following a control statement to extend upto (and not including) the first token after the block. So basically, including any whitespace after the control statement. Reviewed-by: Roberto Raggi
This commit is contained in:
		@@ -67,7 +67,9 @@ bool ASTPath::preVisit(AST *ast)
 | 
			
		||||
    unsigned firstToken = ast->firstToken();
 | 
			
		||||
    unsigned lastToken = ast->lastToken();
 | 
			
		||||
 | 
			
		||||
    if (firstToken > 0 && lastToken > firstToken) {
 | 
			
		||||
    if (firstToken > 0) {
 | 
			
		||||
        Q_ASSERT(lastToken > firstToken);
 | 
			
		||||
 | 
			
		||||
        unsigned startLine, startColumn;
 | 
			
		||||
        getTokenStartPosition(firstToken, &startLine, &startColumn);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user