Fix omitted return post failed parse

PiperOrigin-RevId: 228903905
This commit is contained in:
Jacques Pienaar
2019-01-11 10:30:40 -08:00
committed by jpienaar
parent 4fd6db3e29
commit 71ec869011
2 changed files with 8 additions and 0 deletions

View File

@@ -1102,6 +1102,8 @@ Attribute Parser::parseAttribute(Type type) {
auto valuesEltType = type.getElementType();
auto values =
parseDenseElementsAttr(valuesEltType, type.isa<VectorType>());
if (!values)
return nullptr;
/// Sanity check.
auto indicesType = indices.getType();

View File

@@ -851,3 +851,9 @@ func @complex_loops() {
for %i1 = 1 to 100 {
// expected-error @+1 {{expected '"' in string literal}}
"opaqueIntTensor"(){bar: opaque<tensor<2x1x4xi32>, "0x686]>} : () -> ()
// -----
func @mi() {
// expected-error @+1 {{expected '[' or scalar constant inside tensor literal}}
"fooi64"(){bar: sparse<vector<1xi64>,[,[,1]