From 1bd499bb1599be170c037b814d77be70a18a6af1 Mon Sep 17 00:00:00 2001 From: CristinaCristescu Date: Fri, 8 Apr 2016 15:18:25 +0200 Subject: [PATCH] Fix bug - check only for function arguments of pointer types. --- lib/Interpreter/NullDerefProtectionTransformer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Interpreter/NullDerefProtectionTransformer.cpp b/lib/Interpreter/NullDerefProtectionTransformer.cpp index 08ff2bcf..179f0ebd 100644 --- a/lib/Interpreter/NullDerefProtectionTransformer.cpp +++ b/lib/Interpreter/NullDerefProtectionTransformer.cpp @@ -84,6 +84,7 @@ namespace cling { if (ArgIndexs.test(index)) { // Get the argument with the nonnull attribute. Expr* Arg = CE->getArg(index); + if (Arg->getType().getTypePtr()->isPointerType()) CE->setArg(index, SynthesizeCheck(Arg)); } }