diff --git a/facebook-clang-plugins b/facebook-clang-plugins index 9d03cb460..a77526452 160000 --- a/facebook-clang-plugins +++ b/facebook-clang-plugins @@ -1 +1 @@ -Subproject commit 9d03cb460a30ad02d7b5edfa38f3a1143e642cfe +Subproject commit a77526452b10339b3580d58b02c9c8f534b79589 diff --git a/infer/tests/codetoanalyze/c/errors/null_dereference/null_pointer_dereference.c b/infer/tests/codetoanalyze/c/errors/null_dereference/null_pointer_dereference.c index ae03284a8..55678369f 100644 --- a/infer/tests/codetoanalyze/c/errors/null_dereference/null_pointer_dereference.c +++ b/infer/tests/codetoanalyze/c/errors/null_dereference/null_pointer_dereference.c @@ -129,3 +129,11 @@ void function_call_returns_allocated_pointer() { assign(p, 42); free(p); } + +void sizeof_expr_ok(void) { + struct Person* p = malloc(sizeof *p); + if (p) { + p->age = 42; + } + free(p); +}