diff --git a/facebook-clang-plugins b/facebook-clang-plugins index 858e754e7..5d096bba8 160000 --- a/facebook-clang-plugins +++ b/facebook-clang-plugins @@ -1 +1 @@ -Subproject commit 858e754e7dcc148637dfae8e42d041c238b8bc9b +Subproject commit 5d096bba8b95f8523608dad8b88d3154c85bb4b4 diff --git a/infer/tests/codetoanalyze/cpp/liveness/issues.exp b/infer/tests/codetoanalyze/cpp/liveness/issues.exp index 56b16d825..0d5320c0a 100644 --- a/infer/tests/codetoanalyze/cpp/liveness/issues.exp +++ b/infer/tests/codetoanalyze/cpp/liveness/issues.exp @@ -21,3 +21,4 @@ codetoanalyze/cpp/liveness/dead_stores.cpp, dead_stores::use_then_dead_bad, 3, D codetoanalyze/cpp/liveness/dead_stores_constexpr.cpp, capture_const_bad, 1, DEAD_STORE, no_bucket, ERROR, [Write of unused value] codetoanalyze/cpp/liveness/non_type_template_param.cpp, X<3>_isZeroBad, 1, DEAD_STORE, no_bucket, ERROR, [Write of unused value] codetoanalyze/cpp/liveness/non_type_template_param.cpp, instanciateTemplateBad, 3, DEAD_STORE, no_bucket, ERROR, [Write of unused value] +codetoanalyze/cpp/liveness/non_type_template_param.cpp, instanciateTemplateConstOk_FP, 1, DEAD_STORE, no_bucket, ERROR, [Write of unused value] diff --git a/infer/tests/codetoanalyze/cpp/liveness/non_type_template_param.cpp b/infer/tests/codetoanalyze/cpp/liveness/non_type_template_param.cpp index a6f7bc038..fbb8498c7 100644 --- a/infer/tests/codetoanalyze/cpp/liveness/non_type_template_param.cpp +++ b/infer/tests/codetoanalyze/cpp/liveness/non_type_template_param.cpp @@ -21,8 +21,14 @@ int instanciateTemplateBad() { return 0; } -void instanciateTemplateConstOk() { +void instanciateTemplateConstOk_FP() { const int foo = 7; X x; x.isZeroBad(); } + +void instanciateTemplateConstExprOk() { + constexpr int foo = 7; + X x; + x.isZeroBad(); +}