summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objdump/llvm-objdump.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2016-12-13 18:58:09 +0000
committerReid Kleckner <rnk@google.com>2016-12-13 18:58:09 +0000
commite516eab140575e9740b94caca3b86c70ce65f964 (patch)
tree8d13bcc296e7d8e0ac49c0affafbdf46a64cade9 /llvm/tools/llvm-objdump/llvm-objdump.cpp
parentfe7c59adb8fd3b89e2b8379a5e16cf4fac68930f (diff)
downloadbcm5719-llvm-e516eab140575e9740b94caca3b86c70ce65f964.tar.gz
bcm5719-llvm-e516eab140575e9740b94caca3b86c70ce65f964.zip
__uuidof() and declspec(uuid("...")) should be allowed on enumeration types
Although not specifically mentioned in the documentation, MSVC accepts __uuidof(…) and declspec(uuid("…")) attributes on enumeration types in addition to structs/classes. This is meaningful, as such types *do* have associated UUIDs in ActiveX typelibs, and such attributes are included by default in the wrappers generated by their #import construct, so they are not particularly unusual. clang currently rejects the declspec with a –Wignored-attributes warning, and errors on __uuidof() with “cannot call operator __uuidof on a type with no GUID” (because it rejected the uuid attribute, and therefore finds no value). This is causing problems for us while trying to use clang-tidy on a codebase that makes heavy use of ActiveX. I believe I have found the relevant places to add this functionality, this patch adds this case to clang’s implementation of these MS extensions. patch is against r285994 (or actually the git mirror 80464680ce). Both include an update to test/Parser/MicrosoftExtensions.cpp to exercise the new functionality. This is my first time contributing to LLVM, so if I’ve missed anything else needed to prepare this for review just let me know! __uuidof: https://msdn.microsoft.com/en-us/library/zaah6a61.aspx declspec(uuid("…")): https://msdn.microsoft.com/en-us/library/3b6wkewa.aspx #import: https://msdn.microsoft.com/en-us/library/8etzzkb6.aspx Reviewers: aaron.ballman, majnemer, rnk Differential Revision: https://reviews.llvm.org/D26846 llvm-svn: 289567
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud