Open llvmbot opened 6 years ago
Sounds like -save-temps should pre-process with -frewrite-includes.
Maybe - but users could have pipelines using save-temps expecting a fully preprocessed file.
Maybe we could produce a foo.included.cpp file or something as well as foo.ii, foo.bc, and foo.s
Sounds like -save-temps should pre-process with -frewrite-includes.
Extended Description
Building the above code with -Wall -Wextra -Werror -O2 -g -fno-exceptions -o test.o -c test.cc
emits no warnings
however, with: -Wall -Wextra -Werror -O2 -g -save-temps -fno-exceptions -o test.o -c test.cc
We get: test.cc:16:101: error: '&' within '|' [-Werror,-Wbitwise-op-parentheses] if ((dbg_buffer[i] & ~(0xFFFF)) == (uint32)(((uint32)0xC1 << 24) | (((module_id) & 0xFF) << 16) & ~(0xFFFF))) ~
~~~~~~~^~~~~ test.cc:16:101: note: place parentheses around the '&' expression to silence this warning if ((dbg_buffer[i] & ~(0xFFFF)) == (uint32)(((uint32)0xC1 << 24) | (((module_id) & 0xFF) << 16) & ~(0xFFFF))) ^ ( )When looking into this further I noticed that in the case of -save-temps the sourceLocation for the expression is not being considered as a macro.