[ubsan] nullability-assign: Check assignments into C++ structs
authorVedant Kumar <vsk@apple.com>
Wed, 26 Apr 2017 21:55:17 +0000 (21:55 +0000)
committerVedant Kumar <vsk@apple.com>
Wed, 26 Apr 2017 21:55:17 +0000 (21:55 +0000)
commit6b22dda5a3909f46862ec001110b5d4671bbf142
treecb6d69b78291b28f697fe78155d7d57112803ee7
parente6d2bebb25f2c1a1ffb1884b11df37ff50a33c49
[ubsan] nullability-assign: Check assignments into C++ structs

Fix the nullability-assign check so that it can handle assignments into
C++ structs. Previously, such assignments were not instrumented.

Testing: check-clang, check-ubsan, enabling the existing test in ObjC++
mode, and building some Apple frameworks with -fsanitize=nullability.

llvm-svn: 301482
clang/lib/CodeGen/CGExpr.cpp
clang/test/CodeGenCXX/ubsan-nullability-assign.cpp [new file with mode: 0644]
clang/test/CodeGenObjC/ubsan-nullability.m