Fix a possible null pointer dereference found by the analyzer.
When computing the other parameters, ‘op’ is checked for being null before it’s dereferenced.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180271 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h
index 36d70d8..2e66df3 100644
--- a/include/clang/AST/Expr.h
+++ b/include/clang/AST/Expr.h
@@ -2644,7 +2644,7 @@
(ty->isInstantiationDependentType() ||
(op && op->isInstantiationDependent())),
(ty->containsUnexpandedParameterPack() ||
- op->containsUnexpandedParameterPack())),
+ (op && op->containsUnexpandedParameterPack()))),
Op(op) {
assert(kind != CK_Invalid && "creating cast with invalid cast kind");
CastExprBits.Kind = kind;