"git@repo.hca.bsc.es:rferrer/llvm-epi-0.8.git" did not exist on "a58a3f930a023ccd7e083e5ec4e90d55c8bc246d"
Newer
Older
//===--- TextDiagnosticBuffer.cpp - Buffer Text Diagnostics ---------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This is a concrete diagnostic client, which buffers the diagnostic messages.
//
//===----------------------------------------------------------------------===//
Nico Weber
committed
#include "clang/Driver/TextDiagnosticBuffer.h"
/// HandleDiagnostic - Store the errors, warnings, and notes that are
/// reported.
Chris Lattner
committed
void TextDiagnosticBuffer::HandleDiagnostic(Diagnostic::Level Level,
const DiagnosticInfo &Info) {
switch (Level) {
default: assert(0 && "Diagnostic not handled during diagnostic buffering!");
case Diagnostic::Note:
Chris Lattner
committed
Notes.push_back(std::make_pair(Info.getLocation().getLocation(),
FormatDiagnostic(Info)));
Chris Lattner
committed
Warnings.push_back(std::make_pair(Info.getLocation().getLocation(),
FormatDiagnostic(Info)));
Chris Lattner
committed
Errors.push_back(std::make_pair(Info.getLocation().getLocation(),
FormatDiagnostic(Info)));