1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5// Make certain warnings always be warnings, even despite -Werror.
6// Rationale: we don't want to suppress those as there are plans to address them (e.g. UE-12341), but breaking builds due to these warnings is very expensive
7// since they cannot be caught by all compilers that we support. They are deemed to be relatively safe to be ignored, at least until all SDKs/toolchains start supporting them.
22#pragma clang diagnostic ignored "-Wunused-function" // This will hide the warnings about static functions in headers that aren't used in every single .cpp file
23#pragma clang diagnostic ignored "-Wswitch" // This hides the "enumeration value 'XXXXX' not handled in switch [-Wswitch]" warnings - we should maybe remove this at some point and add UE_LOG(, Fatal, ) to default cases
24#pragma clang diagnostic ignored "-Wtautological-compare" // This hides the "warning : comparison of unsigned expression < 0 is always false" type warnings due to constant comparisons, which are possible with template arguments
25#pragma clang diagnostic ignored "-Wunused-private-field" // This will prevent the issue of warnings for unused private variables.
26#pragma clang diagnostic ignored "-Winvalid-offsetof" // needed to suppress warnings about using offsetof on non-POD types.
27#pragma clang diagnostic ignored "-Wgnu-string-literal-operator-template" // we use this feature to allow static FNames.
28#pragma clang diagnostic ignored "-Wdeprecated-register" // Needed for Alembic third party lib
29#pragma clang diagnostic ignored "-Winconsistent-missing-override" // too many missing overrides...
30#pragma clang diagnostic ignored "-Wunused-local-typedef" // PhysX has some, hard to remove
56#pragma clang diagnostic ignored "-Wnullability-completeness" // We are not interoperable with Swift so we DON'T care about nullability qualifiers
57#pragma clang diagnostic ignored "-Wnonportable-include-path" // Ideally this one would be set in MacToolChain, but we don't have a way to check the compiler version in there yet