[PATCH] D60956: [Sema] Fix the lookup for a declaration conflicting with an enumerator

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 7 06:56:47 PDT 2019


aaron.ballman added a comment.

I found a few nits, but generally think this LG. However, I think @rsmith should sign off on it just in case I've misinterpreted something along the way.



================
Comment at: lib/Sema/SemaDecl.cpp:16537
+    //   instead would cause us to miss using-declarations.
+    // - it behaves as no declaration was found when the lookup result
+    //   is not LookupResult::Found. This would cause us to miss
----------------
behaves as no -> behaves as if no


================
Comment at: lib/Sema/SemaDecl.cpp:16551
 
+    llvm_unreachable("Unexpected LookupResultKind");
+  }
----------------
Missing a `default` label in front of this?


================
Comment at: lib/Sema/SemaDecl.cpp:16599
+      } else {
+
+        if (isa<EnumConstantDecl>(PrevDecl))
----------------
Spurious newline


================
Comment at: lib/Sema/SemaDecl.cpp:16602
+          Diag(IdLoc, diag::err_redefinition_of_enumerator) << Id;
+
+        else
----------------
Spurious newline


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60956/new/

https://reviews.llvm.org/D60956





More information about the cfe-commits mailing list