[PATCH] D45093: [AST] Fix -ast-print for _Bool when have diagnostics
Joel E. Denny via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 30 08:02:14 PDT 2018
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 bool definition.
Problematic diagnostics included suppressed warnings (e.g., add
-Wno-unused-value to the new test case), including those that are
suppressed by default.
This patch fixes this bug and cleans up some related confusing
function names and comments.
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
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaExceptionSpec.cpp
lib/Sema/SemaExprCXX.cpp
lib/Sema/SemaLookup.cpp
lib/Sema/SemaOverload.cpp
lib/Sema/SemaTemplate.cpp
lib/Sema/SemaTemplateInstantiate.cpp
test/Misc/ast-print-bool.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45093.140429.patch
Type: text/x-patch
Size: 13787 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180330/24c43d7c/attachment.bin>
More information about the cfe-commits
mailing list