diff options
author | David Majnemer <david.majnemer@gmail.com> | 2013-09-27 07:57:34 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2013-09-27 07:57:34 +0000 |
commit | c420e3cbafbc0468645ca9aab1b71c76c30d280f (patch) | |
tree | af9bec0515eaa0cbeab4d4d37b880946eef2f2c8 /test/Parser/MicrosoftExtensions.cpp | |
parent | 48c099f45400e37ec1cde7de5eaee5cce65dbd42 (diff) | |
download | clang-c420e3cbafbc0468645ca9aab1b71c76c30d280f.tar.gz |
AST: Handle multidimensional arrays inside of __uuidof()
We previously handled one-dimensional arrays but didn't consider the
general case. The fix is simple: keep going through subsequent
dimensions until we get to the base element.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191493 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser/MicrosoftExtensions.cpp')
-rw-r--r-- | test/Parser/MicrosoftExtensions.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Parser/MicrosoftExtensions.cpp b/test/Parser/MicrosoftExtensions.cpp index ef873d6430..0327499f27 100644 --- a/test/Parser/MicrosoftExtensions.cpp +++ b/test/Parser/MicrosoftExtensions.cpp @@ -72,6 +72,10 @@ int uuid_sema_test() __uuidof(struct_without_uuid); // expected-error {{cannot call operator __uuidof on a type with no GUID}} __uuidof(struct_with_uuid*); __uuidof(struct_without_uuid*); // expected-error {{cannot call operator __uuidof on a type with no GUID}} + __uuidof(struct_with_uuid[1]); + __uuidof(struct_with_uuid*[1]); // expected-error {{cannot call operator __uuidof on a type with no GUID}} + __uuidof(const struct_with_uuid[1][1]); + __uuidof(const struct_with_uuid*[1][1]); // expected-error {{cannot call operator __uuidof on a type with no GUID}} __uuidof(var_with_uuid); __uuidof(var_without_uuid);// expected-error {{cannot call operator __uuidof on a type with no GUID}} |