diff options
author | Jordan Rose <jordan_rose@apple.com> | 2014-08-20 16:51:26 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2014-08-20 16:51:26 +0000 |
commit | f3544e913defc63a52fd5e6acfc17fe6f5408711 (patch) | |
tree | 1ac4e3c6502e2c2d77b881522b5320eeb0862f39 /clang/test/Analysis/identical-expressions.cpp | |
parent | b6100301e8e0aa4a47b0ef3be8d5d34341d54d53 (diff) | |
download | bcm5719-llvm-f3544e913defc63a52fd5e6acfc17fe6f5408711.tar.gz bcm5719-llvm-f3544e913defc63a52fd5e6acfc17fe6f5408711.zip |
[analyzer] IdenticalExpr: don't try to compare integer literals with different widths.
PR20659. Patch by Anders Rönnholm.
llvm-svn: 216076
Diffstat (limited to 'clang/test/Analysis/identical-expressions.cpp')
-rw-r--r-- | clang/test/Analysis/identical-expressions.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/Analysis/identical-expressions.cpp b/clang/test/Analysis/identical-expressions.cpp index 3c8040aed8b..1711d8043c1 100644 --- a/clang/test/Analysis/identical-expressions.cpp +++ b/clang/test/Analysis/identical-expressions.cpp @@ -1518,3 +1518,15 @@ void test_warn_wchar() { void test_nowarn_wchar() { const wchar_t * a = 0 ? L"No" : L"Warning"; } + +void test_nowarn_long() { + int a =0, b = 0; + long c; + if (0) { + b -= a; + c = 0; + } else { // no-warning + b -= a; + c = 0xFFFFFFFFFFFFFFFF; + } +} |