Author: Balazs Benics Date: 2022-06-01T18:53:19+02:00 New Revision: e5ece11e761a8b31b700249e46cf05590330ebc7
URL: https://github.com/llvm/llvm-project/commit/e5ece11e761a8b31b700249e46cf05590330ebc7 DIFF: https://github.com/llvm/llvm-project/commit/e5ece11e761a8b31b700249e46cf05590330ebc7.diff LOG: [analyzer][NFC] Add test for 3a07280290564e294c957c94c918a6680714b417 I'm adding a test demonstraing that the issue reported by @mikaelholmen is fixed. Differential Revision: https://reviews.llvm.org/D126198 Added: Modified: clang/test/Analysis/pointer-to-member.cpp Removed: ################################################################################ diff --git a/clang/test/Analysis/pointer-to-member.cpp b/clang/test/Analysis/pointer-to-member.cpp index e1b4d0c11949c..a1adaa719617e 100644 --- a/clang/test/Analysis/pointer-to-member.cpp +++ b/clang/test/Analysis/pointer-to-member.cpp @@ -310,3 +310,13 @@ void test() { } } // namespace testStaticCasting +namespace D126198 { +class Base {}; +class Derived : public Base {}; +int foo(int Derived::*); + +int test() { + int Base::*p = nullptr; + return foo(p); // no-crash +} +} // namespace D126198 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits