[cfe-commits] r100730 - /cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp
Ted Kremenek
kremenek at apple.com
Thu Apr 8 00:31:51 PDT 2010
Thanks for pointing this out. I nuked it.
On Apr 7, 2010, at 5:17 PM, John McCall wrote:
>
> On Apr 7, 2010, at 5:05 PM, Ted Kremenek wrote:
>
>> Author: kremenek
>> Date: Wed Apr 7 19:05:00 2010
>> New Revision: 100730
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=100730&view=rev
>> Log:
>> Use SmallVector instead of an std::queue.
>>
>> Modified:
>> cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp
>>
>> Modified: cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp?rev=100730&r1=100729&r2=100730&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp (original)
>> +++ cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp Wed Apr 7 19:05:00 2010
>> @@ -25,7 +25,6 @@
>> #include "clang/Analysis/Analyses/ReachableCode.h"
>> #include "llvm/ADT/BitVector.h"
>> #include "llvm/Support/Casting.h"
>> -#include <queue>
>>
>> using namespace clang;
>>
>> @@ -75,7 +74,7 @@
>>
>> // The CFG leaves in dead things, and we don't want the dead code paths to
>> // confuse us, so we mark all live things first.
>> - std::queue<CFGBlock*> workq;
>> + llvm::SmallVector<CFGBlock*, 20> workq;
>> llvm::BitVector live(cfg->getNumBlockIDs());
>> unsigned count = reachable_code::ScanReachableFromBlock(cfg->getEntry(),
>> live);
>
> I was wondering how you managed to switch a std::queue to a SmallVector without having to change any uses; it turns out that there *aren't* any uses of this variable.
>
> John.
More information about the cfe-commits
mailing list