]> granicus.if.org Git - clang/commit
[Sema] Make nullness warnings appear in C++.
authorGeorge Burgess IV <george.burgess.iv@gmail.com>
Mon, 14 Dec 2015 22:00:49 +0000 (22:00 +0000)
committerGeorge Burgess IV <george.burgess.iv@gmail.com>
Mon, 14 Dec 2015 22:00:49 +0000 (22:00 +0000)
commitb959627853efb353e64d143d5b347c12ee3392c6
tree71263f2f435818619e09931d894d4d8896daa833
parentf6039aee1a0598bdd5a130359ebcdd3815fb677e
[Sema] Make nullness warnings appear in C++.

Given the following code:

    int *_Nullable ptr;
    int *_Nonnull nn = ptr;

...In C, clang will warn you about `nn = ptr`, because you're assigning
a nonnull pointer to a nullable pointer. In C++, clang issues no such
warning. This patch helps ensure that clang doesn't ever miss an
opportunity to complain about C++ code.

N.B. Though this patch has a differential revision link, the actual
review took place over email.

Differential Revision: http://reviews.llvm.org/D14938

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255556 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Sema/Sema.h
lib/Sema/Sema.cpp
lib/Sema/SemaExprCXX.cpp
test/Sema/nullability.c
test/SemaCXX/nullability.cpp