Disable naming convention check on anonymous unions and structs

This commit is contained in:
Hackerpilot 2014-08-27 12:27:25 -07:00
parent d610dc221d
commit 2ff3b02aa7
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ class StyleChecker : BaseAnalyzer
void checkAggregateName(string aggregateType, ref const Token name)
{
if (name.text.matchFirst(aggregateNameRegex).length == 0)
if (name.text.length > 0 && name.text.matchFirst(aggregateNameRegex).length == 0)
addErrorMessage(name.line, name.column, KEY, aggregateType
~ " name '" ~ name.text ~ "' does not match style guidelines.");
}