File tree Expand file tree Collapse file tree 2 files changed +17
-12
lines changed
Expand file tree Collapse file tree 2 files changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -358,6 +358,21 @@ getFixIt(const tooling::Diagnostic &Diagnostic, bool AnyFix) {
358358
359359} // namespace clang::tidy
360360
361+ void ClangTidyDiagnosticConsumer::BeginSourceFile (const LangOptions &LangOpts,
362+ const Preprocessor *PP) {
363+ DiagnosticConsumer::BeginSourceFile (LangOpts, PP);
364+
365+ assert (!InSourceFile);
366+ InSourceFile = true ;
367+ }
368+
369+ void ClangTidyDiagnosticConsumer::EndSourceFile () {
370+ assert (InSourceFile);
371+ InSourceFile = false ;
372+
373+ DiagnosticConsumer::EndSourceFile ();
374+ }
375+
361376void ClangTidyDiagnosticConsumer::HandleDiagnostic (
362377 DiagnosticsEngine::Level DiagLevel, const Diagnostic &Info) {
363378 // A diagnostic should not be reported outside of a
Original file line number Diff line number Diff line change @@ -293,19 +293,9 @@ class ClangTidyDiagnosticConsumer : public DiagnosticConsumer {
293293 const Diagnostic &Info) override ;
294294
295295 void BeginSourceFile (const LangOptions &LangOpts,
296- const Preprocessor *PP = nullptr ) override {
297- DiagnosticConsumer::BeginSourceFile (LangOpts, PP);
296+ const Preprocessor *PP = nullptr ) override ;
298297
299- assert (!InSourceFile);
300- InSourceFile = true ;
301- }
302-
303- void EndSourceFile () override {
304- assert (InSourceFile);
305- InSourceFile = false ;
306-
307- DiagnosticConsumer::EndSourceFile ();
308- }
298+ void EndSourceFile () override ;
309299
310300 // Retrieve the diagnostics that were captured.
311301 std::vector<ClangTidyError> take ();
You can’t perform that action at this time.
0 commit comments