llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Ella Ma (Snape3058) <details> <summary>Changes</summary> Following PR #<!-- -->70792 for issue #<!-- -->70464 Add a test case for issue #<!-- -->59493 --- Full diff: https://github.com/llvm/llvm-project/pull/71073.diff 1 Files Affected: - (modified) clang/test/Analysis/issue-70464.cpp (+20) ``````````diff diff --git a/clang/test/Analysis/issue-70464.cpp b/clang/test/Analysis/issue-70464.cpp index f3b3072eb919823..331068775821e7e 100644 --- a/clang/test/Analysis/issue-70464.cpp +++ b/clang/test/Analysis/issue-70464.cpp @@ -66,3 +66,23 @@ struct Derived : Base { void entry() { Derived test; } } // namespace delegate_ctor_call + +// Additional test case from issue #59493 +namespace init_list_array { + +struct Base { + int foox[1]; +}; + +class Derived : public Base { +public: + Derived() : Base{{42}} { + // The dereference to this->foox below should be initialized properly. + clang_analyzer_dump(this->foox[0]); // expected-warning{{42 S32b}} + clang_analyzer_dump(foox[0]); // expected-warning{{42 S32b}} + } +}; + +void entry() { Derived test; } + +} // namespace init_list_array `````````` </details> https://github.com/llvm/llvm-project/pull/71073 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits