diff --git a/facebook-clang-plugins b/facebook-clang-plugins index 36266f6c8..8587e5208 160000 --- a/facebook-clang-plugins +++ b/facebook-clang-plugins @@ -1 +1 @@ -Subproject commit 36266f6c86041896bed32ffec0637fefbc4463e0 +Subproject commit 8587e5208099b6422438609e15310e3a45ec0886 diff --git a/infer/src/clang/cTrans.ml b/infer/src/clang/cTrans.ml index 248539eb5..c81014b6c 100644 --- a/infer/src/clang/cTrans.ml +++ b/infer/src/clang/cTrans.ml @@ -3353,7 +3353,8 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s | CXXStaticCastExpr (stmt_info, stmt_list, expr_info, cast_kind, _, _) | CXXFunctionalCastExpr (stmt_info, stmt_list, expr_info, cast_kind, _) -> cast_exprs_trans trans_state stmt_info stmt_list expr_info cast_kind - | IntegerLiteral (_, _, expr_info, integer_literal_info) -> + | IntegerLiteral (_, _, expr_info, integer_literal_info) + | OffsetOfExpr (_, _, expr_info, integer_literal_info) -> integerLiteral_trans trans_state expr_info integer_literal_info | StringLiteral (_, _, expr_info, str_list) -> stringLiteral_trans trans_state expr_info (String.concat ~sep:"" str_list) @@ -3484,7 +3485,7 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s booleanValue_trans trans_state expr_info type_trait_info.Clang_ast_t.xtti_value | CXXNoexceptExpr (_, _, expr_info, cxx_noexcept_expr_info) -> booleanValue_trans trans_state expr_info cxx_noexcept_expr_info.Clang_ast_t.xnee_value - | OffsetOfExpr (_, _, expr_info) | VAArgExpr (_, [], expr_info) -> + | VAArgExpr (_, [], expr_info) -> undefined_expr trans_state expr_info | VAArgExpr (stmt_info, stmt :: _, ei) -> va_arg_trans trans_state stmt_info stmt ei diff --git a/infer/tests/codetoanalyze/c/errors/issues.exp b/infer/tests/codetoanalyze/c/errors/issues.exp index c5710237f..24d19d0e1 100644 --- a/infer/tests/codetoanalyze/c/errors/issues.exp +++ b/infer/tests/codetoanalyze/c/errors/issues.exp @@ -100,7 +100,6 @@ codetoanalyze/c/errors/resource_leaks/leak.c, fileNotClosed, 5, RESOURCE_LEAK, n codetoanalyze/c/errors/resource_leaks/leak.c, socketNotClosed, 5, RESOURCE_LEAK, no_bucket codetoanalyze/c/errors/sizeof/sizeof_706.c, sentinel_bad, 0, DIVIDE_BY_ZERO, no_bucket codetoanalyze/c/frontend/enumeration/other_enum.c, other_enum_test, 4, DIVIDE_BY_ZERO, no_bucket -codetoanalyze/c/frontend/offsetof_expr/offsetof_expr.c, test_offsetof_expr, 3, DIVIDE_BY_ZERO, no_bucket codetoanalyze/c/frontend/offsetof_expr/offsetof_expr.c, test_offsetof_expr, 5, DIVIDE_BY_ZERO, no_bucket codetoanalyze/c/frontend/vaarg_expr/vaarg_expr.c, vaarg_foo, 6, DIVIDE_BY_ZERO, no_bucket codetoanalyze/c/frontend/vaarg_expr/vaarg_expr.c, vaarg_foo, 8, DIVIDE_BY_ZERO, no_bucket diff --git a/infer/tests/codetoanalyze/c/frontend/offsetof_expr/offsetof_expr.c.dot b/infer/tests/codetoanalyze/c/frontend/offsetof_expr/offsetof_expr.c.dot index 95d1b481a..63e9122c2 100644 --- a/infer/tests/codetoanalyze/c/frontend/offsetof_expr/offsetof_expr.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/offsetof_expr/offsetof_expr.c.dot @@ -36,7 +36,7 @@ digraph cfg { "test_offsetof_expr.8f3e634fd0f68dff5e4bfedc8f65a55f_9" -> "test_offsetof_expr.8f3e634fd0f68dff5e4bfedc8f65a55f_2" ; -"test_offsetof_expr.8f3e634fd0f68dff5e4bfedc8f65a55f_10" [label="10: DeclStmt \n VARIABLE_DECLARED(i:int); [line 17, column 3]\n *&i:int=n$2 [line 17, column 3]\n EXIT_SCOPE(n$2); [line 17, column 3]\n " shape="box"] +"test_offsetof_expr.8f3e634fd0f68dff5e4bfedc8f65a55f_10" [label="10: DeclStmt \n VARIABLE_DECLARED(i:int); [line 17, column 3]\n *&i:int=2 [line 17, column 3]\n " shape="box"] "test_offsetof_expr.8f3e634fd0f68dff5e4bfedc8f65a55f_10" -> "test_offsetof_expr.8f3e634fd0f68dff5e4bfedc8f65a55f_5" ;