[PATCH] D92755: [YAML] Support extended spellings when parsing bools.

Nathan James via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 7 12:56:42 PST 2020


njames93 added inline comments.


================
Comment at: llvm/include/llvm/Support/YAMLTraits.h:639
 
-inline bool isBool(StringRef S) {
-  return S.equals("true") || S.equals("True") || S.equals("TRUE") ||
-         S.equals("false") || S.equals("False") || S.equals("FALSE");
-}
+inline bool isBool(StringRef S) { return parseBool(S).hasValue(); }
 
----------------
Ahh so this is causing the bool value set to be quoted, even the value isn't being used as a bool. Resulting in test case failures.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92755/new/

https://reviews.llvm.org/D92755



More information about the llvm-commits mailing list