File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -40,11 +40,12 @@ struct Designators {
40
40
assert (InitList->isSyntacticForm ());
41
41
};
42
42
43
- unsigned size () { return get ().size (); }
43
+ unsigned size () { return getCached ().size (); }
44
44
45
45
std::optional<llvm::StringRef> operator [](const SourceLocation &Location) {
46
- const auto Result = get ().find (Location);
47
- if (Result == get ().end ())
46
+ const auto Designators = getCached ();
47
+ const auto Result = Designators.find (Location);
48
+ if (Result == Designators.end ())
48
49
return {};
49
50
return Result->getSecond ();
50
51
}
@@ -55,7 +56,7 @@ struct Designators {
55
56
std::optional<LocationToNameMap> CachedDesignators;
56
57
const InitListExpr *InitList;
57
58
58
- LocationToNameMap &get () {
59
+ LocationToNameMap &getCached () {
59
60
return CachedDesignators ? *CachedDesignators
60
61
: CachedDesignators.emplace (
61
62
utils::getUnwrittenDesignators (InitList));
You can’t perform that action at this time.
0 commit comments