[PATCH] D151964: [NFC][CLANG] Fix Static Code Analyzer Concerns with dereference null return value in applyObjCTypeArgs()

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 2 06:26:42 PDT 2023


erichkeane accepted this revision.
erichkeane added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/lib/Sema/SemaType.cpp:956
       // Determine whether the type argument is substitutable for the bound.
       if (typeArgObjC->isObjCIdType()) {
         // When the type argument is 'id', the only acceptable type
----------------
Note for future reviewers: This 'if' on both branches dereferences the `boundObjC` pointer. The true path is just below here, on 959.  Second is in the condition inside of the `else if` on 961, `canAssignObjCInterfaces` immediately dereferences the parameters.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151964/new/

https://reviews.llvm.org/D151964



More information about the cfe-commits mailing list