aboutsummaryrefslogtreecommitdiff
path: root/gcc/analyzer/sm-fd.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/analyzer/sm-fd.cc')
-rw-r--r--gcc/analyzer/sm-fd.cc23
1 files changed, 12 insertions, 11 deletions
diff --git a/gcc/analyzer/sm-fd.cc b/gcc/analyzer/sm-fd.cc
index 370d7a0..b8ae0a1 100644
--- a/gcc/analyzer/sm-fd.cc
+++ b/gcc/analyzer/sm-fd.cc
@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see
#include "analyzer/common.h"
-#include "diagnostic-event-id.h"
+#include "diagnostics/event-id.h"
#include "stringpool.h"
#include "attribs.h"
@@ -392,21 +392,22 @@ public:
return false;
}
- diagnostic_event::meaning
+ diagnostics::paths::event::meaning
get_meaning_for_state_change (
const evdesc::state_change &change) const final override
{
+ using event = diagnostics::paths::event;
if (change.m_old_state == m_sm.get_start_state ()
&& (m_sm.is_unchecked_fd_p (change.m_new_state)
|| change.m_new_state == m_sm.m_new_datagram_socket
|| change.m_new_state == m_sm.m_new_stream_socket
|| change.m_new_state == m_sm.m_new_unknown_socket))
- return diagnostic_event::meaning (diagnostic_event::verb::acquire,
- diagnostic_event::noun::resource);
+ return event::meaning (event::verb::acquire,
+ event::noun::resource);
if (change.m_new_state == m_sm.m_closed)
- return diagnostic_event::meaning (diagnostic_event::verb::release,
- diagnostic_event::noun::resource);
- return diagnostic_event::meaning ();
+ return event::meaning (event::verb::release,
+ event::noun::resource);
+ return event::meaning ();
}
protected:
@@ -561,7 +562,7 @@ public:
}
private:
- diagnostic_event_id_t m_open_event;
+ diagnostics::paths::event_id_t m_open_event;
std::unique_ptr<program_state> m_final_state;
};
@@ -705,7 +706,7 @@ public:
}
private:
- diagnostic_event_id_t m_first_close_event;
+ diagnostics::paths::event_id_t m_first_close_event;
};
class fd_use_after_close : public fd_param_diagnostic
@@ -784,7 +785,7 @@ public:
}
private:
- diagnostic_event_id_t m_first_close_event;
+ diagnostics::paths::event_id_t m_first_close_event;
};
class fd_use_without_check : public fd_param_diagnostic
@@ -854,7 +855,7 @@ public:
}
private:
- diagnostic_event_id_t m_first_open_event;
+ diagnostics::paths::event_id_t m_first_open_event;
};
/* Concrete pending_diagnostic subclass for -Wanalyzer-fd-phase-mismatch. */