diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-09-27 22:38:19 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-09-27 22:38:19 +0000 |
commit | 30c42404202d2e2512e51efc6066bd614cfdb5a4 (patch) | |
tree | 5ac5699fb4d6d06231673b2e9a4887e4870684fb /include/clang/AST/PrettyPrinter.h | |
parent | 3240fe3b715327c8fda6f5a3bc8a092b1fce82a7 (diff) |
When 'bool' is not a built-in type but is defined as a macro, print
'bool' rather than '_Bool' within types, to make things a bit more
readable. Fixes <rdar://problem/10063263>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140650 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/PrettyPrinter.h')
-rw-r--r-- | include/clang/AST/PrettyPrinter.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/clang/AST/PrettyPrinter.h b/include/clang/AST/PrettyPrinter.h index ae56671d90..6df99659d6 100644 --- a/include/clang/AST/PrettyPrinter.h +++ b/include/clang/AST/PrettyPrinter.h @@ -38,7 +38,8 @@ struct PrintingPolicy { SuppressTagKeyword(false), SuppressTag(false), SuppressScope(false), SuppressInitializers(false), Dump(false), ConstantArraySizeAsWritten(false), - AnonymousTagLocations(true), SuppressStrongLifetime(false) { } + AnonymousTagLocations(true), SuppressStrongLifetime(false), + Bool(LO.Bool) { } /// \brief The number of spaces to use to indent each line. unsigned Indentation : 8; @@ -130,6 +131,10 @@ struct PrintingPolicy { /// \brief When true, suppress printing of the __strong lifetime qualifier in /// ARC. unsigned SuppressStrongLifetime : 1; + + /// \brief Whether we can use 'bool' rather than '_Bool', even if the language + /// doesn't actually have 'bool' (because, e.g., it is defined as a macro). + unsigned Bool : 1; }; } // end namespace clang |