clang-tags
C/C++ source code indexing tool based on libclang
 All Classes Functions Variables Typedefs Groups Pages
sourceLocation.hxx
1 #pragma once
2 #include <clang-c/Index.h>
3 #include <string>
4 
5 namespace LibClang {
23  public:
31  struct Position {
32  std::string file;
33  unsigned int line;
34  unsigned int column;
35  unsigned int offset;
36  };
37 
44  bool operator== (const SourceLocation & other) const;
45 
53  const Position expansionLocation () const;
54 
55  private:
56  SourceLocation (CXSourceLocation raw);
57  CXSourceLocation location_;
58  const CXSourceLocation & raw () const;
59 
60  // Friend declaration
61  friend class TranslationUnit;
62  friend class Cursor;
63  };
64 
66 }