[PATCH] D91035: [NFC, Refactor] Convert FunctionDefinitionKind from DeclSpech.h to a scoped enum
Faisal Vali via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Nov 14 08:55:34 PST 2020
faisalv updated this revision to Diff 305317.
faisalv added a comment.
This diff makes the following changes to the previous patch (based on feedback from Richard, Aaron and Wyatt):
- avoid introducing an initialism (FDK) into the clang namespace and unabbreviated each corresponding use to 'FunctionDefinitionKind'. Let me know if it seems too verbose - if so, perhaps a compromise along Wyatt's suggestion might behoove our source.
- changed the destination type from 'unsigned' to 'unsigned char' in our static_casts.
- is that preferred, or should i have left it as 'unsigned'?
- is there any real benefit here to specifying an underlying type of 'unsigned char' for our enum (that is never used as an opaque enum).
Richard, thanks for stepping in and enlightening us as to why the world is still not ready for type-safe enum bit-fields! (spoiler: MSVC's outré ABI choice in layout)
P.S. Also, for those of you like me, who tend to be sloppy with their English (unlike Richard in all his meticulous glory ;) - and were unfamiliar with the nuances behind the term 'initialism' - let me direct you to a lesson from one of the greatest broadcasters of our time: https://youtu.be/FyJsvT3Eo4c
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91035/new/
https://reviews.llvm.org/D91035
Files:
clang/include/clang/Sema/DeclSpec.h
clang/lib/Parse/ParseCXXInlineMethods.cpp
clang/lib/Parse/ParseDeclCXX.cpp
clang/lib/Parse/ParseExpr.cpp
clang/lib/Parse/Parser.cpp
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaOpenMP.cpp
clang/lib/Sema/SemaType.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91035.305317.patch
Type: text/x-patch
Size: 11751 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201114/97299480/attachment-0001.bin>
More information about the cfe-commits
mailing list