forked from qt-creator/qt-creator
		
	C++: fix macro calls with comment before arguments
When in 'keep comments' mode, the preprocessor does not properly handle macro calls with comments between the macro name and the opening parenthesis: "FOO /*something to say*/ (45)". Change-Id: I6fe733242e4d2ccff2985d17399d0a084917415a Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
		
				
					committed by
					
						
						Erik Verbruggen
					
				
			
			
				
	
			
			
			
						parent
						
							f7470d3230
						
					
				
				
					commit
					4c43655cec
				
			@@ -1330,6 +1330,13 @@ bool Preprocessor::collectActualArguments(PPToken *tk, QVector<QVector<PPToken>
 | 
			
		||||
 | 
			
		||||
    lex(tk); // consume the identifier
 | 
			
		||||
 | 
			
		||||
    // consume comments
 | 
			
		||||
    while (tk->isComment()) {
 | 
			
		||||
        lex(tk);
 | 
			
		||||
        if (!tk)
 | 
			
		||||
            return false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (tk->isNot(T_LPAREN))
 | 
			
		||||
        //### TODO: error message
 | 
			
		||||
        return false;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user