]> granicus.if.org Git - clang/commit
[Sema] Fix a crash when nonnull checking
authorMichael Liao <michael.hliao@gmail.com>
Fri, 29 Mar 2019 03:55:52 +0000 (03:55 +0000)
committerMichael Liao <michael.hliao@gmail.com>
Fri, 29 Mar 2019 03:55:52 +0000 (03:55 +0000)
commit5ab26d0031b723c63ed29554dbe97fed3f076419
treed3d703d1c6d899a5966f79fedecef906f27bd3ee
parent316b9626930c0b397ffe3c053cdd336ca51b4d04
[Sema] Fix a crash when nonnull checking

Summary:
- If a parameter is used, nonnull checking needs function prototype to
  retrieve the corresponding parameter's attributes. However, at the
  prototype substitution phase when a template is being instantiated,
  expression may be created and checked without a fully specialized
  prototype. Under such a scenario, skip nonnull checking on that
  argument.

Reviewers: rjmccall, tra, yaxunl

Subscribers: javed.absar, kristof.beyls, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D59900

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@357236 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaChecking.cpp
test/SemaCXX/pr30559.cpp [new file with mode: 0644]