aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/null_in_arithmetic_ops.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2012-03-02 22:01:22 +0000
committerNico Weber <nicolasweber@gmx.de>2012-03-02 22:01:22 +0000
commit1cb2d742eb6635aeab6132ee5f0b5781d39487d7 (patch)
tree5f3a191f5044568284328c2a2dd17443de518db8 /test/SemaCXX/null_in_arithmetic_ops.cpp
parentb0a6615cb9f5e881b81b117017b484fe91112967 (diff)
Add -Wstring-plus-int, which warns on "str" + int and int + "str".
It doesn't warn if the integer is known at compile time and within the bounds of the string. Discussion: http://comments.gmane.org/gmane.comp.compilers.clang.scm/47203 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151943 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/null_in_arithmetic_ops.cpp')
-rw-r--r--test/SemaCXX/null_in_arithmetic_ops.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/SemaCXX/null_in_arithmetic_ops.cpp b/test/SemaCXX/null_in_arithmetic_ops.cpp
index 24590ce633..a6c0dbfc65 100644
--- a/test/SemaCXX/null_in_arithmetic_ops.cpp
+++ b/test/SemaCXX/null_in_arithmetic_ops.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -fblocks -Wnull-arithmetic -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -fblocks -Wnull-arithmetic -verify -Wno-string-plus-int %s
#include <stddef.h>
void f() {