From 498da13cad1f0954adcea63b942c71e5ead224df Mon Sep 17 00:00:00 2001 From: Martin Trojer Date: Tue, 17 Nov 2020 23:01:59 -0800 Subject: [PATCH] [objc] [fcp] only emit property_control tag when we have non-None property_control Summary: Plugin can emit corrupt data when ObjCPropertyDecl == None Reviewed By: ezgicicek, jvillard Differential Revision: D25023778 fbshipit-source-id: 30b950f7a --- facebook-clang-plugins/libtooling/ASTExporter.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/facebook-clang-plugins/libtooling/ASTExporter.h b/facebook-clang-plugins/libtooling/ASTExporter.h index 60c50e87f..76a23e09c 100644 --- a/facebook-clang-plugins/libtooling/ASTExporter.h +++ b/facebook-clang-plugins/libtooling/ASTExporter.h @@ -2859,8 +2859,8 @@ void ASTExporter::VisitObjCPropertyDecl(const ObjCPropertyDecl *D) { case ObjCPropertyDecl::Optional: OF.emitSimpleVariant("Optional"); break; - case ObjCPropertyDecl::None: - llvm_unreachable("unreachable"); + default: + OF.emitSimpleVariant("None"); break; } }