From 13b9bf9022e4a9f217489273f6128457efd84d34 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Mon, 23 Mar 2009 21:54:33 +0000 Subject: [PATCH] Add sanity check in Clang TableGen backend to check if 'Component' is a string. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67565 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/ClangDiagnosticsEmitter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/TableGen/ClangDiagnosticsEmitter.cpp b/utils/TableGen/ClangDiagnosticsEmitter.cpp index 0f93a4fb100..38bbf8eee6c 100644 --- a/utils/TableGen/ClangDiagnosticsEmitter.cpp +++ b/utils/TableGen/ClangDiagnosticsEmitter.cpp @@ -113,7 +113,7 @@ void ClangDiagsDefsEmitter::run(std::ostream &OS) { continue; const StringInit* SV = dynamic_cast(V->getValue()); - if (SV->getValue() != Component) + if (!SV || SV->getValue() != Component) continue; } -- 2.34.1