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 23a823a commit 0dcd813Copy full SHA for 0dcd813
include/swift/Reflection/Records.h
@@ -57,7 +57,9 @@ class FieldRecord {
57
}
58
59
std::string getFieldName() const {
60
- return FieldName.get();
+ if (FieldName)
61
+ return FieldName.get();
62
+ return "";
63
64
65
bool isObjC() const {
include/swift/Reflection/ReflectionContext.h
@@ -573,7 +573,10 @@ class ReflectionContext {
573
if (!Unsubstituted)
574
return {};
575
auto Substituted = Unsubstituted->subst(*this, Subs);
576
- Fields.push_back({Field.getFieldName(), Substituted});
+ auto FieldName = Field.getFieldName();
577
+ if (FieldName.empty())
578
+ FieldName = "<Redacted Field Name>";
579
+ Fields.push_back({FieldName, Substituted});
580
581
582
0 commit comments