diff options
| author | Ted Kremenek <kremenek@apple.com> | 2010-01-15 07:56:51 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2010-01-15 07:56:51 +0000 |
| commit | d74cc397c8dc8fc02699b276f0ea02fb99a32804 (patch) | |
| tree | adb9de162dd12b2f787a9221c753996777fc7d65 /clang/test | |
| parent | 959990b840c0ec06ed5314ad1b3e089cd31b498b (diff) | |
| download | bcm5719-llvm-d74cc397c8dc8fc02699b276f0ea02fb99a32804.tar.gz bcm5719-llvm-d74cc397c8dc8fc02699b276f0ea02fb99a32804.zip | |
Teach BugReporter to "escape" the occurance of '%' characters in diagnostic messages when emitted results to the standard Diagnostics output. Fixes PR 6033.
llvm-svn: 93507
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Analysis/misc-ps.m | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Analysis/misc-ps.m b/clang/test/Analysis/misc-ps.m index 149be03ac26..9543a98fe32 100644 --- a/clang/test/Analysis/misc-ps.m +++ b/clang/test/Analysis/misc-ps.m @@ -801,3 +801,13 @@ void test_bad_msg(TestBadArg *p) { [p testBadArg:y]; // expected-warning{{Pass-by-value argument in message expression is undefined}} } +//===----------------------------------------------------------------------===// +// PR 6033 - Test emitting the correct output in a warning where we use '%' +// with operands that are undefined. +//===----------------------------------------------------------------------===// + +int pr6033(int x) { + int y; + return x % y; // expected-warning{{The right operand of '%' is a garbage value}} +} + |

