14 #ifndef LLVM_CLANG_AST_PRETTYPRINTER_H 15 #define LLVM_CLANG_AST_PRETTYPRINTER_H 41 : Indentation(2), SuppressSpecifiers(
false),
43 IncludeTagDefinition(
false), SuppressScope(
false),
44 SuppressUnwrittenScope(
false), SuppressInitializers(
false),
45 ConstantArraySizeAsWritten(
false), AnonymousTagLocations(
true),
46 SuppressStrongLifetime(
false), SuppressLifetimeQualifiers(
false),
47 SuppressTemplateArgsInCXXConstructors(
false),
51 TerseOutput(
false), PolishForDeclaration(
false),
52 Half(LO.Half), MSWChar(LO.MicrosoftExt && !LO.WChar),
53 IncludeNewlines(
true), MSVCFormatting(
false),
54 ConstantsAsWritten(
false), SuppressImplicitBase(
false),
55 FullyQualifiedName(
false) { }
62 SuppressTagKeyword =
true;
64 UseVoidForZeroParams =
false;
PrintingPolicy(const LangOptions &LO)
Create a default printing policy for the specified language.
Stmt - This represents one statement.
unsigned MSWChar
When true, print the built-in wchar_t type as __wchar_t.
Describes how types, statements, expressions, and declarations should be printed. ...
unsigned TerseOutput
Provide a 'terse' output.
unsigned SuppressLifetimeQualifiers
When true, suppress printing of lifetime qualifier in ARC.
bool SuppressInitializers
Suppress printing of variable initializers.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
unsigned SuppressStrongLifetime
When true, suppress printing of the __strong lifetime qualifier in ARC.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
bool SuppressScope
Suppresses printing of scope specifiers.
unsigned UseVoidForZeroParams
Whether we should use '(void)' rather than '()' for a function prototype with zero parameters...
unsigned Half
When true, print the half-precision floating-point type as 'half' instead of '__fp16'.
unsigned SuppressTemplateArgsInCXXConstructors
When true, suppresses printing template arguments in names of C++ constructors.
Defines the clang::LangOptions interface.
bool IncludeTagDefinition
When true, include the body of a tag definition.
virtual bool handledStmt(Stmt *E, raw_ostream &OS)=0
unsigned Restrict
Whether we can use 'restrict' rather than '__restrict'.
unsigned Bool
Whether we can use 'bool' rather than '_Bool' (even if the language doesn't actually have 'bool'...
unsigned Indentation
The number of spaces to use to indent each line.
unsigned UnderscoreAlignof
Whether we can use '_Alignof' rather than '__alignof'.
bool SuppressSpecifiers
Whether we should suppress printing of the actual specifiers for the given type or declaration...
bool SuppressTagKeyword
Whether type printing should skip printing the tag keyword.
bool FullyQualifiedName
When true, print the fully qualified name of function declarations.
Dataflow Directional Tag Classes.
void adjustForCPlusPlus()
Adjust this printing policy for cases where it's known that we're printing C++ code (for instance...
bool SuppressImplicitBase
When true, don't print the implicit 'self' or 'this' expressions.
bool SuppressUnwrittenScope
Suppress printing parts of scope specifiers that don't need to be written, e.g., for inline or anonym...
bool ConstantArraySizeAsWritten
Whether we should print the sizes of constant array expressions as written in the sources...
unsigned Alignof
Whether we can use 'alignof' rather than '__alignof'.
bool ConstantsAsWritten
Whether we should print the constant expressions as written in the sources.
bool AnonymousTagLocations
When printing an anonymous tag name, also print the location of that entity (e.g., "enum <anonymous at t.h:10:5>").
unsigned IncludeNewlines
When true, include newlines after statements like "break", etc.
bool MSVCFormatting
Use whitespace and punctuation like MSVC does.
unsigned PolishForDeclaration
When true, do certain refinement needed for producing proper declaration tag; such as...