http://llvm.org/bugs/show_bug.cgi?id=16614

            Bug ID: 16614
           Summary: Template type diffing should be applied to
                    non-templates
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]
    Classification: Unclassified

I don't think there's any reason not to apply the convenience of type diffing
to non-templates such as:

void func(int*);

int main() {
  const int i = 3;
  func(&i);
  func(3);
}

We produce a fairly specific diagnostic: "1st argument ('const int *') would
lose const qualifier", but I think the type diffing might actually be less
special-case and more helpful here ("'<const >int *' v 'int *'")

In the second case we just say "no known conversion from 'int' to 'int *' for
1st argument" - again, highlighting the '*' could be helpful with more deeply
nested types/names/diagnostics.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to