2014-01-13 14:08:43 -05:00
|
|
|
// Copyright (C) 2011, 2012 Google Inc.
|
2012-07-28 18:27:30 -04:00
|
|
|
//
|
|
|
|
// This file is part of YouCompleteMe.
|
|
|
|
//
|
|
|
|
// YouCompleteMe is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// YouCompleteMe is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with YouCompleteMe. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
#ifndef DIAGNOSTIC_H_BZH3BWIZ
|
|
|
|
#define DIAGNOSTIC_H_BZH3BWIZ
|
|
|
|
|
|
|
|
#include "standard.h"
|
2014-01-04 23:44:13 -05:00
|
|
|
#include "Range.h"
|
|
|
|
#include "Location.h"
|
|
|
|
|
2012-07-28 18:27:30 -04:00
|
|
|
#include <string>
|
2014-01-04 23:44:13 -05:00
|
|
|
#include <vector>
|
2012-07-28 18:27:30 -04:00
|
|
|
|
2013-01-19 23:03:32 -05:00
|
|
|
namespace YouCompleteMe {
|
2012-07-28 18:27:30 -04:00
|
|
|
|
2013-01-19 23:03:32 -05:00
|
|
|
struct Diagnostic {
|
|
|
|
bool operator== ( const Diagnostic &other ) const {
|
2012-07-28 18:27:30 -04:00
|
|
|
return
|
2014-01-04 23:44:13 -05:00
|
|
|
location_ == other.location_ &&
|
2012-07-28 18:27:30 -04:00
|
|
|
kind_ == other.kind_ &&
|
|
|
|
text_ == other.text_;
|
|
|
|
}
|
|
|
|
|
2014-01-04 23:44:13 -05:00
|
|
|
Location location_;
|
|
|
|
|
2014-01-05 19:09:40 -05:00
|
|
|
Range location_extent_;
|
|
|
|
|
2014-01-04 23:44:13 -05:00
|
|
|
std::vector< Range > ranges_;
|
2012-07-28 18:27:30 -04:00
|
|
|
|
|
|
|
// Vim's error "kind"
|
|
|
|
// 'I' -> informational
|
|
|
|
// 'W' -> warning
|
|
|
|
// 'E' -> error
|
|
|
|
char kind_;
|
|
|
|
|
|
|
|
std::string text_;
|
2012-08-15 22:39:03 -04:00
|
|
|
|
|
|
|
std::string long_formatted_text_;
|
2012-07-28 18:27:30 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace YouCompleteMe
|
|
|
|
|
|
|
|
#endif /* end of include guard: DIAGNOSTIC_H_BZH3BWIZ */
|