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 432328e commit 76b999dCopy full SHA for 76b999d
clang-tools-extra/clang-tidy/utils/HeaderGuard.cpp
@@ -88,11 +88,10 @@ class HeaderGuardPPCallbacks : public PPCallbacks {
88
continue;
89
90
// Look up Locations for this guard.
91
- SourceLocation Ifndef =
92
- Ifndefs[MacroEntry.first.getIdentifierInfo()].second;
+ const auto &Locs = Ifndefs[MacroEntry.first.getIdentifierInfo()];
+ SourceLocation Ifndef = Locs.second;
93
SourceLocation Define = MacroEntry.first.getLocation();
94
- SourceLocation EndIf =
95
- EndIfs[Ifndefs[MacroEntry.first.getIdentifierInfo()].first];
+ SourceLocation EndIf = EndIfs[Locs.first];
96
97
// If the macro Name is not equal to what we can compute, correct it in
98
// the #ifndef and #define.
0 commit comments