[PATCH] D19385: [scan-build] fix logic error warnings emitted on clang code base
Daniel Jasper via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 28 07:46:35 PDT 2016
djasper added inline comments.
================
Comment at: lib/Format/AffectedRangeManager.cpp:103
@@ -102,1 +102,3 @@
AnnotatedLine *Line, const AnnotatedLine *PreviousLine) {
+ assert(Line && "does not contain any line");
+
----------------
klimek wrote:
> Perhaps we should change this to take a Line& instead? Daniel, thoughts?
Yeah, that makes sense to me.
================
Comment at: lib/Format/AffectedRangeManager.cpp:111
@@ -108,2 +110,3 @@
+ assert(Line->First && "does not have a first token");
// Stores whether one of the line's tokens is directly affected.
----------------
Here, we should probably just return false.
http://reviews.llvm.org/D19385
More information about the cfe-commits
mailing list