File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -199,10 +199,10 @@ void IncludeModernizePPCallbacks::InclusionDirective(
199199 // 2. Insert `using namespace std;` to the beginning of TU.
200200 // 3. Do nothing and let the user deal with the migration himself.
201201 SourceLocation DiagLoc = FilenameRange.getBegin ();
202- if (CStyledHeaderToCxx.count (FileName) != 0 ) {
203- IncludesToBeProcessed. emplace_back (
204- IncludeMarker{CStyledHeaderToCxx[FileName], FileName,
205- FilenameRange.getAsRange (), DiagLoc});
202+ if (auto It = CStyledHeaderToCxx.find (FileName);
203+ It != CStyledHeaderToCxx. end ()) {
204+ IncludesToBeProcessed. emplace_back ( IncludeMarker{
205+ It-> second , FileName, FilenameRange.getAsRange (), DiagLoc});
206206 } else if (DeleteHeaders.count (FileName) != 0 ) {
207207 IncludesToBeProcessed.emplace_back (
208208 // NOLINTNEXTLINE(modernize-use-emplace) - false-positive
You can’t perform that action at this time.
0 commit comments