[PATCH] D79337: Silence warnings when compiling x86 with latest MSVC

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


This revision was automatically updated to reflect the committed changes.
Closed by commit rG3483cdc8344d: [Sema] Silence warnings when targeting x86 with VS2019 16.5.4 (authored by aganea).

Changed prior to commit:
  https://reviews.llvm.org/D79337?vs=261848&id=262356#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79337/new/

https://reviews.llvm.org/D79337

Files:
  clang/lib/Sema/ParsedAttr.cpp


Index: clang/lib/Sema/ParsedAttr.cpp
===================================================================
--- clang/lib/Sema/ParsedAttr.cpp
+++ clang/lib/Sema/ParsedAttr.cpp
@@ -111,7 +111,7 @@
 
 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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79337.262356.patch
Type: text/x-patch
Size: 602 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200506/e1c3217a/attachment.bin>


More information about the llvm-commits mailing list