Fix regression in 'tblgen -gen-clang-diags-defs': Emit the diagnostic kind instead of "DIAGNOSTICCONTROLLED".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67305 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Ted Kremenek 2009-03-19 17:18:09 +00:00
parent 5e6345bde0
commit 7fae82f67a

View File

@ -43,7 +43,8 @@ static const RecordVal* findRecordVal(const Record& R, const std::string &key) {
static const Record* getDiagKind(const Record* DiagClass, const Record &R) {
const SuperClassVector &SC = R.getSuperClasses();
for (SuperClassVector::const_iterator I=SC.begin(), E=SC.end(); I!=E; ++I)
if ((*I)->isSubClassOf(DiagClass))
if ((*I)->isSubClassOf(DiagClass) &&
(*I)->getName() != "DiagnosticControlled")
return *I;
return 0;