зеркало из https://github.com/microsoft/clang-1.git
Remove 'LangOpts' from Diagnostic (added in http://llvm.org/viewvc/llvm-project?view=rev&revision=90642).
Simply use the 'LangOpts' member already present in TextDiagnosticPrinter. Sorry for the confusion! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90664 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
0e7049fc6f
Коммит
0304c6cb7f
|
@ -182,7 +182,6 @@ private:
|
|||
bool SuppressAllDiagnostics; // Suppress all diagnostics.
|
||||
ExtensionHandling ExtBehavior; // Map extensions onto warnings or errors?
|
||||
DiagnosticClient *Client;
|
||||
LangOptions *LangOpts;
|
||||
|
||||
/// DiagMappings - Mapping information for diagnostics. Mapping info is
|
||||
/// packed into four bits per diagnostic. The low three bits are the mapping
|
||||
|
@ -239,9 +238,6 @@ public:
|
|||
DiagnosticClient *getClient() { return Client; }
|
||||
const DiagnosticClient *getClient() const { return Client; }
|
||||
|
||||
LangOptions *getLangOpts() const { return LangOpts; }
|
||||
void setLangOpts(LangOptions *LOpts) { LangOpts = LOpts; }
|
||||
|
||||
/// pushMappings - Copies the current DiagMappings and pushes the new copy
|
||||
/// onto the top of the stack.
|
||||
void pushMappings();
|
||||
|
|
|
@ -210,7 +210,6 @@ Diagnostic::Diagnostic(DiagnosticClient *client) : Client(client) {
|
|||
ErrorOccurred = false;
|
||||
FatalErrorOccurred = false;
|
||||
NumDiagnostics = 0;
|
||||
LangOpts = 0;
|
||||
|
||||
NumErrors = 0;
|
||||
CustomDiagInfo = 0;
|
||||
|
|
|
@ -655,9 +655,7 @@ void TextDiagnosticPrinter::HandleDiagnostic(Diagnostic::Level Level,
|
|||
OS.changeColor(savedColor, true);
|
||||
|
||||
// Emit a Visual Studio compatible line number syntax.
|
||||
// This check is a bit paranoid (in case LangOpts isn't set).
|
||||
if (Info.getDiags() && Info.getDiags()->getLangOpts() &&
|
||||
Info.getDiags()->getLangOpts()->Microsoft) {
|
||||
if (LangOpts && LangOpts->Microsoft) {
|
||||
OS << PLoc.getFilename() << '(' << LineNo << ')';
|
||||
OS << " : ";
|
||||
} else {
|
||||
|
|
|
@ -236,8 +236,6 @@ int main(int argc, char **argv) {
|
|||
Clang.createDiagnostics(argc, argv);
|
||||
if (!Clang.hasDiagnostics())
|
||||
return 1;
|
||||
|
||||
Clang.getDiagnostics().setLangOpts(&Clang.getLangOpts());
|
||||
|
||||
// Set an error handler, so that any LLVM backend diagnostics go through our
|
||||
// error handler.
|
||||
|
|
Загрузка…
Ссылка в новой задаче