r260411 - Silence some MSVC false positive warnings about integer zexts and falling off the end of a covered switch
Joerg Sonnenberger via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 10 17:10:05 PST 2016
On Wed, Feb 10, 2016 at 07:09:16PM -0000, Reid Kleckner via cfe-commits wrote:
> 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();
> }
>
>
Is this address supposed to be special somehow? Because right now, it is
just below 4GB on a 64bit system and otherwise perfectly valid for use
by other things.
Joerg
More information about the cfe-commits
mailing list