[PATCH] D19085: [clang-analyzer] fix warnings emitted on compiler-rt code base
George Burgess IV via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 14 11:43:33 PDT 2016
george.burgess.iv added a comment.
You're right that the code isn't trying to allocate an array of arrays, and I agree that `sizeof(emutls_address_array)` looks misleading. However, `sizeof(emutls_address_array)` should be equal to `sizeof(void *)`, so the generated code should be identical.
That said, maybe we can placate the static analyzer if we make the new sizes `new_size * sizeof(void*) + sizeof(emutls_address_array)`? If that works, it's probably the cleanest solution.
> Just for my own information, since I'm new to compiler technology and LLVM, is this file processed as C or C++ code ?
Given that it has a .c extension, I'd say it's C. If you'd like to check this in the future, just throw `namespace {}` in the file and recompile. If it compiles, the compiler thinks it's C++. :)
http://reviews.llvm.org/D19085
More information about the llvm-commits
mailing list