[PATCH] D11832: [Patch] [Analyzer] false positive: Potential leak connected with memcpy (PR 22954)

pierre gousseau via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 28 01:59:55 PDT 2015


pgousseau added inline comments.

================
Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:863
@@ +862,3 @@
+
+  const ElementRegion *ER = dyn_cast<ElementRegion>(R);
+  // Cast is safe as BufVal's region is a FieldRegion.
----------------
dcoughlin wrote:
> You can use cast<ElementRegion>(R) here, which will assert that R is an ElementRegion, and remove the assert below.
Will do ! Thanks.


http://reviews.llvm.org/D11832





More information about the cfe-commits mailing list