From 197616adda994d9c3f8fe46b2f5b5b34a1f164ad Mon Sep 17 00:00:00 2001 From: Dmitri Gribenko Date: Thu, 10 Jan 2013 21:10:44 +0000 Subject: [PATCH] Fix coding style git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172107 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/Support/YAMLIOTest.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/unittests/Support/YAMLIOTest.cpp b/unittests/Support/YAMLIOTest.cpp index 0d6e3a03528..f1ae33f1167 100644 --- a/unittests/Support/YAMLIOTest.cpp +++ b/unittests/Support/YAMLIOTest.cpp @@ -782,16 +782,14 @@ namespace yaml { struct MappingTraits { static void mapping(IO &io, KindAndFlags& kf) { io.mapRequired("kind", kf.kind); - // type of flags field varies depending on kind field - + // Type of "flags" field varies depending on "kind" field. // Use memcpy here to avoid breaking strict aliasing rules. - if ( kf.kind == kindA ) { + if (kf.kind == kindA) { AFlags aflags; memcpy(&aflags, &kf.flags, sizeof(aflags)); io.mapRequired("flags", aflags); memcpy(&kf.flags, &aflags, sizeof(kf.flags)); - } - else { + } else { BFlags bflags; memcpy(&bflags, &kf.flags, sizeof(bflags)); io.mapRequired("flags", bflags);