summaryrefslogtreecommitdiff
path: root/odb/diagnostics.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-08-15 11:46:00 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-08-15 11:46:00 +0200
commiteacf52a9a4f3832274fdefc909ab23c13413e128 (patch)
treef1f754b6149797315f91d6f872363555201d5a65 /odb/diagnostics.hxx
parent396cad633b6f0559a39e5111827f9b1125c67506 (diff)
Add support for member accessors/modifiers
New pragmas: get, set, access. New test: common/access.
Diffstat (limited to 'odb/diagnostics.hxx')
-rw-r--r--odb/diagnostics.hxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/odb/diagnostics.hxx b/odb/diagnostics.hxx
index b1e89b0..448b83f 100644
--- a/odb/diagnostics.hxx
+++ b/odb/diagnostics.hxx
@@ -7,6 +7,7 @@
#include <odb/gcc-fwd.hxx>
+#include <string>
#include <cstddef>
#include <iostream>
@@ -65,6 +66,23 @@ warn (cxx_lexer&);
std::ostream&
info (cxx_lexer&);
+// Location as a string in the "<file>:<line>:<column>" format.
+//
+std::string
+location_string (cutl::fs::path const&,
+ std::size_t line,
+ std::size_t clmn,
+ bool leaf = false);
+
+inline std::string
+location_string (location const& l, bool leaf = false)
+{
+ return location_string (l.file, l.line, l.column, leaf);
+}
+
+std::string
+location_string (location_t, bool leaf = false);
+
// location_t macro wrappers.
//
cutl::fs::path