Skip to content

Commit afb074f

Browse files
committed
meshletcodec: Fix clang-cl build warning
clang-cl pretends that it's MSVC by defining _MSC_VER but does not support msvc::flatten, resulting in a build warning and in a potential codegen regression. It does support __attribute__((flatten)) so simply make the MSVC detection more precise here.
1 parent 9e2c925 commit afb074f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/meshletcodec.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#define SIMD_NEON
3131
#endif
3232

33-
#if defined(_MSC_VER) && _MSC_VER > 1930
33+
#if defined(_MSC_VER) && !defined(__clang__) && _MSC_VER > 1930
3434
#define SIMD_FLATTEN [[msvc::flatten]]
3535
#elif defined(__GNUC__) || defined(__clang__)
3636
#define SIMD_FLATTEN __attribute__((flatten))

0 commit comments

Comments
 (0)