erik.pilkington added a comment.

Thanks for working on this! Can you update www/cxx_dr_status.html too?



================
Comment at: lib/Sema/SemaLambda.cpp:507
+      bool Error = false;
+      if (getLangOpts().CPlusPlus17) {
+        // Resolution of CWG 2211 in C++17 renders shadowing ill-formed.
----------------
We usually back-port defect report resolutions to older standards, in this case 
maybe we should just warn pre-17 though. (Even though we warn here anyways with 
-Wshadow in -Wextra)


================
Comment at: lib/Sema/SemaLambda.cpp:509
+        // Resolution of CWG 2211 in C++17 renders shadowing ill-formed.
+        for (const auto &Capture: Captures) {
+          if (Capture.Id && Capture.Id->getName() == Param->getName()) {
----------------
Nit: the colon should have a space on it's left here.


================
Comment at: lib/Sema/SemaLambda.cpp:510
+        for (const auto &Capture: Captures) {
+          if (Capture.Id && Capture.Id->getName() == Param->getName()) {
+            Error = true;
----------------
You should compare `IdentifierInfo`s here, rather than `StringRef`s.


Repository:
  rC Clang

https://reviews.llvm.org/D53595



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to