[Bf-blender-cvs] [7851534] master: disable ARRAY_SIZE fixed length check for Clang

Campbell Barton noreply at git.blender.org
Tue Apr 28 17:38:24 CEST 2015


Commit: 7851534541b02a05b8b647be01c726373185f758
Author: Campbell Barton
Date:   Wed Apr 29 01:36:14 2015 +1000
Branches: master
https://developer.blender.org/rB7851534541b02a05b8b647be01c726373185f758

disable ARRAY_SIZE fixed length check for Clang

===================================================================

M	source/blender/blenlib/BLI_utildefines.h

===================================================================

diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h
index d817aa9..8f2f906 100644
--- a/source/blender/blenlib/BLI_utildefines.h
+++ b/source/blender/blenlib/BLI_utildefines.h
@@ -435,7 +435,7 @@ extern "C" {
 	} (void)0
 
 /* assuming a static array */
-#if defined(__GNUC__) && !defined(__cplusplus)
+#if defined(__GNUC__) && !defined(__cplusplus) && !defined(__clang__)
 #  define ARRAY_SIZE(arr) \
 	((sizeof(struct {int isnt_array : ((const void *)&(arr) == &(arr)[0]);}) * 0) + \
 	 (sizeof(arr) / sizeof(*(arr))))




More information about the Bf-blender-cvs mailing list