them with -Werror. Custom diags cannot be mapped, and this makes
-Werror cause a determinstic crash for the checker and other
clients of the custom diagnostics machinery. rdar://
6816191
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70639
91177308-0d34-0410-b5e6-
96231b3b80d8
unsigned ID = DiagInfo.size()+DIAG_UPPER_LIMIT;
DiagIDs.insert(std::make_pair(D, ID));
DiagInfo.push_back(D);
-
- // If this is a warning, and all warnings are supposed to map to errors,
- // insert the mapping now.
- if (L == Diagnostic::Warning && Diags.getWarningsAsErrors())
- Diags.setDiagnosticMapping((diag::kind)ID, diag::MAP_ERROR);
return ID;
}
};