[PATCH] D45093: [AST] Fix -ast-print for _Bool when have diagnostics

2018-05-14 Thread Joel E. Denny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC332275: [AST] Fix -ast-print for _Bool when have diagnostics (authored by jdenny, committed by ). Changed prior to commit: https://reviews.llvm.org/D45093?vs=145711=146650#toc Repository: rC Clang

[PATCH] D45093: [AST] Fix -ast-print for _Bool when have diagnostics

2018-05-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D45093 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45093: [AST] Fix -ast-print for _Bool when have diagnostics

2018-05-08 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny updated this revision to Diff 145711. jdenny edited the summary of this revision. jdenny added a comment. Made the suggested changes. https://reviews.llvm.org/D45093 Files: include/clang/Sema/Sema.h lib/Frontend/ASTConsumers.cpp lib/Sema/Sema.cpp test/Misc/ast-print-bool.c

[PATCH] D45093: [AST] Fix -ast-print for _Bool when have diagnostics

2018-05-07 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In https://reviews.llvm.org/D45093#1090292, @rsmith wrote: > If you want to force a particular printing policy to be used for > `-ast-print`, I think it would be better to change the `print` call in > `lib/Frontend/ASTConsumers.cpp` to pass your desired printing policy,

[PATCH] D45093: [AST] Fix -ast-print for _Bool when have diagnostics

2018-05-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. If you want to force a particular printing policy to be used for `-ast-print`, I think it would be better to change the `print` call in `lib/Frontend/ASTConsumers.cpp` to pass your desired printing policy, rather than changing other components to prevent them from

[PATCH] D45093: [AST] Fix -ast-print for _Bool when have diagnostics

2018-05-07 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In https://reviews.llvm.org/D45093#1087652, @aaron.ballman wrote: > This approach generally looks good to me, but I'd like @rsmith's opinion on > whether we should be trying to make -ast-print have good source fidelity or > not. I was under the impression we wanted

[PATCH] D45093: [AST] Fix -ast-print for _Bool when have diagnostics

2018-05-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This approach generally looks good to me, but I'd like @rsmith's opinion on whether we should be trying to make -ast-print have good source fidelity or not. I was under the impression we wanted -ast-print to faithfully reproduce code at least as a low priority

[PATCH] D45093: [AST] Fix -ast-print for _Bool when have diagnostics

2018-05-03 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny updated this revision to Diff 145078. jdenny edited the summary of this revision. jdenny added a comment. Rebased. Added example to summary. Ping. https://reviews.llvm.org/D45093 Files: include/clang/AST/ASTContext.h include/clang/Sema/Sema.h lib/Parse/ParseDecl.cpp

[PATCH] D45093: [AST] Fix -ast-print for _Bool when have diagnostics

2018-04-23 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny updated this revision to Diff 143667. jdenny added a comment. Rebased. https://reviews.llvm.org/D45093 Files: include/clang/AST/ASTContext.h include/clang/Sema/Sema.h lib/Parse/ParseDecl.cpp lib/Sema/Sema.cpp lib/Sema/SemaChecking.cpp lib/Sema/SemaCodeComplete.cpp

[PATCH] D45093: [AST] Fix -ast-print for _Bool when have diagnostics

2018-04-16 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny updated this revision to Diff 142662. jdenny added a comment. Rebased onto a more recent master. https://reviews.llvm.org/D45093 Files: include/clang/AST/ASTContext.h include/clang/Sema/Sema.h lib/Parse/ParseDecl.cpp lib/Sema/Sema.cpp lib/Sema/SemaChecking.cpp

[PATCH] D45093: [AST] Fix -ast-print for _Bool when have diagnostics

2018-04-09 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny updated this revision to Diff 141715. jdenny added a comment. Rebased onto a more recent master. https://reviews.llvm.org/D45093 Files: include/clang/AST/ASTContext.h include/clang/Sema/Sema.h lib/Parse/ParseDecl.cpp lib/Sema/Sema.cpp lib/Sema/SemaChecking.cpp

[PATCH] D45093: [AST] Fix -ast-print for _Bool when have diagnostics

2018-03-30 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny created this revision. jdenny added reviewers: rsmith, hfinkel. Diagnostics print _Bool as bool when the latter is defined as the former. However, diagnostics were altering the printing policy for -ast-print as well. The printed source was then invalid because the preprocessor eats the