As documented in the LLVM Coding Standards, indeed MSVC incorrectly asserts
on this in Debug mode. This happens when building clang with Visual C++ and
-triple i686-pc-windows-gnu on these clang regression tests:
clang/test/CodeGen/2011-03-08-ZeroFieldUnionInitializer.c
clang/test/CodeGen/empty-union-init.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243996
91177308-0d34-0410-b5e6-
96231b3b80d8
getNumElements() != Other->getNumElements())
return false;
- return std::equal(element_begin(), element_end(), Other->element_begin());
+ return element_begin() &&
+ std::equal(element_begin(), element_end(), Other->element_begin());
}
/// getTypeByName - Return the type with the specified name, or null if there