Skip to content
Commit bf0f7757 authored by Davide Italiano's avatar Davide Italiano
Browse files

[Sema] Warn when shifting a negative value.

Example:
 % ./clang -Wshift-negative-value emit.c
emit.c:3:14: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  int a = -1 << 3;
          ~~ ^
1 warning generated.

PR:		24026
Differential Revision:	 http://reviews.llvm.org/D10938
Reviewed by:	rsmith

llvm-svn: 241478
parent 183f53fd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment