Handle buffer references vs 'const'
Allow constructors to and from references to be constant folded. Section 4.3.3 says constructors whose arguments are all constant expressions must fold. Disallow 'const' on buffer reference types. It is not a 'non-void transparent basic data type' (it is not considered 'basic'). Handle buffer reference constants (which can be assigned to a non-const reference, or can be further folded to another type of constant) by converting to 'constructor(uint64_t constant)' in addConversion. Disallow == and != operators on reference types.
This commit is contained in:
parent
d90d548161
commit
be63facd80
13 changed files with 1271 additions and 1099 deletions
|
|
@ -370,6 +370,7 @@ public:
|
|||
void nestedStructCheck(const TSourceLoc&);
|
||||
void arrayObjectCheck(const TSourceLoc&, const TType&, const char* op);
|
||||
void opaqueCheck(const TSourceLoc&, const TType&, const char* op);
|
||||
void referenceCheck(const TSourceLoc&, const TType&, const char* op);
|
||||
void storage16BitAssignmentCheck(const TSourceLoc&, const TType&, const char* op);
|
||||
void specializationCheck(const TSourceLoc&, const TType&, const char* op);
|
||||
void structTypeCheck(const TSourceLoc&, TPublicType&);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue