r278110 - [analyzer] Try to fix coverity CID 1360469.

Vassil Vassilev via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 9 03:00:23 PDT 2016


Author: vvassilev
Date: Tue Aug  9 05:00:23 2016
New Revision: 278110

URL: http://llvm.org/viewvc/llvm-project?rev=278110&view=rev
Log:
[analyzer] Try to fix coverity CID 1360469.

Patch by Raphael Isemann!

Modified:
    cfe/trunk/lib/Analysis/CloneDetection.cpp

Modified: cfe/trunk/lib/Analysis/CloneDetection.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CloneDetection.cpp?rev=278110&r1=278109&r2=278110&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CloneDetection.cpp (original)
+++ cfe/trunk/lib/Analysis/CloneDetection.cpp Tue Aug  9 05:00:23 2016
@@ -67,7 +67,7 @@ StmtSequence::iterator StmtSequence::beg
 
 StmtSequence::iterator StmtSequence::end() const {
   if (!holdsSequence()) {
-    return &S + 1;
+    return reinterpret_cast<StmtSequence::iterator>(&S) + 1;
   }
   auto CS = cast<CompoundStmt>(S);
   return CS->body_begin() + EndIndex;




More information about the cfe-commits mailing list