clang: include/clang/AST/PrettyPrinter.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_CLANG_AST_PRETTYPRINTER_H

14#define LLVM_CLANG_AST_PRETTYPRINTER_H

15

18

20

21class DeclContext;

22class LangOptions;

23class Stmt;

24

26public:

29};

30

31

33protected:

35

36public:

37

39 return std::string(Path);

40 }

41

42

43

44

45

46

47

48

50};

51

52

53

54

55

56

59

60

83

84

85

86

87

92 }

93

94

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111 LLVM_PREFERRED_TYPE(bool)

113

114

115

116

117

118

119

120

121

122 LLVM_PREFERRED_TYPE(bool)

124

125

126

127

128

129

130

131

132

133 LLVM_PREFERRED_TYPE(bool)

135

136

137 LLVM_PREFERRED_TYPE(bool)

139

140

141

142 LLVM_PREFERRED_TYPE(bool)

144

145

146

147

148

149

152

153

154

155 LLVM_PREFERRED_TYPE(bool)

157

158

159

160

161

162

163

164

165

166

167

168

169 LLVM_PREFERRED_TYPE(bool)

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188 LLVM_PREFERRED_TYPE(bool)

190

191

192

193

194 LLVM_PREFERRED_TYPE(bool)

196

197

198 LLVM_PREFERRED_TYPE(bool)

200

201

202 LLVM_PREFERRED_TYPE(bool)

204

205

206

207 LLVM_PREFERRED_TYPE(bool)

209

210

211

212 LLVM_PREFERRED_TYPE(bool)

214

215

216

217 LLVM_PREFERRED_TYPE(bool)

219

220

221

222 LLVM_PREFERRED_TYPE(bool)

224

225

226 LLVM_PREFERRED_TYPE(bool)

228

229

230 LLVM_PREFERRED_TYPE(bool)

232

233

234 LLVM_PREFERRED_TYPE(bool)

236

237

238 LLVM_PREFERRED_TYPE(bool)

240

241

242

243 LLVM_PREFERRED_TYPE(bool)

245

246

247

248 LLVM_PREFERRED_TYPE(bool)

250

251

252

253

254

255

256 LLVM_PREFERRED_TYPE(bool)

258

259

260

261

262 LLVM_PREFERRED_TYPE(bool)

264

265

266

267 LLVM_PREFERRED_TYPE(bool)

269

270

271

272 LLVM_PREFERRED_TYPE(bool)

274

275

276 LLVM_PREFERRED_TYPE(bool)

278

279

280

281

282 LLVM_PREFERRED_TYPE(bool)

284

285

286

287

288

289

290

291

292

293

294

295

296

297

298

299

300

301 LLVM_PREFERRED_TYPE(bool)

303

304

305 LLVM_PREFERRED_TYPE(bool)

307

308

309

310 LLVM_PREFERRED_TYPE(bool)

312

313

314 LLVM_PREFERRED_TYPE(bool)

316

317

318

319

320 LLVM_PREFERRED_TYPE(bool)

322

323

324

325 LLVM_PREFERRED_TYPE(bool)

327

328

329

330 LLVM_PREFERRED_TYPE(bool)

332

333

334

335

336 LLVM_PREFERRED_TYPE(bool)

338

339

340

341 LLVM_PREFERRED_TYPE(bool)

343

344

345

346 LLVM_PREFERRED_TYPE(bool)

348

349

350

351 LLVM_PREFERRED_TYPE(bool)

353

354

356};

357

358}

359

360#endif

Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.

Defines the clang::LangOptions interface.

DeclContext - This is used only as base class of specific decl types that can act as declaration cont...

Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...

virtual bool handledStmt(Stmt *E, raw_ostream &OS)=0

Callbacks to use to customize the behavior of the pretty-printer.

virtual std::string remapPath(StringRef Path) const

Remap a path to a form suitable for printing.

virtual bool isScopeVisible(const DeclContext *DC) const

When printing type to be inserted into code in specific context, this callback can be used to avoid p...

~PrintingCallbacks()=default

Stmt - This represents one statement.

The JSON file list parser is used to communicate input to InstallAPI.

Describes how types, statements, expressions, and declarations should be printed.

unsigned SuppressUnwrittenScope

Suppress printing parts of scope specifiers that are never written, e.g., for anonymous namespaces.

unsigned FullyQualifiedName

When true, print the fully qualified name of function declarations.

unsigned MSVCFormatting

Use whitespace and punctuation like MSVC does.

unsigned SuppressDefaultTemplateArgs

When true, attempt to suppress template arguments that match the default argument for the parameter.

unsigned SplitTemplateClosers

Whether nested templates must be closed like 'a<b >' rather than 'a<b>'.

unsigned PrintCanonicalTypes

Whether to print types as written or canonically.

unsigned PolishForDeclaration

When true, do certain refinement needed for producing proper declaration tag; such as,...

unsigned PrintInjectedClassNameWithArguments

Whether to print an InjectedClassNameType with template arguments or as written.

void adjustForCPlusPlus()

Adjust this printing policy for cases where it's known that we're printing C++ code (for instance,...

unsigned UseVoidForZeroParams

Whether we should use '(void)' rather than '()' for a function prototype with zero parameters.

unsigned Alignof

Whether we can use 'alignof' rather than '__alignof'.

unsigned AnonymousTagLocations

When printing an anonymous tag name, also print the location of that entity (e.g.,...

unsigned SuppressElaboration

Ignore qualifiers and tag keywords as specified by elaborated type sugar, instead letting the underly...

unsigned CleanUglifiedParameters

Whether to strip underscores when printing reserved parameter names.

unsigned SuppressSpecifiers

Whether we should suppress printing of the actual specifiers for the given type or declaration.

unsigned Nullptr

Whether we should use 'nullptr' rather than '0' as a null pointer constant.

unsigned ConstantArraySizeAsWritten

Whether we should print the sizes of constant array expressions as written in the sources.

unsigned SuppressTagKeyword

Whether type printing should skip printing the tag keyword.

unsigned AlwaysIncludeTypeForTemplateArgument

Whether to use type suffixes (eg: 1U) on integral non-type template parameters.

unsigned Bool

Whether we can use 'bool' rather than '_Bool' (even if the language doesn't actually have 'bool',...

unsigned UsePreferredNames

Whether to use C++ template preferred_name attributes when printing templates.

unsigned SuppressStrongLifetime

When true, suppress printing of the __strong lifetime qualifier in ARC.

SuppressInlineNamespaceMode

unsigned Restrict

Whether we can use 'restrict' rather than '__restrict'.

unsigned UseEnumerators

Whether to print enumerator non-type template parameters with a matching enumerator name or via cast ...

unsigned UseHLSLTypes

Whether or not we're printing known HLSL code and should print HLSL sugared types when possible.

unsigned NullptrTypeInNamespace

Whether 'nullptr_t' is in namespace 'std' or not.

unsigned SuppressInlineNamespace

Suppress printing parts of scope specifiers that correspond to inline namespaces.

unsigned SuppressScope

Suppresses printing of scope specifiers.

unsigned EntireContentsOfLargeArray

Whether to print the entire array initializers, especially on non-type template parameters,...

const PrintingCallbacks * Callbacks

Callbacks to use to allow the behavior of printing to be customized.

unsigned ConstantsAsWritten

Whether we should print the constant expressions as written in the sources.

unsigned IncludeNewlines

When true, include newlines after statements like "break", etc.

unsigned Indentation

The number of spaces to use to indent each line.

unsigned Half

When true, print the half-precision floating-point type as 'half' instead of '__fp16'.

PrintingPolicy(const LangOptions &LO)

Create a default printing policy for the specified language.

unsigned SuppressInitializers

Suppress printing of variable initializers.

unsigned IncludeTagDefinition

When true, include the body of a tag definition.

unsigned TerseOutput

Provide a 'terse' output.

unsigned SuppressTemplateArgsInCXXConstructors

When true, suppresses printing template arguments in names of C++ constructors.

unsigned UnderscoreAlignof

Whether we can use '_Alignof' rather than '__alignof'.

unsigned MSWChar

When true, print the built-in wchar_t type as __wchar_t.

unsigned SuppressImplicitBase

When true, don't print the implicit 'self' or 'this' expressions.

unsigned SuppressLifetimeQualifiers

When true, suppress printing of lifetime qualifier in ARC.