forked from qt-creator/qt-creator
		
	Enhance data stored for macros and macro uses.
In preparation for finding macro uses. * Macro: add offset and length * MacroUse: add line * Document: add convenience functions for finding a macro definition, use or undefined use at a given location. Reviewed-by: Erik Verbruggen
This commit is contained in:
		| @@ -1205,6 +1205,8 @@ void Preprocessor::processDefine(TokenIterator firstToken, TokenIterator lastTok | ||||
|     macro.setFileName(env->currentFile); | ||||
|     macro.setLine(env->currentLine); | ||||
|     macro.setName(tokenText(*tk)); | ||||
|     macro.setOffset(firstToken->offset); | ||||
|     macro.setLength(endOfToken(lastToken[- 1]) - startOfToken(*firstToken)); | ||||
|     ++tk; // skip T_IDENTIFIER | ||||
|  | ||||
|     if (tk->is(T_LPAREN) && ! tk->f.whitespace) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user