How to disable all warnings for a single file using Clang 3.8?

I am using Clang 3.8 to compile one file from another source in a project. This is a temporary crutch, as this file is in addition to the library that I also use, and the code that it has will be part of this next version of the library. However, these people are developing with less stringent warning flags than me.

I am not interested in these warnings, since they are benign, I do not support this file, and it will disappear in a few months. Of course, I can selectively remove a warning or two, but I think that in this case it makes sense to turn off all and all warnings that it generates, because later I could change the warning settings of my project, and more cases could arise from it.

I tried #pragma clang diagnostic ignored "-Weverything", but Clang warns that it -Weverythingis an unknown warning group.

How can I ask Clang not to generate any warnings for this file?

+4
source share
1 answer

, "-Weverything" - , , . , : lib/Basic/Warnings.cpp: 118

- /, :

clang -Wno-everything foo.c

#pragma.

, , , (, undefined , ..).

, , , .

+5
source

All Articles