[PATCH] D53595: [C++17] Reject shadowing of capture by parameter in lambda

Nicolas Lesser via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 23 12:31:24 PDT 2018


Rakete1111 added inline comments.


================
Comment at: lib/Sema/SemaLambda.cpp:510
+        for (const auto &Capture: Captures) {
+          if (Capture.Id && Capture.Id->getName() == Param->getName()) {
+            Error = true;
----------------
erik.pilkington wrote:
> You should compare `IdentifierInfo`s here, rather than `StringRef`s.
`IdentifierInfo` doesn't have a compare equal or `operator==` function. How do you propose I do that? Do I add one?


Repository:
  rC Clang

https://reviews.llvm.org/D53595





More information about the cfe-commits mailing list