forked from qt-creator/qt-creator
		
	CPlusPlus: Properly categorize usages in switch and case statements
Change-Id: Iafbbdcca23db38d82bbc5bb24a39dac2a6d0a764 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
		@@ -330,6 +330,10 @@ Usage::Type FindUsages::getType(int line, int column, int tokenIndex)
 | 
			
		||||
    for (auto it = astPath.rbegin() + 1; it != astPath.rend(); ++it) {
 | 
			
		||||
        if ((*it)->asExpressionStatement())
 | 
			
		||||
            return Usage::Type::Read;
 | 
			
		||||
        if ((*it)->asSwitchStatement())
 | 
			
		||||
            return Usage::Type::Read;
 | 
			
		||||
        if ((*it)->asCaseStatement())
 | 
			
		||||
            return Usage::Type::Read;
 | 
			
		||||
        if ((*it)->asLambdaCapture() || (*it)->asNamedTypeSpecifier()
 | 
			
		||||
                || (*it)->asElaboratedTypeSpecifier()) {
 | 
			
		||||
            return Usage::Type::Other;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user