From 3204a105e31987f7dc6b8cf61ac7a26be5cf6213 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sat, 18 Jul 2015 14:35:41 +0000 Subject: [PATCH] [clang-modernize] Don't rely on iterator auto-dereferencing. llvm-svn: 242607 --- clang-tools-extra/clang-modernize/UseAuto/UseAutoActions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang-tools-extra/clang-modernize/UseAuto/UseAutoActions.cpp b/clang-tools-extra/clang-modernize/UseAuto/UseAutoActions.cpp index 2a8d5c5..c4c3ce6 100644 --- a/clang-tools-extra/clang-modernize/UseAuto/UseAutoActions.cpp +++ b/clang-tools-extra/clang-modernize/UseAuto/UseAutoActions.cpp @@ -46,7 +46,7 @@ void IteratorReplacer::run(const MatchFinder::MatchResult &Result) { "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 -- 2.7.4