warning: #pragma once in main file
We're running our headers through clang to get a partial AST.
Is it possible to disable that warning?
Using _Pragma to suppress the warning. Using #pragma to suppress the warning. Using command line options to suppress the warning.
-w is the GCC-wide option to disable warning messages.
To suppress a Clang-Tidy check for a particular line, use the Suppress "check_name" for line option. CLion will add a // NOLINT comment at the end of the selected line.
To disable a set of warnings for a given piece of code, you have to start with a “push” pre-processor instruction, then with a disabling instruction for each of the warning you want to suppress, and finish with a “pop” pre-processor instruction.
Use the -Wno-pragma-once-outside-header
command line argument. Consult the Clang documentation here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With