[clang] [clang][Sema] Fix assertion crash on invalid concept template parameter (#225792) (PR #235408)
Younan Zhang via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 25 19:47:32 PDT 2026
================
@@ -1540,7 +1538,36 @@ namespace {
Designator.setInvalid();
return;
}
+
+ if(Base){
+ // Mark invalid and return early if Base points to an invalid decl
+ if(const auto *VD = Base.dyn_cast<const ValueDecl *>()){
+ if(VD->isInvalidDecl()){
+ Designator.setInvalid();
+ return;
+ }
+ }
+ // Mark invalid and return early if Base points to an invalid type
+ QualType BaseTy = getType(Base).getNonReferenceType();
+ if(BaseTy.isNull() || BaseTy->containsErrors() || (!BaseTy->isPointerType() && !BaseTy->isArrayType())){
+ Designator.setInvalid();
+ return;
+ }
+ }
+
----------------
zyn0217 wrote:
Are they relevant to the issue you claim to fix?
https://github.com/llvm/llvm-project/pull/235408
More information about the cfe-commits
mailing list