JonasToth added a comment.

C.131 seems to imply a minimal amount of trivial getters/setters before
diagnosing.

I feel that the CPPCG just want to force the programmer to think twice
instead of forbidding it totally.
It might be worth to have a more chatty/specific check for the CPPCG and
a strict "Don't do it" for HICPP.

From my experience with asking the CPPCG authors it takes a while for a
response and that in the end is
not necessarily telling which way to go. Experience might differ
depending on topic though.

> Hmm, I don't know that it would help with code like this:
> 
>   class Base {
>     int f; // Suggested by C.133/C.9
>   
>   protected:
>   //  int f; // Disallowed by C.133
>   
>     int getF() const { return f; } // Suggested by C.133, disallowed by C.131
>     void setF(int NewF) { f = NewF; }  // Suggested by C.133, disallowed by 
> C.131
>   };
> 
>> Still worth asking the authors.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D52771



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

Reply via email to