[clang] [clang] [Sema] Add assertion about expected type classes when building MemberPointerType (PR #119105)
Nathan Ridge via cfe-commits
cfe-commits at lists.llvm.org
Sat Dec 7 17:22:30 PST 2024
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/119105
None
>From 6c900d6cc82aab791504a0b96e1e72310d2ec24d Mon Sep 17 00:00:00 2001
From: Nathan Ridge <zeratul976 at hotmail.com>
Date: Sat, 7 Dec 2024 20:20:52 -0500
Subject: [PATCH] [clang] [Sema] Add assertion about expected type classes when
building MemberPointerType
---
clang/lib/Sema/SemaType.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp
index 4893bb0ec2d26f..54c68d0c099490 100644
--- a/clang/lib/Sema/SemaType.cpp
+++ b/clang/lib/Sema/SemaType.cpp
@@ -5363,6 +5363,9 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state,
// non-dependent one (RecordType).
ClsType = Context.getElaboratedType(ElaboratedTypeKeyword::None,
NNSPrefix, ClsType);
+ } else {
+ // The only other type we should get here is TemplateTypeParmType.
+ assert(isa<TemplateTypeParmType>(NNSType));
}
break;
}
More information about the cfe-commits
mailing list