Skip to content

Commit

Permalink
add test for bug #21
Browse files Browse the repository at this point in the history
  • Loading branch information
rizsotto committed Aug 4, 2013
1 parent 449b2f0 commit b9272af
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/PseudoConstAnalysis/Bug21.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// RUN: %clang_cc1 %s -fsyntax-only -verify
// expected-no-diagnostics

struct B {
int member;

int mutator() {
++member;
return member;
}

int const_logic(int const arg) const {
return arg + member;
}

int test() {
return const_logic(mutator());
}
};

0 comments on commit b9272af

Please sign in to comment.