summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/exprs.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/exprs.c')
-rw-r--r--clang/test/Sema/exprs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/test/Sema/exprs.c b/clang/test/Sema/exprs.c
index ba411c528da..45e146286a3 100644
--- a/clang/test/Sema/exprs.c
+++ b/clang/test/Sema/exprs.c
@@ -20,8 +20,11 @@ void test4() {
static int var;
var =+ 5; // expected-warning {{use of unary operator that may be intended as compound assignment (+=)}}
var =- 5; // expected-warning {{use of unary operator that may be intended as compound assignment (-=)}}
- var = +5;
+ var = +5; // no warning when space between the = and +.
var = -5;
+
+ var =+5; // no warning when the subexpr of the unary op has no space before it.
+ var =-5;
}
// rdar://6319320
OpenPOWER on IntegriCloud