diff options
author | Vedant Kumar <vsk@apple.com> | 2016-11-03 06:35:16 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2016-11-03 06:35:16 +0000 |
commit | e03e5953f6094901468708dce02a2d8dc76c1f2a (patch) | |
tree | 76d7f0af9f86a55332528ed36c325e1d20f47e76 /clang/lib/Sema/SemaExpr.cpp | |
parent | 7b9cc1474fa0e3a42563b5405bdfa606f9e26168 (diff) | |
download | bcm5719-llvm-e03e5953f6094901468708dce02a2d8dc76c1f2a.tar.gz bcm5719-llvm-e03e5953f6094901468708dce02a2d8dc76c1f2a.zip |
[Sema] Remove a dead assignment, NFC.
The assignment to NextIsDereference is either followed by (1) another,
unrelated assignment to NextIsDereference or by (2) an early loop exit.
Found by clang's static analyzer: http://llvm.org/reports/scan-build
(While we're at it fix a typo.)
llvm-svn: 285879
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index fdb5fb5bd28..114dba31d93 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -9880,15 +9880,14 @@ static void DiagnoseConstAssignment(Sema &S, const Expr *E, // a note to the error. bool DiagnosticEmitted = false; - // Track if the current expression is the result of a derefence, and if the - // next checked expression is the result of a derefence. + // Track if the current expression is the result of a dereference, and if the + // next checked expression is the result of a dereference. bool IsDereference = false; bool NextIsDereference = false; // Loop to process MemberExpr chains. while (true) { IsDereference = NextIsDereference; - NextIsDereference = false; E = E->IgnoreParenImpCasts(); if (const MemberExpr *ME = dyn_cast<MemberExpr>(E)) { |