From: Anna Zaks Date: Thu, 25 Apr 2013 16:26:20 +0000 (+0000) Subject: Fix a possible null pointer dereference found by the analyzer. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a2338bc4c2887937478d302901fb41a53e14e6d6;p=clang 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 36d70d8b0b..2e66df33ee 100644 --- a/include/clang/AST/Expr.h +++ b/include/clang/AST/Expr.h @@ -2644,7 +2644,7 @@ protected: (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;