-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[YAML][NFC] precommit wrong test case #131782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[YAML][NFC] precommit wrong test case #131782
Conversation
@llvm/pr-subscribers-llvm-support Author: Congcong Cai (HerrCai0907) ChangesFull diff: https://github.com/llvm/llvm-project/pull/131782.diff 1 Files Affected:
diff --git a/llvm/unittests/Support/YAMLIOTest.cpp b/llvm/unittests/Support/YAMLIOTest.cpp
index c0e9c57a77f19..3db1db57ad596 100644
--- a/llvm/unittests/Support/YAMLIOTest.cpp
+++ b/llvm/unittests/Support/YAMLIOTest.cpp
@@ -1273,6 +1273,36 @@ TEST(YAMLIO, TestReadWriteBlockScalarValue) {
}
}
+struct V {
+ MultilineStringType doc;
+ std::string str;
+};
+template <> struct MappingTraits<V> {
+ static void mapping(IO &io, V &v) {
+ io.mapRequired("block_scalac", v.doc);
+ io.mapRequired("scalar", v.str);
+ }
+};
+template <> struct llvm::yaml::SequenceElementTraits<V> {
+ static const bool flow = false;
+};
+TEST(YAMLIO, TestScalarAfterBlockScalar) {
+ std::vector<V> v{V{}};
+ v[0].doc.str = "AA\nBB";
+ v[0].str = "a";
+ std::string output;
+ llvm::raw_string_ostream ostr(output);
+ Output yout(ostr);
+ yout << v;
+ EXPECT_EQ(output, R"(---
+- block_scalac: |
+ AA
+ BB
+scalar: a
+...
+)");
+}
+
//===----------------------------------------------------------------------===//
// Test flow sequences
//===----------------------------------------------------------------------===//
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/144/builds/21198 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/174/builds/15105 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/3/builds/13569 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/160/builds/15318 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/175/builds/15639 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/137/builds/15793 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/185/builds/15553 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/140/builds/19747 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/180/builds/15315 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/8/builds/12999 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/133/builds/13413 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/95/builds/11196 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/168/builds/10129 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/146/builds/2574 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/33/builds/13734 Here is the relevant piece of the build log for the reference
|
I was about to report the same as one of the bots had reported here, this breaks compilation with GCC:
I'll push a revert soon unless someone else beats me to it. |
This reverts commit cb4ae35. That commit broke compilation with GCC: ../unittests/Support/YAMLIOTest.cpp:1280:20: error: explicit specialization of template<class T> struct llvm::yaml::MappingTraits’ outside its namespace must u se a nested-name-specifier [-fpermissive] 1280 | template <> struct MappingTraits<V> { | ^~~~~~~~~~~~~~~~
This reverts commit 6477945.
No description provided.