aaron.ballman added a comment.

As I wade through a lot of diagnostics from our test suite, I notice a 
recurring pattern is that this is diagnosing in the presence of idiomatic 
constructors or assignment operators. e.g.,

  struct S {
    S(const S&) = delete;
    S(S&); // We diagnose, and suggest const T& here
  };
  
  struct T {
    T(const T&) = default;
    T(T&); // We diagnose, and suggest const T& here
  };

Would it make sense to delay this checking until the class definition is 
complete, and then diagnose only the operations where the suggestion in the 
diagnostic would not result in an ambiguous declaration? Or, perhaps suppress 
the diagnostic entirely in the presence of multiple overloads of the operation. 
e.g, not diagnose the following:

  struct U {
    U(U&);
    U(volatile U&);
  
    U& operator=(U&);
    void operator=(const U&);
  };


http://reviews.llvm.org/D15228



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to