[PATCH] D85180: [YAMLTraits] Fix mapping <none> value that followed by comments.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 4 00:36:45 PDT 2020
grimar added a comment.
Hmm. I do not know a simpler solution for this, so it is probably looks fine to me.
I wonder what others think though.
================
Comment at: llvm/include/llvm/Support/YAMLTraits.h:1632
if (auto *Node = dyn_cast<ScalarNode>(((Input *)this)->getCurrentNode()))
- IsNone = Node->getRawValue() == "<none>";
+ IsNone = Node->getRawValue().trim() == "<none>";
----------------
This probably deserves a comment now.
Should we use `rtrim(' ')`? We do not need to trim the left side + `trim` by default trims too much it seems: `" \t\n\v\f\r"`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85180/new/
https://reviews.llvm.org/D85180
More information about the llvm-commits
mailing list