rsmith added inline comments.

================
Comment at: clang/include/clang/AST/DeclCXX.h:557-560
+  RecordDecl::field_iterator field_begin() const {
+    assert(hasDefinition() && "Definition not available to get fields.");
+    return static_cast<const RecordDecl *>(getDefinition())->field_begin();
+  }
----------------
This change makes me nervous: calling `field_begin` / `fields` on a 
`CXXRecordDecl*` will now work, but calling those same functions on the same 
object that has been cast to `RecordDecl*` will still be broken. Can we change 
the accessors in the base class instead?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142384

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

Reply via email to