shafik added inline comments.
================
Comment at: clang/lib/AST/ExprConstant.cpp:4797
}
+ // Can't access properties of an incomplete type.
+ if (!RD->hasDefinition()) {
----------------
erichkeane wrote:
> It seems to me that we shouldn't GET to this function with an incomplete
> type. I suspect whoever calls this is doing so incorrectly.
Also note we only check in `ExprConstant.cpp` for `hasDefinition()` in one
other place in `findCompleteObject` and that is around extern see:
https://github.com/llvm/llvm-project/commit/c0d04a2567c22631595bed8092bc042bb91ea4ee#diff-255a21a02a8966766225831836d482547787baf9a770fbf67178ebb7d7347e27
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132918/new/
https://reviews.llvm.org/D132918
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits