diff options
author | Artem Dergachev <artem.dergachev@gmail.com> | 2018-12-15 02:13:26 +0000 |
---|---|---|
committer | Artem Dergachev <artem.dergachev@gmail.com> | 2018-12-15 02:13:26 +0000 |
commit | 46f34624d215b2b6851416d2475a5dd152f862e9 (patch) | |
tree | 0fcd720232f98b0c3a406eea80435cffef4f9f78 /clang/lib/StaticAnalyzer/Core/CallEvent.cpp | |
parent | 0ce45fae72913eea670df9bc72de5631b61d3392 (diff) | |
download | bcm5719-llvm-46f34624d215b2b6851416d2475a5dd152f862e9.tar.gz bcm5719-llvm-46f34624d215b2b6851416d2475a5dd152f862e9.zip |
[analyzer] Fix unknown block calls to have zero parameters.
Right now they report to have one parameter with null decl,
because initializing an ArrayRef of pointers with a nullptr
yields an ArrayRef to an array of one null pointer.
Fixes a crash in the OSObject section of RetainCountChecker.
Differential Revision: https://reviews.llvm.org/D55671
llvm-svn: 349229
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/CallEvent.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/CallEvent.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/CallEvent.cpp b/clang/lib/StaticAnalyzer/Core/CallEvent.cpp index 767116630f4..8d9338b21c1 100644 --- a/clang/lib/StaticAnalyzer/Core/CallEvent.cpp +++ b/clang/lib/StaticAnalyzer/Core/CallEvent.cpp @@ -837,7 +837,7 @@ const BlockDataRegion *BlockCall::getBlockRegion() const { ArrayRef<ParmVarDecl*> BlockCall::parameters() const { const BlockDecl *D = getDecl(); if (!D) - return nullptr; + return None; return D->parameters(); } |