[LLVMdev] suspicious typo in MCObjectDisassembler.cpp

xliu navy.xliu at gmail.com
Thu Jul 31 10:26:54 PDT 2014


my compiler gave me a warning in MCObjectDisassembler.cpp. it found a
self-comparation in loop condition. I think it's a typo.

the suspicious code was introduced by this patch:

>From f176482752fbea3139394e280adfb10270dd3aac Mon Sep 17 00:00:00 2001
From: Ahmed Bougacha <ahmed.bougacha at gmail.com>
Date: Wed, 21 Aug 2013 07:28:55 +0000
Subject: MC CFG: Support disassembly at arbitrary addresses in
MCObjectDisassembler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188889
91177308-0d34-0410-b5e6-96231b3b80d8


please review "SE != SE" below. i think it should be SI != SE.


+ for (AddressSetTy::const_iterator SI = BBI->SuccAddrs.begin(),
+ SE = BBI->SuccAddrs.end();
+ SE != SE; ++SI) {


thanks,
--lx



More information about the llvm-dev mailing list