It is undefined behavior to call a method on a null pointer in C++. I would guess that the intent was eventually to make getCanonicalSignature a method directly on the GenericSignature wrapper type, which could check for null before invoking the method on the underlying impl. Eventually, most of the important API for GenericSignature should probably live on GenericSignature, and provide reasonable default behavior for empty generic signatures, so that GenericSignatureImpl can be hidden.