From: Timur Iskhodzhanov Date: Tue, 7 Apr 2015 11:26:00 +0000 (+0000) Subject: Fix a compiler error under MSVC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a388c2a9b11b803fe804d4e2bb81d3eb5ba46a8c;p=clang Fix a compiler error under MSVC Error message was: CGDebugInfo.cpp(1047) : error C2666: 'llvm::MDTypeRefArray::operator []' : 2 overloads have similar conversions DebugInfoMetadata.h(106): could be 'llvm::MDTypeRef llvm::MDTypeRefArray::operator [](unsigned int) const' while trying to match the argument list '(llvm::DITypeArray, int)' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234308 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 96ca886c64..da90f0265c 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -1044,7 +1044,7 @@ llvm::DICompositeType CGDebugInfo::getOrCreateInstanceMethodType( SmallVector Elts; // First element is always return type. For 'void' functions it is NULL. - Elts.push_back(Args[0]); + Elts.push_back(Args[0u]); // "this" pointer is always first argument. const CXXRecordDecl *RD = ThisPtr->getPointeeCXXRecordDecl();