Change RHS-style decltype to LHS-style decltype<declval()>.
[oota-llvm.git] / unittests / DebugInfo / PDB / PDBApiTest.cpp
index d8dbb7adb0a7959c0ca2c50dfcea5722f2c9cc1f..c12e60ac1fded3c9dc0c2cdb51aff84b1b7206db 100644 (file)
@@ -7,6 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include <type_traits>
 #include <unordered_map>
 
 #include "llvm/DebugInfo/PDB/IPDBEnumChildren.h"
@@ -60,7 +61,7 @@ namespace std {
 namespace {
 
 #define MOCK_SYMBOL_ACCESSOR(Func)                                             \
-  auto Func() const->decltype(((IPDBRawSymbol *)nullptr)->Func()) override {   \
+  decltype(std::declval<IPDBRawSymbol>().Func()) Func() const override {       \
     typedef decltype(IPDBRawSymbol::Func()) ReturnType;                        \
     return ReturnType();                                                       \
   }