blob: f9240eb61aa6b13ae0a653b400db63a283ff7c02 [file] [log] [blame]
Ted Kremenekade31952011-03-12 06:14:28 +00001// RUN: %clang_cc1 -analyze -analyzer-store=region -analyzer-constraints=range -fblocks -analyzer-opt-analyze-nested-blocks -analyzer-checker=deadcode.IdempotentOperations -verify %s
Tom Careef52bcb2010-08-24 21:09:07 +00002
3// C++ specific false positives
4
5extern void test(int i);
6extern void test_ref(int &i);
7
8// Test references affecting pseudoconstants
9void false1() {
10 int a = 0;
11 int five = 5;
12 int &b = a;
13 test(five * a); // expected-warning {{The right operand to '*' is always 0}}
14 b = 4;
15}