14 #ifndef LLVM_CLANG_AST_PRETTYPRINTER_H 15 #define LLVM_CLANG_AST_PRETTYPRINTER_H 41 : Indentation(2), SuppressSpecifiers(
false),
43 SuppressScope(
false), SuppressUnwrittenScope(
false),
44 SuppressInitializers(
false), ConstantArraySizeAsWritten(
false),
45 AnonymousTagLocations(
true), SuppressStrongLifetime(
false),
46 SuppressLifetimeQualifiers(
false),
50 PolishForDeclaration(
false), Half(LO.Half),
51 MSWChar(LO.MicrosoftExt && !LO.WChar), IncludeNewlines(
true),
52 MSVCFormatting(
false), ConstantsAsWritten(
false),
53 SuppressImplicitBase(
false), FullyQualifiedName(
false),
54 RemapFilePaths(
false), PrintCanonicalTypes(
false) {}
61 SuppressTagKeyword =
true;
63 UseVoidForZeroParams =
false;
PrintingPolicy(const LangOptions &LO)
Create a default printing policy for the specified language.
unsigned SuppressInitializers
Suppress printing of variable initializers.
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.
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...
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 PrintCanonicalTypes
Whether to print types as written or canonically.
unsigned IncludeTagDefinition
When true, include the body of a tag definition.
unsigned SuppressTemplateArgsInCXXConstructors
When true, suppresses printing template arguments in names of C++ constructors.
unsigned MSVCFormatting
Use whitespace and punctuation like MSVC does.
unsigned SuppressImplicitBase
When true, don't print the implicit 'self' or 'this' expressions.
unsigned SuppressTagKeyword
Whether type printing should skip printing the tag keyword.
Defines the clang::LangOptions interface.
virtual bool handledStmt(Stmt *E, raw_ostream &OS)=0
unsigned ConstantArraySizeAsWritten
Whether we should print the sizes of constant array expressions as written in the sources...
unsigned SuppressSpecifiers
Whether we should suppress printing of the actual specifiers for the given type or declaration...
unsigned Restrict
Whether we can use 'restrict' rather than '__restrict'.
unsigned AnonymousTagLocations
When printing an anonymous tag name, also print the location of that entity (e.g., "enum <anonymous at t.h:10:5>").
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 ConstantsAsWritten
Whether we should print the constant expressions as written in the sources.
unsigned UnderscoreAlignof
Whether we can use '_Alignof' rather than '__alignof'.
unsigned SuppressScope
Suppresses printing of scope specifiers.
unsigned SuppressUnwrittenScope
Suppress printing parts of scope specifiers that don't need to be written, e.g., for inline or anonym...
unsigned RemapFilePaths
Whether to apply -fdebug-prefix-map to any file paths.
Dataflow Directional Tag Classes.
void adjustForCPlusPlus()
Adjust this printing policy for cases where it's known that we're printing C++ code (for instance...
unsigned Alignof
Whether we can use 'alignof' rather than '__alignof'.
std::function< std::string(StringRef)> remapPath
When RemapFilePaths is true, this function performs the action.
unsigned FullyQualifiedName
When true, print the fully qualified name of function declarations.
unsigned IncludeNewlines
When true, include newlines after statements like "break", etc.
unsigned PolishForDeclaration
When true, do certain refinement needed for producing proper declaration tag; such as...