Preprocessor output

Viewed 63257

How do I view the output produced by the C pre-processor, prior to its conversion into an object file?

I want to see what the MACRO definitions do to my code.

6 Answers

If using CLion by Jetbrains, you can use the action "clangd: Preprocess current TU"

So hit shift shift and start typing clangd...

action popup

Best assign it to a shortcut for simpler reuse in preferences->keymap:

enter image description here

Shout out to marcosbento

PS: TU means 'translation unit' (see here LLVM translation unit)

Related