Ignore -Wnon-virtual-dtor for static struct.

This commit is contained in:
John Soo 2022-04-21 10:02:05 -07:00
parent 2871c7a3f4
commit 0e0c6c44d0
No known key found for this signature in database
GPG key ID: D8A148F8CE4DDBC2

View file

@ -31,6 +31,9 @@ using namespace nix;
typedef enum { evalAuto, evalImpure, evalPure } pureEval;
// Safe to ignore - the args will be static.
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
struct MyArgs : MixEvalArgs, MixCommonArgs
{
Path releaseExpr;
@ -113,6 +116,8 @@ struct MyArgs : MixEvalArgs, MixCommonArgs
expectArg("expr", &releaseExpr);
}
};
#pragma GCC diagnostic warning "-Wnon-virtual-dtor"
#pragma clang diagnostic warning "-Wnon-virtual-dtor"
static MyArgs myArgs;