From 149ff355e230c7e4d3d59fcf9fd331d3d48d5ce6 Mon Sep 17 00:00:00 2001 From: Edoardo Prezioso Date: Thu, 8 Dec 2011 02:50:05 +0100 Subject: [PATCH] Add more kind of code to process for 'removeExceptionSpecifications' (unions, anonymous unions and structs). --- lib/tokenize.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index e85fd184e..76613210b 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -8740,7 +8740,7 @@ void Tokenizer::removeExceptionSpecifications(Token *tok) const tok->deleteNext(); } - else if (Token::Match(tok, "class|namespace|struct %type% :|{")) { + else if (Token::Match(tok, "class|namespace|struct|union %type% :|{")) { tok = tok->tokAt(2); while (tok && !Token::Match(tok, "[;{=]")) tok = tok->next(); @@ -8751,7 +8751,7 @@ void Tokenizer::removeExceptionSpecifications(Token *tok) const continue; } - else if (Token::simpleMatch(tok, "namespace {")) { + else if (Token::Match(tok, "namespace|struct|union {")) { tok = tok->next(); removeExceptionSpecifications(tok->next()); tok = tok->link();