[JSON] Fix uninitialized variable warning
authorJonas Devlieghere <jonas@devlieghere.com>
Fri, 7 Apr 2023 20:54:45 +0000 (13:54 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Fri, 7 Apr 2023 21:02:42 +0000 (14:02 -0700)
commit4b4650948af347c73fcf812645c2afd1955bc083
treed94ffeba7013698a96468040c3f3b13e5ee619eb
parentde5f96e99aedd641cc0bbb9ae4a156db4ae3c4c4
[JSON] Fix uninitialized variable warning

Fix uninitialized variable warning when deserializing a std::optional<E>
where is an enum type.

JSON.h:771:20: warning: variable 'Result' is uninitialized when used here [-Wuninitialized]
  if (!fromJSON(E, Result, P))
                   ^~~~~~
llvm/include/llvm/Support/JSON.h