]> granicus.if.org Git - clang/commitdiff
Fix a possible null pointer dereference found by the analyzer.
authorAnna Zaks <ganna@apple.com>
Thu, 25 Apr 2013 16:26:20 +0000 (16:26 +0000)
committerAnna Zaks <ganna@apple.com>
Thu, 25 Apr 2013 16:26:20 +0000 (16:26 +0000)
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

include/clang/AST/Expr.h

index 36d70d8b0b71902cdbdc6e528a6ce082f49a3f6e..2e66df33eee985673521b0adcfeebf7499155d08 100644 (file)
@@ -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;