[PATCH] D123840: [Clang][Sema] Fix invalid redefinition error in if/switch/for statement
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 15 06:42:48 PDT 2022
erichkeane added a comment.
>> I will add these helpers as a NFC patch after this one, that won't need a release note or review right?
I found that awkward as well, and almost requested that you fix this, but decided against it. I'm ok with this being an NFC patch. It would be nice to grep for all uses of the getFlags that compares with ControlScope and FnTryCatchScope to see if we can replace those uses as well.
================
Comment at: clang/docs/ReleaseNotes.rst:122
This fixes Issue `Issue 54817 <https://github.com/llvm/llvm-project/issues/54817>`_.
+- No longer produce a wrong redefinition error if variables are defined in if/for/switch init statements
+ and lambda.
----------------
I think this isn't accurate, right? I thought this had to do with lambdas alone? Is the following accurate?
`Clang should no longer incorrectly diagnose a variable declaration inside of a lambda expression inside the scope of a if/while/for/switch init statement as a redeclaration. This fixes ...'.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123840/new/
https://reviews.llvm.org/D123840
More information about the cfe-commits
mailing list