[clang] 3483cdc - [Sema] Silence warnings when targeting x86 with VS2019 16.5.4

Alexandre Ganea via cfe-commits cfe-commits at lists.llvm.org
Wed May 6 06:12:09 PDT 2020


Author: Alexandre Ganea
Date: 2020-05-06T09:11:59-04:00
New Revision: 3483cdc8344d9c2c08c3f12490df54cfa63b6838

URL: https://github.com/llvm/llvm-project/commit/3483cdc8344d9c2c08c3f12490df54cfa63b6838
DIFF: https://github.com/llvm/llvm-project/commit/3483cdc8344d9c2c08c3f12490df54cfa63b6838.diff

LOG: [Sema] Silence warnings when targeting x86 with VS2019 16.5.4

Differential Revision: https://reviews.llvm.org/D79337

Added: 
    

Modified: 
    clang/lib/Sema/ParsedAttr.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/ParsedAttr.cpp b/clang/lib/Sema/ParsedAttr.cpp
index d45777ca127d..3ef8498baffd 100644
--- a/clang/lib/Sema/ParsedAttr.cpp
+++ b/clang/lib/Sema/ParsedAttr.cpp
@@ -111,7 +111,7 @@ namespace {
 
 const ParsedAttrInfo &ParsedAttrInfo::get(const AttributeCommonInfo &A) {
   // If we have a ParsedAttrInfo for this ParsedAttr then return that.
-  if (A.getParsedKind() < llvm::array_lengthof(AttrInfoMap))
+  if ((size_t)A.getParsedKind() < llvm::array_lengthof(AttrInfoMap))
     return *AttrInfoMap[A.getParsedKind()];
 
   // If this is an ignored attribute then return an appropriate ParsedAttrInfo.


        


More information about the cfe-commits mailing list