if (TR->isFunctionType()) // from isObjectType()
return LV_NotObjectType;
+ // Allow qualified void which is an incomplete type other than void (yuck).
+ if (TR->isVoidType() && !TR.getQualifiers())
+ return LV_IncompleteVoidType;
+
if (TR->isReferenceType()) // C++ [expr]
return LV_Valid;
void foo3 (void)
{
void* x = 0;
- void* y = &*x;
+ void* y = &*x; // expected-error{{address expression must be an lvalue or a function designator}}
}
extern const void cv1;
return &cv1;
}
+extern void cv2;
+void *foo5 (void)
+{
+ return &cv2; // expected-error{{address expression must be an lvalue or a function designator}}
+}