SQLsmith
v1.2.1-5-gfacd7a8
A random SQL query generator
util.hh
1
#ifndef UTIL_HH
2
#define UTIL_HH
3
#include <typeinfo>
4
#include <string>
5
#include <sstream>
6
7
using namespace
std;
8
9
/* TODO: The strings are implementation-defined. How do they look in
10
clang? */
11
12
inline
std::string pretty_type(
const
char
*raw)
13
{
14
ostringstream os;
15
os << raw;
16
string
s = os.str();
17
while
(s[0] <=
'9'
)
18
s.erase(s.begin());
19
return
s;
20
}
21
22
inline
std::string pretty_type(
struct
prod
*p)
23
{
24
return
pretty_type(
typeid
(*p).name());
25
}
26
27
#endif
prod
Base class for AST nodes.
Definition:
prod.hh:17
Generated by
1.9.1