When a declaration includes a type, but not a variable name, it can be used to establish defaults.
| 8758 | // When a declaration includes a type, but not a variable name, it can be used |
| 8759 | // to establish defaults. |
| 8760 | void TParseContext::declareTypeDefaults(const TSourceLoc& loc, const TPublicType& publicType) |
| 8761 | { |
| 8762 | if (publicType.basicType == EbtAtomicUint && publicType.qualifier.hasBinding()) { |
| 8763 | if (publicType.qualifier.layoutBinding >= (unsigned int)resources.maxAtomicCounterBindings) { |
| 8764 | error(loc, "atomic_uint binding is too large", "binding", ""); |
| 8765 | return; |
| 8766 | } |
| 8767 | if (publicType.qualifier.hasOffset()) |
| 8768 | atomicUintOffsets[publicType.qualifier.layoutBinding] = publicType.qualifier.layoutOffset; |
| 8769 | return; |
| 8770 | } |
| 8771 | |
| 8772 | if (publicType.arraySizes) { |
| 8773 | error(loc, "expect an array name", "", ""); |
| 8774 | } |
| 8775 | |
| 8776 | if (publicType.qualifier.hasLayout() && !publicType.qualifier.hasBufferReference()) |
| 8777 | warn(loc, "useless application of layout qualifier", "layout", ""); |
| 8778 | } |
| 8779 | |
| 8780 | void TParseContext::typeParametersCheck(const TSourceLoc& loc, const TPublicType& publicType) |
| 8781 | { |
no test coverage detected