Closed walbourn closed 5 years ago
-Wc++98-compat -Wc++98-compat-pedantic -Wc++98-compat-local-type-template-args
Even though I have set the C++14 language standard, clang still complains about C++98 compat
-Wcovered-switch-default -Wswitch-enum
DXGI_FORMAT
contains over a 100 enum values. Satisfying these warnings is pointless.
-Wfloat-equal
I get what this is after (i.e. use epsilon comparisions instead), but there are still cases where binary equality is just fine.
-Wgnu-anonymous-struct -Wnested-anon-types
Visual C++ and clang both support these, and without it makes a lot of our structs really tiresome to use.
-Wlanguage-extension-token
This is complaints about __uuidof
which is often used inside the IID_(GRAPHICS_)PPV_ARGS
macro. Again, Visual C++ and clang can use it.
-Wglobal-constructors -Wexit-time-destructors
This is a perf warning, and I don't care where it comes up.
-Wmissing-variable-declarations -Wunused-const-variable
This is about my use of __declspec(any)
for DirectXMath vector constants.
-Wreserved-id-macro
The long-established control macros for DirectXMath trigger this due to the _XM_*
format. Changing that would break existing clients, so I'll ignore this for now.
-Wtautological-type-limit-compare
This is coming up in a few contexts where I'm trying to handle bounds for size_t in x64 vs. x86. The optimizer should just deal.
-Wunknown-pragmas
This is mostly about #pragma prefast(suppress)
. Converting it to #ifdef __PREFAST__ push pop
brackets is an option, but kind of wordy. I'm just supressingit for now.
Fixed -Wmissing-prototypes in this commit
With VS 2019 Update 1 supporting the clang/LLVM toolset, I've formally added CMake files as well as addressed a number of clang warnings.