[PATCH] D47150: [Clang Tablegen] Add default case to getModifierName()

Mark Searles via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 21 09:47:18 PDT 2018


msearles created this revision.
msearles added reviewers: b-sumner, kzhuravl, EricWF, rjmccall.
Herald added subscribers: ioeric, ilya-biryukov.

  Fix internal build failure:
  
  ../../../ClangDiagnosticsEmitter.cpp -o ClangDiagnosticsEmitter.o
  ../../../ClangDiagnosticsEmitter.cpp: In function 'llvm::StringRef 
  {anonymous}::getModifierName({anonymous}::ModifierType)':
  ../../../ClangDiagnosticsEmitter.cpp:495:1: error: control reaches end of non-void function [-Werror=return-type]
  }
  ^
  
  Build failure triggered by git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332799 91177308-0d34-0410-b5e6-96231b3b80d8


https://reviews.llvm.org/D47150

Files:
  utils/TableGen/ClangDiagnosticsEmitter.cpp


Index: utils/TableGen/ClangDiagnosticsEmitter.cpp
===================================================================
--- utils/TableGen/ClangDiagnosticsEmitter.cpp
+++ utils/TableGen/ClangDiagnosticsEmitter.cpp
@@ -490,6 +490,7 @@
   case MT_ObjCInstance:
     return "objcinstance";
   case MT_Unknown:
+  default:
     llvm_unreachable("invalid modifier type");
   }
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47150.147804.patch
Type: text/x-patch
Size: 373 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180521/3fd8a275/attachment.bin>


More information about the cfe-commits mailing list