[infer] Parse unsigned short (uint16_t) as IUShort

Reviewed By: mbouaziz

Differential Revision: D5300702

fbshipit-source-id: 645d8b6
master
Sungkeun Cho 8 years ago committed by Facebook Github Bot
parent 2d1a8f4940
commit f8b8dd1abb

@ -35,7 +35,7 @@ let type_desc_of_builtin_type_kind builtin_type_kind =
| `WChar_S
| `Char16
| `Char32 -> Typ.Tint IChar
| `UShort
| `UShort -> Typ.Tint IUShort
| `Short -> Typ.Tint IShort
| `UInt
| `UInt128 -> Typ.Tint IUInt

@ -6,6 +6,7 @@
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#include <stdint.h>
void modulo_signed_Bad(int i) {
char arr[5];
@ -44,6 +45,11 @@ void modulo_unsigned_Good(unsigned int i) {
arr[i % 5] = 123;
}
void modulo_unsigned_short_Good(uint16_t i) {
char arr[5];
arr[i % 5] = 123;
}
void modulo_signed_var_Bad_FN(unsigned int len, int i) {
char arr[len];
arr[i % len] = 123;

Loading…
Cancel
Save