mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-11 17:08:42 +00:00
Wdeprecated: StoredDiagnostics are stored in a SmallVector, so make sure they're copy/movable
Removing the no-op dtor makes these objects safely implicitly copyable/movable/etc. (& tidy up the ctor, while I'm here) llvm-svn: 244971
This commit is contained in:
parent
a137bf9386
commit
210ea0b31a
@ -1264,7 +1264,7 @@ class StoredDiagnostic {
|
||||
std::vector<FixItHint> FixIts;
|
||||
|
||||
public:
|
||||
StoredDiagnostic();
|
||||
StoredDiagnostic() = default;
|
||||
StoredDiagnostic(DiagnosticsEngine::Level Level, const Diagnostic &Info);
|
||||
StoredDiagnostic(DiagnosticsEngine::Level Level, unsigned ID,
|
||||
StringRef Message);
|
||||
@ -1272,7 +1272,6 @@ public:
|
||||
StringRef Message, FullSourceLoc Loc,
|
||||
ArrayRef<CharSourceRange> Ranges,
|
||||
ArrayRef<FixItHint> Fixits);
|
||||
~StoredDiagnostic();
|
||||
|
||||
/// \brief Evaluates true when this object stores a diagnostic.
|
||||
explicit operator bool() const { return Message.size() > 0; }
|
||||
|
@ -945,8 +945,6 @@ FormatDiagnostic(const char *DiagStr, const char *DiagEnd,
|
||||
OutStr.append(Tree.begin(), Tree.end());
|
||||
}
|
||||
|
||||
StoredDiagnostic::StoredDiagnostic() { }
|
||||
|
||||
StoredDiagnostic::StoredDiagnostic(DiagnosticsEngine::Level Level, unsigned ID,
|
||||
StringRef Message)
|
||||
: ID(ID), Level(Level), Loc(), Message(Message) { }
|
||||
@ -975,8 +973,6 @@ StoredDiagnostic::StoredDiagnostic(DiagnosticsEngine::Level Level, unsigned ID,
|
||||
{
|
||||
}
|
||||
|
||||
StoredDiagnostic::~StoredDiagnostic() { }
|
||||
|
||||
/// IncludeInDiagnosticCounts - This method (whose default implementation
|
||||
/// returns true) indicates whether the diagnostics handled by this
|
||||
/// DiagnosticConsumer should be included in the number of diagnostics
|
||||
|
Loading…
Reference in New Issue
Block a user