r180271 - Fix a possible null pointer dereference found by the analyzer.

Anna Zaks ganna at apple.com
Thu Apr 25 09:26:20 PDT 2013


Author: zaks
Date: Thu Apr 25 11:26:20 2013
New Revision: 180271

URL: http://llvm.org/viewvc/llvm-project?rev=180271&view=rev
Log:
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.

Modified:
    cfe/trunk/include/clang/AST/Expr.h

Modified: cfe/trunk/include/clang/AST/Expr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Expr.h?rev=180271&r1=180270&r2=180271&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/trunk/include/clang/AST/Expr.h Thu Apr 25 11:26:20 2013
@@ -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;





More information about the cfe-commits mailing list