diff options
author | Renato Golin <rengolin@microsoft.com> | 2020-05-05 10:03:26 +0100 |
---|---|---|
committer | Renato Golin <rengolin@microsoft.com> | 2020-05-06 14:34:18 +0100 |
commit | 5010b5b7e6cf0925465ecaa4111927ee9bcfac67 (patch) | |
tree | bc201b1b2dd1ea7f92e9eefbf6e5950e184c30f9 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | ed7db68c354e48daf1efb5f119cee20938732100 (diff) | |
download | llvm-5010b5b7e6cf0925465ecaa4111927ee9bcfac67.zip llvm-5010b5b7e6cf0925465ecaa4111927ee9bcfac67.tar.gz llvm-5010b5b7e6cf0925465ecaa4111927ee9bcfac67.tar.bz2 |
Check type for forward reference definition
The types of forward references are checked that they match with other
uses, but they do not check they match with the definition.
func @forward_reference_type_check() -> (i8) {
br ^bb2
^bb1:
return %1 : i8
^bb2:
%1 = "bar"() : () -> (f32)
br ^bb1
}
Would be parsed and the use site of '%1' would be silently changed to
'f32'.
This commit adds a test for this case, and a check during parsing for
the types to match.
Patch by Matthew Parkinson <mattpark@microsoft.com>
Closes D79317.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions