r260411 - Silence some MSVC false positive warnings about integer zexts and falling off the end of a covered switch
Reid Kleckner via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 10 11:09:16 PST 2016
Author: rnk
Date: Wed Feb 10 13:09:15 2016
New Revision: 260411
URL: http://llvm.org/viewvc/llvm-project?rev=260411&view=rev
Log:
Silence some MSVC false positive warnings about integer zexts and falling off the end of a covered switch
Modified:
cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp
cfe/trunk/lib/Sema/CodeCompleteConsumer.cpp
cfe/trunk/lib/Tooling/Core/QualTypeNames.cpp
Modified: cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp?rev=260411&r1=260410&r2=260411&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp (original)
+++ cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp Wed Feb 10 13:09:15 2016
@@ -2311,7 +2311,7 @@ struct ResetGuardBit final : EHScopeStac
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);
}
};
Modified: cfe/trunk/lib/Sema/CodeCompleteConsumer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/CodeCompleteConsumer.cpp?rev=260411&r1=260410&r2=260411&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/CodeCompleteConsumer.cpp (original)
+++ cfe/trunk/lib/Sema/CodeCompleteConsumer.cpp Wed Feb 10 13:09:15 2016
@@ -309,7 +309,7 @@ StringRef CodeCompletionTUInfo::getParen
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();
}
Modified: cfe/trunk/lib/Tooling/Core/QualTypeNames.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/Core/QualTypeNames.cpp?rev=260411&r1=260410&r2=260411&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/Core/QualTypeNames.cpp (original)
+++ cfe/trunk/lib/Tooling/Core/QualTypeNames.cpp Wed Feb 10 13:09:15 2016
@@ -243,6 +243,7 @@ static NestedNameSpecifier *getFullyQual
return Scope;
}
}
+ llvm_unreachable("bad NNS kind");
}
/// \brief Create a nested name specifier for the declaring context of
More information about the cfe-commits
mailing list