[PATCH] D87004: [analyzer] Evaluate PredefinedExpressions

Valeriy Savchenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 2 03:39:47 PDT 2020


vsavchenko requested changes to this revision.
vsavchenko added inline comments.
This revision now requires changes to proceed.


================
Comment at: clang/lib/StaticAnalyzer/Core/SValBuilder.cpp:311
+    const auto *PE = cast<PredefinedExpr>(E);
+    return makeLoc(getRegionManager().getStringRegion(PE->getFunctionName()));
+  }
----------------
I'm not super familiar with predefined expressions, but it looks like it this commit doesn't cover all kinds of those.  And for some this can return `nullptr`.

Can you, please, add tests for other kinds as well?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87004



More information about the cfe-commits mailing list