[clang] [clang][Sema] Fix crash on atomic builtins with incomplete type args (PR #96374)
Takuya Shimizu via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 24 21:27:03 PDT 2024
================
@@ -4570,7 +4570,8 @@ ExprResult Sema::BuildAtomicExpr(SourceRange CallRange, SourceRange ExprRange,
}
// Pointer to object of size zero is not allowed.
- if (Context.getTypeInfoInChars(AtomTy).Width.isZero()) {
+ if (!AtomTy->isIncompleteType() &&
----------------
hazohelet wrote:
The current diagnostic message only says we need trivially-copyable type here, and the `RequireCompleteType` version would say we need complete type here and it sounds more understandable to me.
https://github.com/llvm/llvm-project/pull/96374
More information about the cfe-commits
mailing list