[PATCH] Implementation for completion in call context for C++

Manuel Klimek klimek at google.com
Fri Jan 16 05:11:04 PST 2015


================
Comment at: lib/Sema/SemaOverload.cpp:12477-12482
@@ +12476,7 @@
+
+bool clang::TooManyArguments(size_t NumParams, size_t NumArgs,
+                             bool PartialOverloading) {
+  if (NumArgs > 0 && PartialOverloading)
+    return NumArgs + 1 > NumParams;
+  return NumArgs > NumParams;
+}
----------------
francisco.lopes wrote:
> klimek wrote:
> > 1. are we not in namespace clang yet??
> > 2. This could still need a comment explaining exactly why we need the +1 - the next person coming along will wonder the same thing, so we can save them a lot of time by leaving a comprehensive explanation... :)
> 1. If you're just asking: no, I have declared it in namespace `clang` (since it's used in `SemaTemplateDeduction.cpp`) and must be defined inside it.
> 
>     If you're asking why it's in namespace `clang` and not elsewhere: it was the best place I could infer.
> 
> 2. OK.
Comment is perfect, thanks!
I find the definition as clang:: strange; can we instead just put it into an anonymous namespace? (is it used anywhere else?)

http://reviews.llvm.org/D6880

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list