[PATCH] D158293: [NFC][Clang] Fix static code analyzer concern about null value dereference
Soumi Manna via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 30 09:52:22 PDT 2023
Manna updated this revision to Diff 554762.
Manna marked an inline comment as done.
Manna added a comment.
Thanks @tahonermann for review and feedback. I have added an assert separately to tell which predicate failed if a failure occurs in future.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158293/new/
https://reviews.llvm.org/D158293
Files:
clang/lib/Lex/PPDirectives.cpp
Index: clang/lib/Lex/PPDirectives.cpp
===================================================================
--- clang/lib/Lex/PPDirectives.cpp
+++ clang/lib/Lex/PPDirectives.cpp
@@ -492,6 +492,7 @@
++NumSkipped;
assert(!CurTokenLexer && CurPPLexer && "Lexing a macro, not a file?");
+ assert(CurLexer && "Invalid lexer value");
if (PreambleConditionalStack.reachedEOFWhileSkipping())
PreambleConditionalStack.clearSkipInfo();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158293.554762.patch
Type: text/x-patch
Size: 443 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230830/eee456fe/attachment-0001.bin>
More information about the cfe-commits
mailing list