aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Care <tom.care@uqconnect.edu.au>2010-08-23 19:57:25 +0000
committerTom Care <tom.care@uqconnect.edu.au>2010-08-23 19:57:25 +0000
commit823894110e6f161a29450dbdea44ab987cfe16bb (patch)
tree4756a0d5cbdef896c326d2b93b7603eb4a104b96
parentdb34ab70961ca4b24b600eb47053d7af304659f5 (diff)
Modified pseudoconstant test case to make it a bit clearer and fix a missing line
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111833 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Analysis/idempotent-operations.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/Analysis/idempotent-operations.c b/test/Analysis/idempotent-operations.c
index 179c7a4da3..3724b93cc7 100644
--- a/test/Analysis/idempotent-operations.c
+++ b/test/Analysis/idempotent-operations.c
@@ -106,9 +106,8 @@ unsigned false3(int param) {
unsigned false4() {
// Trivial constant
const int height = 1;
-
- // Pseudo-constant (never changes after decl)
- int width = height;
+ int c = 42;
+ test(height * c); // no-warning
// Pseudo-constant (blockvar)
__block int a = 0;
@@ -116,6 +115,9 @@ unsigned false4() {
a *= b; // no-warning
test(a);
+ // Pseudo-constant (never changes after decl)
+ int width = height;
+
return width * 10; // no-warning
}