Fix detecting duplicate field names in structures
Previously field names that were listed in the first declarator list
inside a struct declaration were not checked against each other.
BUG=angleproject:2204
TEST=angle_unittests
Change-Id: Ibf821d45556f6dfe0223dae673644f6795daf4cb
Reviewed-on: https://chromium-review.googlesource.com/739825
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/ParseContext.h b/src/compiler/translator/ParseContext.h
index f423b83..1f7f5b9 100644
--- a/src/compiler/translator/ParseContext.h
+++ b/src/compiler/translator/ParseContext.h
@@ -306,6 +306,11 @@
unsigned int arraySize,
const TSourceLoc &arraySizeLoc);
+ void checkDoesNotHaveDuplicateFieldName(const TFieldList::const_iterator begin,
+ const TFieldList::const_iterator end,
+ const TString &name,
+ const TSourceLoc &location);
+ TFieldList *addStructFieldList(TFieldList *fields, const TSourceLoc &location);
TFieldList *combineStructFieldLists(TFieldList *processedFields,
const TFieldList *newlyAddedFields,
const TSourceLoc &location);