Go to file
Joel E. Denny 7bcc21027d [AST] Fix -ast-print for _Bool when have diagnostics
For example, given:

  #define bool _Bool
  _Bool i;
  void fn() { 1; }

-ast-print produced:

  tmp.c:3:13: warning: expression result unused
  void fn() { 1; }
              ^
  bool i;
  void fn() {
      1;
  }

That fails to compile because bool is undefined.

Details:

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 above example), including those that are
suppressed by default.

This patch fixes this bug and cleans up some related comments.

Reviewed by: aaron.ballman, rsmith

Differential Revision: https://reviews.llvm.org/D45093

llvm-svn: 332275
2018-05-14 18:41:44 +00:00
clang [AST] Fix -ast-print for _Bool when have diagnostics 2018-05-14 18:41:44 +00:00
clang-tools-extra [clangd] Add helper for collecting #include directives in file. 2018-05-14 12:19:16 +00:00
compiler-rt [sanitizer] Intercept __pthread_mutex_lock and __pthread_mutex_unlock 2018-05-14 18:03:34 +00:00
debuginfo-tests [Darwin] Specify DWARF 2/4 when running apple accelerator tests. 2018-02-26 20:56:45 +00:00
libclc remquo: Flush denormals if not supported 2018-05-03 05:44:28 +00:00
libcxx [libcxx] [test] Update msvc_stdlib_force_include.hpp. 2018-05-11 23:57:32 +00:00
libcxxabi Fix test failure for missing _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS 2018-05-03 12:44:27 +00:00
libunwind [cmake] Remove duplicate command line options from build 2018-04-05 20:27:50 +00:00
lld COFF: Allow ICFing sections with different alignments. 2018-05-14 18:36:51 +00:00
lldb Revert "Remove Process references from the Host module" 2018-05-14 16:54:53 +00:00
llgo irgen: Create functions instead of global variables for builtin hash and equal algorithms. 2017-06-04 22:11:28 +00:00
llvm [X86] Add NT load/store scheduler classes 2018-05-14 18:37:19 +00:00
openmp [OMPT] Fix thread_num for implicit_task_end callbacks in nested parallel regions 2018-05-07 12:42:21 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly Adjust to debug info metadata format change. 2018-05-10 07:09:10 +00:00
README.md Add an svn project to contain the files that appear at the root of the 2017-10-19 21:09:49 +00:00

README.md

Low Level Virtual Machine (LLVM)

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.