[PATCH] D71397: [clang] Improve LLVM-style RTTI support in ExternalASTSource/ExternalSemaSource

Adrian Prantl via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 12 09:09:58 PST 2019


aprantl accepted this revision.
aprantl added inline comments.
This revision is now accepted and ready to land.


================
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;
----------------
/// LLVM-style RTTI.


================
Comment at: clang/include/clang/AST/ExternalASTSource.h:327
 
+  // LLVM-style RTTI.
+  virtual bool isA(const void *ClassID) const { return ClassID == &ID; }
----------------
```
/// LLVM-style RTTI.
/// \{
...
/// \}
```


================
Comment at: clang/include/clang/Sema/ExternalSemaSource.h:53
 class ExternalSemaSource : public ExternalASTSource {
+  // LLVM-style RTTI.
+  static char ID;
----------------
etc


Repository:
  rC Clang

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

https://reviews.llvm.org/D71397





More information about the cfe-commits mailing list