[PATCH] D12652: [Static Analyzer] Lambda support.

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 4 15:49:18 PDT 2015


xazax.hun created this revision.
xazax.hun added reviewers: dcoughlin, zaks.anna, jordan_rose, ted.
xazax.hun added a subscriber: cfe-commits.

This patch adds lambda support for the static analyzer.
All of my initial tests are passed.

Before this patch each time a LambdaExpr was encountered a sink node was generated. This also reduced the coverage of code that is actually not inside a lambda operator(). Also the lack of lambda support is a known cause of some false positives (for example in the dead store checker).

This is a work in progress version of this patch, I will move this feature behind a flag and run it on LLVM to make sure it is also tested with real world code.


http://reviews.llvm.org/D12652

Files:
  include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
  lib/StaticAnalyzer/Core/ExprEngine.cpp
  lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
  lib/StaticAnalyzer/Core/MemRegion.cpp
  test/Analysis/dead-stores.cpp
  test/Analysis/lambdas.cpp
  test/Analysis/temporaries.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12652.34085.patch
Type: text/x-patch
Size: 12034 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150904/c382aaff/attachment.bin>


More information about the cfe-commits mailing list