diff --git a/interpreter/cling/lib/Interpreter/NullDerefProtectionTransformer.cpp b/interpreter/cling/lib/Interpreter/NullDerefProtectionTransformer.cpp index 9b340c082b629..247fc5561dcfc 100644 --- a/interpreter/cling/lib/Interpreter/NullDerefProtectionTransformer.cpp +++ b/interpreter/cling/lib/Interpreter/NullDerefProtectionTransformer.cpp @@ -229,6 +229,11 @@ class PointerCheckInjector : public RecursiveASTVisitor { static bool hasPtrCheckDisabledInContext(Sema *S, const Decl* D) { if (isa(D)) return false; + if (auto *NS = dyn_cast(D)) { + if (NS->getName() == "Experimental") { + return true; + } + } for (const auto *Ann : D->specific_attrs()) { if (Ann->getAnnotation() == "__cling__ptrcheck(off)") return true;