[PATCH] D91035: [NFC, Refactor] Convert FunctionDefinitionKind from DeclSpech.h to a scoped enum
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 20 07:38:24 PST 2020
aaron.ballman added inline comments.
================
Comment at: clang/include/clang/Sema/DeclSpec.h:1756
/// a function.
-enum FunctionDefinitionKind {
- FDK_Declaration,
- FDK_Definition,
- FDK_Defaulted,
- FDK_Deleted
+enum class FunctionDefinitionKind : unsigned char {
+ Declaration,
----------------
We don't gain a whole lot by making this `unsigned char` since we're not storing it anywhere -- leave as the default `int` and change the `static_cast<>`s?
================
Comment at: clang/lib/Sema/SemaDecl.cpp:9163
switch (D.getFunctionDefinitionKind()) {
- case FDK_Declaration:
- case FDK_Definition:
+ case FunctionDefinitionKind::Declaration:
+ case FunctionDefinitionKind::Definition:
----------------
Might as well hit these formatting fixes since we're touching the lines anyway.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91035/new/
https://reviews.llvm.org/D91035
More information about the cfe-commits
mailing list