From 789d9449123ea8528382c0ffdb127c33c193bed0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 1 Jan 2011 20:20:03 +0100 Subject: [PATCH] typedef: don't simplify typedef after 'case'. it means that there is a typedef and constant with the same names. Ticket: #2386 --- lib/tokenize.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 8ccd12f05..61a5334f4 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -1184,6 +1184,10 @@ void Tokenizer::simplifyTypedef() simplifyType = true; } } + else if (Token::Match(tok2->previous(), "case %type% :")) + { + tok2 = tok2->next(); + } else if (duplicateTypedef(&tok2, typeName)) { exitScope = scope;