llvm-project/clang/unittests/Analysis
Artem Dergachev ab7747b727 [analyzer] Treat functions without run-time branches as "small".
Currently we always inline functions that have no branches, i.e. have exactly
three CFG blocks: ENTRY, some code, EXIT. This makes sense because when there
are no branches, it means that there's no exponential complexity introduced
by inlining such function. Such functions also don't trigger various fundamental
problems with our inlining mechanism, such as the problem of inlined
defensive checks.

Sometimes the CFG may contain more blocks, but in practice it still has
linear structure because all directions (except, at most, one) of all branches
turned out to be unreachable. When this happens, still treat the function
as "small". This is useful, in particular, for dealing with C++17 if constexpr.

Differential Revision: https://reviews.llvm.org/D61051

llvm-svn: 359531
2019-04-30 03:01:02 +00:00
..
CFGTest.cpp [analyzer] Treat functions without run-time branches as "small". 2019-04-30 03:01:02 +00:00
CMakeLists.txt Add explicit dependency on clangSerialization for a bunch of components to fix -DBUILD_SHARED_LIBS=on build 2018-12-12 08:02:18 +00:00
CloneDetectionTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ExprMutationAnalyzerTest.cpp Fix some clang analysis tests passing arguments incorrectly 2019-03-07 18:57:04 +00:00