FLANG
Toggle main menu visibility
Main Page
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Variables
Typedefs
Enumerations
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
Typedefs
Enumerations
Related Functions
Files
File List
File Members
All
Macros
include
flang
Frontend
TextDiagnosticPrinter.h
1
//===--- TextDiagnosticPrinter.h - Text Diagnostic Client -------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// This is a concrete diagnostic client. In terminals that support it, the
10
// diagnostics are pretty-printed (colors + bold). The printing/flushing
11
// happens in HandleDiagnostics (usually called at the point when the
12
// diagnostic is generated).
13
//
14
//===----------------------------------------------------------------------===//
15
//
16
// Coding style: https://mlir.llvm.org/getting_started/DeveloperGuide/
17
//
18
//===----------------------------------------------------------------------===//
19
20
#ifndef FORTRAN_FRONTEND_TEXTDIAGNOSTICPRINTER_H
21
#define FORTRAN_FRONTEND_TEXTDIAGNOSTICPRINTER_H
22
23
#include "clang/Basic/Diagnostic.h"
24
#include "llvm/ADT/IntrusiveRefCntPtr.h"
25
#include "llvm/Support/raw_ostream.h"
26
27
namespace
clang {
28
class
DiagnosticOptions;
29
class
DiagnosticsEngine;
30
}
// namespace clang
31
32
using
llvm::IntrusiveRefCntPtr;
33
using
llvm::raw_ostream;
34
35
namespace
Fortran::frontend {
36
class
TextDiagnostic;
37
38
class
TextDiagnosticPrinter
:
public
clang::DiagnosticConsumer {
39
raw_ostream &os;
40
llvm::IntrusiveRefCntPtr<clang::DiagnosticOptions> diagOpts;
41
43
std::string prefix;
44
45
public
:
46
TextDiagnosticPrinter
(raw_ostream &os, clang::DiagnosticOptions *diags);
47
~TextDiagnosticPrinter
()
override
;
48
51
void
setPrefix
(std::string value) { prefix = std::move(value); }
52
53
void
HandleDiagnostic(clang::DiagnosticsEngine::Level level,
54
const
clang::Diagnostic &info)
override
;
55
56
void
printLocForRemarks(llvm::raw_svector_ostream &diagMessageStream,
57
llvm::StringRef &diagMsg);
58
};
59
60
}
// namespace Fortran::frontend
61
62
#endif
Fortran::frontend::TextDiagnosticPrinter
Definition:
TextDiagnosticPrinter.h:38
Fortran::frontend::TextDiagnosticPrinter::setPrefix
void setPrefix(std::string value)
Definition:
TextDiagnosticPrinter.h:51
Generated on Wed May 14 2025 02:47:21 for FLANG by
1.9.6