diff options
Diffstat (limited to 'clang/lib/AST/Stmt.cpp')
| -rw-r--r-- | clang/lib/AST/Stmt.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/clang/lib/AST/Stmt.cpp b/clang/lib/AST/Stmt.cpp index 2367cadf645..922ff1f8dea 100644 --- a/clang/lib/AST/Stmt.cpp +++ b/clang/lib/AST/Stmt.cpp @@ -1114,11 +1114,7 @@ bool CapturedStmt::capturesVariable(const VarDecl *Var) const { for (const auto &I : captures()) { if (!I.capturesVariable() && !I.capturesVariableByCopy()) continue; - - // This does not handle variable redeclarations. This should be - // extended to capture variables with redeclarations, for example - // a thread-private variable in OpenMP. - if (I.getCapturedVar() == Var) + if (I.getCapturedVar()->getCanonicalDecl() == Var->getCanonicalDecl()) return true; } |

