// Emit warnings for headers that are missing guards.
checkGuardlessHeaders();
-
- // Clear all state.
- Macros.clear();
- Files.clear();
- Ifndefs.clear();
- EndIfs.clear();
+ clearAllState();
}
bool wouldFixEndifComment(StringRef FileName, SourceLocation EndIf,
}
private:
+ void clearAllState() {
+ Macros.clear();
+ Files.clear();
+ Ifndefs.clear();
+ EndIfs.clear();
+ }
+
std::vector<std::pair<Token, const MacroInfo *>> Macros;
llvm::StringMap<const FileEntry *> Files;
std::map<const IdentifierInfo *, std::pair<SourceLocation, SourceLocation>>