[PATCH] D103825: [clang] Do not crash when ArgTy is null in CheckArgAlignment
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 10 07:04:18 PDT 2021
hokein accepted this revision.
hokein added a comment.
Thanks! Really hope this is the last time to fix this crash.
================
Comment at: clang/lib/Sema/SemaChecking.cpp:4574
// getTypeAlignInChars requires complete types
- if (ParamTy->isIncompleteType() || ArgTy->isIncompleteType() ||
- ParamTy->isUndeducedType() || ArgTy->isUndeducedType())
+ if (ArgTy.isNull() || ParamTy->isIncompleteType() ||
+ ArgTy->isIncompleteType() || ParamTy->isUndeducedType() ||
----------------
looks like the `isNull` is not needed to fix the crash, but let's be more defensive this time.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103825/new/
https://reviews.llvm.org/D103825
More information about the cfe-commits
mailing list