Silence some MSVC false positive warnings about integer zexts and falling off the...
authorReid Kleckner <rnk@google.com>
Wed, 10 Feb 2016 19:09:15 +0000 (19:09 +0000)
committerReid Kleckner <rnk@google.com>
Wed, 10 Feb 2016 19:09:15 +0000 (19:09 +0000)
llvm-svn: 260411

clang/lib/CodeGen/MicrosoftCXXABI.cpp
clang/lib/Sema/CodeCompleteConsumer.cpp
clang/lib/Tooling/Core/QualTypeNames.cpp

index f47b120..2567aa9 100644 (file)
@@ -2311,7 +2311,7 @@ struct ResetGuardBit final : EHScopeStack::Cleanup {
     CGBuilderTy &Builder = CGF.Builder;
     llvm::LoadInst *LI = Builder.CreateLoad(Guard);
     llvm::ConstantInt *Mask =
-        llvm::ConstantInt::get(CGF.IntTy, ~(1U << GuardNum));
+        llvm::ConstantInt::get(CGF.IntTy, ~(1ULL << GuardNum));
     Builder.CreateStore(Builder.CreateAnd(LI, Mask), Guard);
   }
 };
index 18e9a59..9a4f0d9 100644 (file)
@@ -309,7 +309,7 @@ StringRef CodeCompletionTUInfo::getParentName(const DeclContext *DC) {
         if (!Interface) {
           // Assign an empty StringRef but with non-null data to distinguish
           // between empty because we didn't process the DeclContext yet.
-          CachedParentName = StringRef((const char *)~0U, 0);
+          CachedParentName = StringRef((const char *)(uintptr_t)~0U, 0);
           return StringRef();
         }
         
index 6c3ff14..59fae37 100644 (file)
@@ -243,6 +243,7 @@ static NestedNameSpecifier *getFullyQualifiedNestedNameSpecifier(
       return Scope;
     }
   }
+  llvm_unreachable("bad NNS kind");
 }
 
 /// \brief Create a nested name specifier for the declaring context of