r262288 - Add an llvm_unreachable back to the autogeneration of this covered switch.

John McCall via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 29 18:09:20 PST 2016


Author: rjmccall
Date: Mon Feb 29 20:09:20 2016
New Revision: 262288

URL: http://llvm.org/viewvc/llvm-project?rev=262288&view=rev
Log:
Add an llvm_unreachable back to the autogeneration of this covered switch.

Modified:
    cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp

Modified: cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp?rev=262288&r1=262287&r2=262288&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp Mon Feb 29 20:09:20 2016
@@ -2294,7 +2294,8 @@ void EmitClangAttrASTVisitor(RecordKeepe
        << "      return getDerived().Traverse" << R.getName() << "Attr("
        << "cast<" << R.getName() << "Attr>(A));\n";
   }
-  OS << "  }\n";  // end case
+  OS << "  }\n";  // end switch
+  OS << "  llvm_unreachable(\"bad attribute kind\");\n";
   OS << "}\n";  // end function
   OS << "#endif  // ATTR_VISITOR_DECLS_ONLY\n";
 }




More information about the cfe-commits mailing list