diff options
author | Tom Care <tom.care@uqconnect.edu.au> | 2010-08-23 19:57:25 +0000 |
---|---|---|
committer | Tom Care <tom.care@uqconnect.edu.au> | 2010-08-23 19:57:25 +0000 |
commit | 905c051e477ed186e984bd441f8573eeb9e34fb3 (patch) | |
tree | 4b3f1c99152856774bf661250684555d004c5b82 /clang/test/Analysis/idempotent-operations.c | |
parent | e332c3b762790241706215bb84a787acb42a949e (diff) | |
download | bcm5719-llvm-905c051e477ed186e984bd441f8573eeb9e34fb3.tar.gz bcm5719-llvm-905c051e477ed186e984bd441f8573eeb9e34fb3.zip |
Modified pseudoconstant test case to make it a bit clearer and fix a missing line
llvm-svn: 111833
Diffstat (limited to 'clang/test/Analysis/idempotent-operations.c')
-rw-r--r-- | clang/test/Analysis/idempotent-operations.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/test/Analysis/idempotent-operations.c b/clang/test/Analysis/idempotent-operations.c index 179c7a4da3f..3724b93cc74 100644 --- a/clang/test/Analysis/idempotent-operations.c +++ b/clang/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 } |