[PATCH] D149000: Update with warning message for comparison to NULL pointer
Krishna Narayanan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 22 11:04:49 PDT 2023
Krishna-13-cyber updated this revision to Diff 516087.
Krishna-13-cyber added a comment.
- Apologies for uploading some other/incorrect diff
- Updated Diff
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149000/new/
https://reviews.llvm.org/D149000
Files:
clang/lib/Sema/SemaChecking.cpp
Index: clang/lib/Sema/SemaChecking.cpp
===================================================================
--- clang/lib/Sema/SemaChecking.cpp
+++ clang/lib/Sema/SemaChecking.cpp
@@ -14723,7 +14723,7 @@
bool IsAddressOf = false;
- if (UnaryOperator *UO = dyn_cast<UnaryOperator>(E)) {
+ if (UnaryOperator *UO = dyn_cast<UnaryOperator>(E->IgnoreParenCasts())) {
if (UO->getOpcode() != UO_AddrOf)
return;
IsAddressOf = true;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149000.516087.patch
Type: text/x-patch
Size: 449 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230422/b3c13b57/attachment.bin>
More information about the cfe-commits
mailing list