>> So why does StringRef(NULL) segfault? > > IIRC, because it calls strlen(NULL). To better phrase the question, why doesn't it check and return StringRef() in that case? Peter