[PATCH] D77836: [Attribute] Fix noderef attribute false-negatives

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat May 30 11:07:37 PDT 2020


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM, but please wait for a few days in case @rsmith has further concerns.



================
Comment at: clang/lib/Sema/SemaInit.cpp:8182
               !ToPtrType->getPointeeType()->hasAttr(attr::NoDeref)) {
-            S.Diag(CurInit.get()->getExprLoc(),
-                   diag::warn_noderef_to_dereferenceable_pointer)
-                << CurInit.get()->getSourceRange();
+            // Do not check static casts here because they are checked earlier
+            // in Sema::ActOnCXXNamedCast()
----------------
The comment should end with a period.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77836





More information about the cfe-commits mailing list