From 0f4dd5ea7b6b4c742763a332e9bcd09f7c188c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 4 Jan 2009 15:02:22 +0000 Subject: [PATCH] Variable usage: fixed false positives for union member variables --- checkother.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/checkother.cpp b/checkother.cpp index c098fd949..d20b8713b 100644 --- a/checkother.cpp +++ b/checkother.cpp @@ -835,7 +835,7 @@ void CheckOther::functionVariableUsage() if ( indentlevel <= 0 ) break; } - else if ( Token::simpleMatch(tok, "struct {") ) + else if ( Token::Match(tok, "struct|union|class {") ) { while ( tok && tok->str() != "}" ) tok = tok->next();