[PATCH] D32332: Add support for transparent overloadable functions in clang

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 16 06:55:42 PDT 2017


aaron.ballman added a comment.

This is generally looking good to me, with a few small nits. @rsmith, do you have thought on this?



================
Comment at: lib/Sema/SemaDecl.cpp:2875-2876
 /// Returns true if there was an error, false otherwise.
-bool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD,
-                             Scope *S, bool MergeTypeWithOld) {
+bool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S,
+                             bool MergeTypeWithOld) {
   // Verify the old decl was also a function.
----------------
Seems to be a formatting-only change that's unrelated to the patch; can be reverted.


================
Comment at: lib/Sema/SemaDecl.cpp:9225
+                            /*NewIsUsingDecl=*/false)) {
+      case Sema::Ovl_Match:
+      case Sema::Ovl_NonFunction:
----------------
Why add `Sema::` to these?


================
Comment at: lib/Sema/SemaDecl.cpp:9383
+
+    auto OtherUnmarkedIter = llvm::find_if(Previous, [&](const NamedDecl *ND) {
+      const auto *FD = dyn_cast<FunctionDecl>(ND);
----------------
Why does this need a capture?


https://reviews.llvm.org/D32332





More information about the cfe-commits mailing list