Re: [PATCH] D19962: [scan-build] fix warnings emitted on Clang StaticAnalyzer code base

2016-05-09 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp:686 @@ -685,3 +685,3 @@ const Expr *ArgExpr = nullptr; if (Idx < Call.getNumArgs()) ArgExpr = Call.getArgExpr(Idx); This conditional will assert if:

Re: [PATCH] D19962: [scan-build] fix warnings emitted on Clang StaticAnalyzer code base

2016-05-09 Thread Apelete Seketeli via cfe-commits
apelete updated this revision to Diff 56556. apelete added a comment. [scan-build] fix warnings emitted on Clang StaticAnalyzer code base - lib/StaticAnalyzer/Core/PlistDiagnostics.cpp: factorize assert and check on '!Diags.empty' condition. http://reviews.llvm.org/D19962 Files: lib/StaticA

Re: [PATCH] D19962: [scan-build] fix warnings emitted on Clang StaticAnalyzer code base

2016-05-09 Thread Apelete Seketeli via cfe-commits
apelete added inline comments. Comment at: lib/StaticAnalyzer/Core/PlistDiagnostics.cpp:300 @@ -299,2 +299,3 @@ + assert(SM && "SourceManager is NULL, cannot iterate through the diagnostics"); dblaikie wrote: > This assertion seems to be equivalent to replac

Re: [PATCH] D19962: [scan-build] fix warnings emitted on Clang StaticAnalyzer code base

2016-05-05 Thread David Blaikie via cfe-commits
dblaikie added a subscriber: dblaikie. Comment at: lib/StaticAnalyzer/Core/PlistDiagnostics.cpp:300 @@ -299,2 +299,3 @@ + assert(SM && "SourceManager is NULL, cannot iterate through the diagnostics"); This assertion seems to be equivalent to replacing the pr

[PATCH] D19962: [scan-build] fix warnings emitted on Clang StaticAnalyzer code base

2016-05-05 Thread Apelete Seketeli via cfe-commits
apelete created this revision. apelete added a reviewer: zaks.anna. apelete added a subscriber: cfe-commits. This patch fixes a few "Logic error" warnings of the type "Called c++ object pointer is null" reported by Clang Static Analyzer on the following files: - lib/StaticAnalyzer/Checkers/Nullab