]> granicus.if.org Git - clang/commitdiff
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)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262288 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/ClangAttrEmitter.cpp

index 8a854cafd89878e415778aa32fdcaee01eb40ec6..96a3ea860f0475e27877906b8a9ade8646f588e3 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";
 }