summaryrefslogtreecommitdiff
path: root/unoidl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-11-22 17:28:08 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-11-22 18:58:20 +0100
commit39831b1d17abd360b1d50c8820f09cfd095be337 (patch)
tree3346c9dab26512692049e864d1051f2aee056707 /unoidl
parent87dc22287604a702b584cd8a9272870421b8b6d1 (diff)
Fix unoidl sourceprovider recursive struct/exception member check
Change-Id: Icd156745da10011611590b6b62cd0ec2df2b1266
Diffstat (limited to 'unoidl')
-rw-r--r--unoidl/source/sourceprovider-parser.y9
1 files changed, 8 insertions, 1 deletions
diff --git a/unoidl/source/sourceprovider-parser.y b/unoidl/source/sourceprovider-parser.y
index 9d1c97ac4239..7b9e224544fc 100644
--- a/unoidl/source/sourceprovider-parser.y
+++ b/unoidl/source/sourceprovider-parser.y
@@ -1288,10 +1288,17 @@ structMember:
default:
break;
}
- if (nameHasSameIdentifierAs(data->currentName, id)) {
+ if (t.getName() == data->currentName) { // no need to worry about typedefs
error(
@2, yyscanner,
("struct/exception type " + data->currentName + " direct member "
+ + id + " has same type as the type itself"));
+ YYERROR;
+ }
+ if (nameHasSameIdentifierAs(data->currentName, id)) {
+ error(
+ @3, yyscanner,
+ ("struct/exception type " + data->currentName + " direct member "
+ id + " has same unqualified identifer as the type itself"));
YYERROR;
}