ROOT
master
Reference Guide
Loading...
Searching...
No Matches
TClingDiagnostics.cxx
Go to the documentation of this file.
1
// @(#)root/core/metacling:$Id$
2
// Author: Javier Lopez-Gomez 16/07/2021
3
4
/*************************************************************************
5
* Copyright (C) 1995-2021, Rene Brun and Fons Rademakers. *
6
* All rights reserved. *
7
* *
8
* For the licensing terms see $ROOTSYS/LICENSE. *
9
* For the list of contributors see $ROOTSYS/README/CREDITS. *
10
*************************************************************************/
11
12
#include "
TClingDiagnostics.h
"
13
14
TClingDelegateDiagnosticPrinter::TClingDelegateDiagnosticPrinter
15
(clang::DiagnosticOptions *
DiagOpts
, clang::LangOptions &
LangOpts
, handler_t
fn
)
16
: TextDiagnosticPrinter(fOS,
DiagOpts
), fOS(fOS_out), fHandler(
fn
)
17
{
18
// Required to initialize the internal `clang::TextDiagnostic` instance.
19
TextDiagnosticPrinter::BeginSourceFile(
LangOpts
,
nullptr
);
20
}
21
22
void
23
TClingDelegateDiagnosticPrinter::HandleDiagnostic
(clang::DiagnosticsEngine::Level Level,
24
const
clang::Diagnostic &
Info
)
25
{
26
fOS_out
.clear();
27
TextDiagnosticPrinter::HandleDiagnostic(Level,
Info
);
28
fHandler
(Level,
fOS
.str());
29
}
TClingDiagnostics.h
ROOT::Detail::TRangeCast
Definition
TCollection.h:311
TClingDelegateDiagnosticPrinter::HandleDiagnostic
void HandleDiagnostic(clang::DiagnosticsEngine::Level Level, const clang::Diagnostic &Info) override
Definition
TClingDiagnostics.cxx:23
TClingDelegateDiagnosticPrinter::fOS
llvm::raw_string_ostream fOS
Definition
TClingDiagnostics.h:33
TClingDelegateDiagnosticPrinter::TClingDelegateDiagnosticPrinter
TClingDelegateDiagnosticPrinter(clang::DiagnosticOptions *DiagOpts, clang::LangOptions &LangOpts, handler_t fn)
Definition
TClingDiagnostics.cxx:15
TClingDelegateDiagnosticPrinter::fHandler
handler_t fHandler
Definition
TClingDiagnostics.h:34
TClingDelegateDiagnosticPrinter::fOS_out
std::string fOS_out
Definition
TClingDiagnostics.h:32
Info
std::ostream & Info()
Definition
hadd.cxx:163
core
metacling
src
TClingDiagnostics.cxx
ROOT master - Reference Guide Generated on Fri Jan 24 2025 04:36:40 (GVA Time) using Doxygen 1.10.0