]> granicus.if.org Git - llvm/commitdiff
Fix FormatVariadicTest with GCC
authorJonas Hahnfeld <hahnjo@hahnjo.de>
Mon, 23 Oct 2017 18:41:22 +0000 (18:41 +0000)
committerJonas Hahnfeld <hahnjo@hahnjo.de>
Mon, 23 Oct 2017 18:41:22 +0000 (18:41 +0000)
Looks like GCC didn't like the original specialization, try within namespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316361 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/Support/FormatVariadicTest.cpp

index a6ce37e014fde25ef352bcb784383cd67d5ac500..ddecffdeed1db4f0c3b7678c556728cfc680364d 100644 (file)
@@ -593,11 +593,13 @@ struct Recorder {
       : Copied(Move.Copied), Moved(1 + Move.Moved) {}
 };
 } // namespace
-template <> struct llvm::format_provider<Recorder> {
+namespace llvm {
+template <> struct format_provider<Recorder> {
   static void format(const Recorder &R, raw_ostream &OS, StringRef style) {
     OS << R.Copied << "C " << R.Moved << "M";
   }
 };
+} // namespace
 
 TEST(FormatVariadicTest, CopiesAndMoves) {
   Recorder R;