rjmccall added inline comments.

================
Comment at: clang/include/clang/AST/ExternalASTSource.h:69
 
-  /// Whether this AST source also provides information for
-  /// semantic analysis.
-  bool SemaSource = false;
+  // LLVM-style RTTI.
+  static char ID;
----------------
aprantl wrote:
> /// LLVM-style RTTI.
It would be better if this had a dedicated type instead of using `char` and 
then `void*` as the parameter, just to prevent simple bugs where somebody 
passes in the wrong pointer.  Maybe you could have a non-copyable `ClassID` 
type and a `ClassRef` type with the sole constructor `ClassRef(const ClassID 
&)`?

The virtual method name is trying too hard to be succinct, and it doesn't 
matter because it's rarely used; I would recommend borrowing the name 
`isKindOf` from Objective-C.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71397/new/

https://reviews.llvm.org/D71397



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

Reply via email to