You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MacroAnnotations has three std::optional fields.
Functions makeDeprecation, makeRestrictExpansion, and makeFinal
construct an instance of MacroAnnotations with one field initialized
with a non-default value (that is, some value other than
std::nullopt).
Functions addMacroDeprecationMsg, addRestrictExpansionMsg, and
addFinalLoc either create a new map entry with one field initialized
with a non-default value or replaces one field of an existing map
entry.
We can do all this with a simple statement of the form:
AnnotationInfos[II].FieldName = NonDefaultValue;
which takes care of default initialization of the fields with
std::nullopt when a requested map entry does not exist.
0 commit comments