Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Disallow cast from other checked pointer types to nt_array_ptr in checked scopes because the source pointer might not point to a NULL_terminated array. Casting from an unchecked pointer to a nt_array_ptr pointer should also be prohibited; this has already been handled as no unchecked pointers are allowed in checked scopes. Also added a new error message in clang/include/clang/Basic/DiagnosticSemaKinds.td for casting to nt_array_ptr in checked scopes. The test file tests/typechecking/checked_scope_basic.c was updated with a new function test_cast_to_nt_array_ptr to test casting to nt_array_ptr.
- Loading branch information