Fix compilation error on MSYS2 systems

This commit is contained in:
Romain Deterre 2018-10-11 11:20:51 -04:00
parent 16d1f6b002
commit 83b22013e3

View File

@ -13,6 +13,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==============================================================================*/ ==============================================================================*/
#define __STDC_FORMAT_MACROS
#include "indexer.h" #include "indexer.h"
#include "clang_complete.hh" #include "clang_complete.hh"
@ -793,7 +795,7 @@ public:
GetSymbolKind(cast<Decl>(SemDC), entity->def.parent_kind); GetSymbolKind(cast<Decl>(SemDC), entity->def.parent_kind);
} else if (is_decl) { } else if (is_decl) {
DeclRef &dr = entity->declarations.emplace_back(); DeclRef &dr = entity->declarations.emplace_back();
static_cast<Use&>(dr) = {{loc, role}, lid}; static_cast<Use &>(dr) = {{loc, role}, lid};
SourceRange R = OrigD->getSourceRange(); SourceRange R = OrigD->getSourceRange();
dr.extent = R.getBegin().isFileID() ? FromTokenRange(SM, Lang, R) : loc; dr.extent = R.getBegin().isFileID() ? FromTokenRange(SM, Lang, R) : loc;
} else { } else {