Understanding Behavior of `clang -cc1 -verify`

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.

-verify is used to check that Clang outputs expected diagnostics at expected source locations. When enabled, you’d get a report from VerifyDiagnosticConsumer in stdout instead of normal diagnostics. Documentation is available here

Thanks a lot! I think my problem may be related to that the -verify flag is not passed to the offloading toolchain but only to the host toolchain. Maybe I am just looking for a way to pass -verify only to the offloading toolchain.