I'm a bit unsure, is this intentional or a typo?
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Yeah, the code is correct as-is, changing it to char would be incorrect.
getchar returns int ( https://linux.die.net/man/3/getchar ) and needs to so it can return EOF, which isn't a char value (otherwise there'd be no way to distinguish between that char value correctly being read from the file, and the case where it indicates the end of the file)
clang-tidy: error: reference to 'Error' is ambiguous [clang-diagnostic-error]
not useful