[clang-tools-extra] r242607 - [clang-modernize] Don't rely on iterator auto-dereferencing.
Benjamin Kramer
benny.kra at googlemail.com
Sat Jul 18 07:35:41 PDT 2015
Author: d0k
Date: Sat Jul 18 09:35:41 2015
New Revision: 242607
URL: http://llvm.org/viewvc/llvm-project?rev=242607&view=rev
Log:
[clang-modernize] Don't rely on iterator auto-dereferencing.
Modified:
clang-tools-extra/trunk/clang-modernize/UseAuto/UseAutoActions.cpp
Modified: clang-tools-extra/trunk/clang-modernize/UseAuto/UseAutoActions.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-modernize/UseAuto/UseAutoActions.cpp?rev=242607&r1=242606&r2=242607&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-modernize/UseAuto/UseAutoActions.cpp (original)
+++ clang-tools-extra/trunk/clang-modernize/UseAuto/UseAutoActions.cpp Sat Jul 18 09:35:41 2015
@@ -46,7 +46,7 @@ void IteratorReplacer::run(const MatchFi
"Expected constructor with single argument");
// Drill down to the as-written initializer.
- const Expr *E = Construct->arg_begin()->IgnoreParenImpCasts();
+ const Expr *E = (*Construct->arg_begin())->IgnoreParenImpCasts();
if (E != E->IgnoreConversionOperator())
// We hit a conversion operator. Early-out now as they imply an implicit
// conversion from a different type. Could also mean an explicit
More information about the cfe-commits
mailing list