Add an llvm_unreachable back to the autogeneration of this covered switch.
authorJohn McCall <rjmccall@apple.com>
Tue, 1 Mar 2016 02:09:20 +0000 (02:09 +0000)
committerJohn McCall <rjmccall@apple.com>
Tue, 1 Mar 2016 02:09:20 +0000 (02:09 +0000)
llvm-svn: 262288

clang/utils/TableGen/ClangAttrEmitter.cpp

index 8a854ca..96a3ea8 100644 (file)
@@ -2294,7 +2294,8 @@ void EmitClangAttrASTVisitor(RecordKeeper &Records, raw_ostream &OS) {
        << "      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";
 }