ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
format.h
Go to the documentation of this file.
1
/*******************************************************************\
2
3
Module: Helper module for formatting text
4
Author: Rafael Sá Menezes, rafael.sa.menezes@outlook.com
5
6
\*******************************************************************/
7
8
#pragma once
9
#include <string>
10
#include <type_traits>
11
#include <
util/base/compiler_defs.h
>
12
13
CC_DIAGNOSTIC_PUSH
()
14
// Clang has no support for nonnull-compare warning
15
#ifdef __GNUC__
16
# ifndef __clang__
// For some reason clang also defines GNUC :)
17
# pragma GCC diagnostic ignored "-Wnonnull-compare"
18
# endif
19
# pragma GCC diagnostic ignored "-Waddress"
20
#endif
21
22
#include <fmt/format.h>
23
CC_DIAGNOSTIC_POP
()
24
25
// fmt::underlying() was introduced in fmt 9.0.0 (FMT_VERSION >= 90000).
26
// Provide a fallback for systems shipping older fmt (e.g. Ubuntu 22.04 / fmt
27
// 8).
28
#if !defined(FMT_VERSION) || FMT_VERSION < 90000
29
namespace
fmt
30
{
31
template
<
typename
Enum>
32
constexpr
auto
underlying
(Enum e) -> std::underlying_type_t<Enum>
33
{
34
return
static_cast<
std::underlying_type_t<Enum>
>
(e);
35
}
36
}
// namespace fmt
37
#endif
38
39
#define ESBMC_FORMATS_START_ASSERTION
40
41
// For more in-depth for how this specialization work look at
42
// https://fmt.dev/latest/api.html#format-api
43
44
#include <
util/message/formats/bigint.h
>
45
#include <
util/message/formats/irep_idt.h
>
46
#include <
util/message/formats/irept.h
>
47
#include <
util/message/formats/exprt.h
>
48
#include <
util/message/formats/typet.h
>
49
#include <
util/message/formats/locationt.h
>
50
#include <
util/message/formats/type2t.h
>
51
#include <
util/message/formats/expr2t.h
>
52
#include <
util/message/formats/symbol.h
>
53
#include <
util/message/formats/side_efect_expr_function_callt.h
>
54
55
#undef ESBMC_FORMATS_START_ASSERTION
CC_DIAGNOSTIC_PUSH
#define CC_DIAGNOSTIC_PUSH()
Definition
OM_compiler_defs.h:5
CC_DIAGNOSTIC_POP
#define CC_DIAGNOSTIC_POP()
Definition
OM_compiler_defs.h:6
bigint.h
compiler_defs.h
expr2t.h
exprt.h
irept.h
locationt.h
irep_idt.h
symbol.h
fmt
Definition
format.h:30
fmt::underlying
constexpr auto underlying(Enum e) -> std::underlying_type_t< Enum >
Definition
format.h:32
side_efect_expr_function_callt.h
type2t.h
typet.h
src
util
message
format.h
Generated by
1.15.0