Page MenuHome

Add clang-cl support to BLI_strict_flags.h
AcceptedPublic

Authored by Joseph Eagar (joeedh) on May 24 2021, 5:51 AM.

Details

Summary

BLI_strict_flags.h lacks support for clang-cl (the version of clang that emulates MSVC's compiler). This patch corrects that. Now you can no longer write code that compiles with clang-cl but not any other compiler.

Diff Detail

Event Timeline

Joseph Eagar (joeedh) requested review of this revision.May 24 2021, 5:51 AM
Joseph Eagar (joeedh) created this revision.
Ray Molenkamp (LazyDodo) requested changes to this revision.EditedMay 24 2021, 7:54 AM

Please do a little better on the patch description, it's somewhat unclear from the code why clang on windows is not handled by the ifdefs right above it like it is for other platforms, a small comment would go a long way here. .

This revision now requires changes to proceed.May 24 2021, 7:54 AM

So, I propose that LazyDodo take a break from reviewing patches until he learns one doesn't lead questions with "please do better on the patch description," one simply asks the damn questions.

Joseph Eagar (joeedh) edited the summary of this revision. (Show Details)May 24 2021, 8:26 AM

Patch looks fine, accepted provisional on the comment being added to clarify why clang on windows was not handled by the codeblock right above it.

source/blender/blenlib/BLI_strict_flags.h
48–61
/* While regular clang defines __GNUC__ and is handled by the code above, clang-cl does not and needs to be handled separately. *.
This revision is now accepted and ready to land.May 24 2021, 5:41 PM

Add requested changes.