llvm-project/flang/test/Fir
Jean Perier 49af2a6275 [mlir][flang] Do not prevent integer types from being parsed as MLIR keywords
DialectAsmParser::parseKeyword is rejecting `'i' digit+` while it is
a valid identifier according to mlir/docs/LangRef.md.

Integer types actually used to be TOK_KEYWORD a while back before the
change: 6af866c58d.

This patch Modifies `isCurrentTokenAKeyword` to return true for tokens that
match integer types too.

The motivation for this change is the parsing of `!fir.type<{` `component-name: component-type,`+ `}>`
type in FIR that represent Fortran derived types. The component-names are
parsed as keywords, and can very well be i32 or any ixxx (which are
valid Fortran derived type component names).

The Quant dialect type parser had to be modified since it relied on `iw` not
being parsed as keywords.

Differential Revision: https://reviews.llvm.org/D108913
2021-09-03 08:20:49 +02:00
..
cg-ops.fir [mlir] Set the namespace of the BuiltinDialect to 'builtin' 2021-07-28 21:00:10 +00:00
fir-ops.fir [flang] Replace Arithmetic Ops with their builtin conunterpart 2021-03-17 08:58:10 +05:30
fir-types.fir [mlir][flang] Do not prevent integer types from being parsed as MLIR keywords 2021-09-03 08:20:49 +02:00
invalid-types.fir [flang][fir] Add FIR Types parser diagnostic tests + cleanup 2021-03-05 14:58:44 -05:00
invalid.fir [flang][fir] Add diagnostic tests for FIR ops verifier 2021-03-05 10:21:17 -05:00