================
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;
+}
----------------
klimek wrote:
> 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?)
By now, it's used in `SemaTemplateDeduction.cpp`, and `SemaOverload.cpp` which 
is where it was defined as it seems to best match the context for its 
definition. It may also be used elsewhere futurely in case there's a need to 
apply the same logic.

http://reviews.llvm.org/D6880

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



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to