[PATCH] D81916: [analyzer] Fix StdLibraryFunctionsChecker crash on macOS

Valeriy Savchenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 16 06:37:19 PDT 2020


vsavchenko marked 2 inline comments as done.
vsavchenko added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Core/CheckerHelpers.cpp:131
   const Token &T = FilteredTokens.back();
-  if (!T.isLiteral())
+  if (!T.isLiteral() || !T.getLiteralData())
     return llvm::None;
----------------
martong wrote:
> Could you please add a FIXME above the line with the real reasons: "EOF macro token coming from a PCH file on macOS while marked as literal,
> doesn't contain any literal data."
Sure


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81916





More information about the cfe-commits mailing list