Is is possible to disable this warning in clang? warning: #pragma once in main file

kylawl picture kylawl · May 24, 2013 · Viewed 17.9k times · Source

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?

Answer

W1M0R picture W1M0R · Mar 10, 2016

Use the -Wno-pragma-once-outside-header command line argument. Consult the Clang documentation here.