r249849 - Analysis: Make CFG::graph_iterator dereference to non-const
Duncan P. N. Exon Smith via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 9 09:50:56 PDT 2015
Author: dexonsmith
Date: Fri Oct 9 11:50:55 2015
New Revision: 249849
URL: http://llvm.org/viewvc/llvm-project?rev=249849&view=rev
Log:
Analysis: Make CFG::graph_iterator dereference to non-const
Since the original commit in r145858, we've had `CFG::graph_iterator`
and `CFG::const_graph_iterator`, and both have derefenced to a
`const`-ified `value_type`. The former has an implicit conversion to
non-`const`, which is how this worked at all until r249782 started using
the dereference operator (partially reverted in r249783).
This fixes the non-const iterator to be non-const (sometimes
const-iterators are intentional, but with a separate const-ified class
(and a non-const implicit conversion leak) that's not likely to be the
case here).
Modified:
cfe/trunk/include/clang/Analysis/CFG.h
Modified: cfe/trunk/include/clang/Analysis/CFG.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/CFG.h?rev=249849&r1=249848&r2=249849&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/CFG.h (original)
+++ cfe/trunk/include/clang/Analysis/CFG.h Fri Oct 9 11:50:55 2015
@@ -766,7 +766,7 @@ public:
/// (not a pointer to CFGBlock).
class graph_iterator {
public:
- typedef const CFGBlock value_type;
+ typedef CFGBlock value_type;
typedef value_type& reference;
typedef value_type* pointer;
typedef BumpVector<CFGBlock*>::iterator ImplTy;
More information about the cfe-commits
mailing list