forked from OSchip/llvm-project
[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
This commit is contained in:
parent
7b9cc1474f
commit
e03e5953f6
|
@ -9880,15 +9880,14 @@ static void DiagnoseConstAssignment(Sema &S, const Expr *E,
|
||||||
// a note to the error.
|
// a note to the error.
|
||||||
bool DiagnosticEmitted = false;
|
bool DiagnosticEmitted = false;
|
||||||
|
|
||||||
// Track if the current expression is the result of a derefence, and if the
|
// Track if the current expression is the result of a dereference, and if the
|
||||||
// next checked expression is the result of a derefence.
|
// next checked expression is the result of a dereference.
|
||||||
bool IsDereference = false;
|
bool IsDereference = false;
|
||||||
bool NextIsDereference = false;
|
bool NextIsDereference = false;
|
||||||
|
|
||||||
// Loop to process MemberExpr chains.
|
// Loop to process MemberExpr chains.
|
||||||
while (true) {
|
while (true) {
|
||||||
IsDereference = NextIsDereference;
|
IsDereference = NextIsDereference;
|
||||||
NextIsDereference = false;
|
|
||||||
|
|
||||||
E = E->IgnoreParenImpCasts();
|
E = E->IgnoreParenImpCasts();
|
||||||
if (const MemberExpr *ME = dyn_cast<MemberExpr>(E)) {
|
if (const MemberExpr *ME = dyn_cast<MemberExpr>(E)) {
|
||||||
|
|
Loading…
Reference in New Issue