summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorBrian Kelley <bkelley@microsoft.com>2017-03-29 17:31:42 +0000
committerBrian Kelley <bkelley@microsoft.com>2017-03-29 17:31:42 +0000
commit036603ac59d7818be878176870b3116ee56f5574 (patch)
tree82fecc28cf2e8e9bca497d3f8edc019f43465e53 /clang/lib/Frontend/CompilerInstance.cpp
parent4afdfe811ca2aeed7cdd2bf324a922098c8ef8e2 (diff)
downloadbcm5719-llvm-036603ac59d7818be878176870b3116ee56f5574.tar.gz
bcm5719-llvm-036603ac59d7818be878176870b3116ee56f5574.zip
[Objective-C] C++ Classes with __weak Members non-POD Types when using -fobjc-weak
Summary: When adding an Objective-C retainable type member to a C++ class, also check the LangOpts.ObjCWeak flag and the lifetime qualifier so __weak qualified Objective-C pointer members cause the class to be a non-POD type with non-trivial special members, so the compiler always emits the necessary runtime calls for copying, moving, and destroying the weak member. Otherwise, Objective-C++ classes with weak Objective-C pointer members compiled with -fobjc-weak exhibit undefined behavior if the C++ class is classified as a POD type. Reviewers: rsmith, benlangmuir, doug.gregor, rjmccall Reviewed By: rjmccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D31003 llvm-svn: 299008
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud