[llvm] r264297 - ErrorTest.cpp: Move instantiations out of anonymous namespace. gcc didn't complain.

NAKAMURA Takumi via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 24 08:40:46 PDT 2016


Author: chapuni
Date: Thu Mar 24 10:40:46 2016
New Revision: 264297

URL: http://llvm.org/viewvc/llvm-project?rev=264297&view=rev
Log:
ErrorTest.cpp: Move instantiations out of anonymous namespace. gcc didn't complain.

Modified:
    llvm/trunk/unittests/Support/ErrorTest.cpp

Modified: llvm/trunk/unittests/Support/ErrorTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/ErrorTest.cpp?rev=264297&r1=264296&r2=264297&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/ErrorTest.cpp (original)
+++ llvm/trunk/unittests/Support/ErrorTest.cpp Thu Mar 24 10:40:46 2016
@@ -45,8 +45,6 @@ protected:
   int Info;
 };
 
-template <> char ErrorInfo<CustomError>::ID = 0;
-
 // Custom error class with a custom base class and some additional random
 // 'info'.
 class CustomSubError : public ErrorInfo<CustomSubError, CustomError> {
@@ -72,8 +70,6 @@ protected:
   int ExtraInfo;
 };
 
-template <> char ErrorInfo<CustomSubError, CustomError>::ID = 0;
-
 static Error handleCustomError(const CustomError &CE) { return Error(); }
 
 static void handleCustomErrorVoid(const CustomError &CE) {}
@@ -457,3 +453,6 @@ TEST(Error, ErrorCodeConversions) {
 }
 
 } // end anon namespace
+
+template <> char ErrorInfo<CustomError>::ID = 0;
+template <> char ErrorInfo<CustomSubError, CustomError>::ID = 0;




More information about the llvm-commits mailing list