We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ebcb7b commit 3dc7ff2Copy full SHA for 3dc7ff2
lib/PrintAsClang/DeclAndTypePrinter.cpp
@@ -396,6 +396,11 @@ class DeclAndTypePrinter::Implementation
396
auto elementTagMapping =
397
owningPrinter.interopContext.getIrABIDetails().getEnumTagMapping(ED);
398
399
+ if (elementTagMapping.empty()) {
400
+ os << "\n";
401
+ return;
402
+ }
403
+
404
os << " enum class cases {\n";
405
for (const auto &pair : elementTagMapping) {
406
os << " ";
@@ -404,11 +409,6 @@ class DeclAndTypePrinter::Implementation
409
}
410
os << " };\n"; // enum class cases' closing bracket
411
407
- if (elementTagMapping.empty()) {
408
- os << "\n";
- return;
- }
-
412
// Printing operator cases()
413
os << " inline operator cases() const {\n";
414
os << " switch (_getEnumTag()) {\n";
0 commit comments