[clang] 724877e - Roll otherwise-unused variable into assert
David Blaikie via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 9 23:33:49 PST 2020
Author: David Blaikie
Date: 2020-11-09T23:27:47-08:00
New Revision: 724877e219cd219c4b757f10ac4484193cd30c6a
URL: https://github.com/llvm/llvm-project/commit/724877e219cd219c4b757f10ac4484193cd30c6a
DIFF: https://github.com/llvm/llvm-project/commit/724877e219cd219c4b757f10ac4484193cd30c6a.diff
LOG: Roll otherwise-unused variable into assert
Added:
Modified:
clang/lib/AST/ItaniumMangle.cpp
Removed:
################################################################################
diff --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp
index 4afe0ac062f9..2cf69d34d472 100644
--- a/clang/lib/AST/ItaniumMangle.cpp
+++ b/clang/lib/AST/ItaniumMangle.cpp
@@ -5085,8 +5085,7 @@ void CXXNameMangler::mangleValueInTemplateArg(QualType T, const APValue &V) {
}
case APValue::Union: {
- const CXXRecordDecl *RD = T->getAsCXXRecordDecl();
- assert(RD && "unexpected type for union value");
+ assert(T->getAsCXXRecordDecl() && "unexpected type for union value");
const FieldDecl *FD = V.getUnionField();
if (!FD) {
More information about the cfe-commits
mailing list