I want to write unit tests for a patch that I am working on, but I have a problem that I do not understand. I guess it boils down to that I don’t understand the behavior of clang -cc1 -verify
. I tried to look at the options that the compiler driver passes to clang -cc1
with the toilet brush. When I call clang <other options>
I get the expected warnings, but with clang -Xclang -verify <other options>
I do not get the expected warnings. In the list of arguments passed onto clang -cc1
, the only option that changes is that -verify
is appended to the list. Does -verify
fundamentally change the behavior of the clang frontend? Does it make clang skip some steps of the compilation flow?
PS I print the warnings from CodeGen.