summaryrefslogtreecommitdiffstats
path: root/clang/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
commitccec40d9b75602c35025140fff5c4cdbd5f99f8d (patch)
treecf3973dd02034c6e193048abbbd419d7a24130c1 /clang/test/SemaCXX/null_in_arithmetic_ops.cpp
parent7923ef41e18bf9fd31b2753cb026874001c36eb0 (diff)
downloadbcm5719-llvm-ccec40d9b75602c35025140fff5c4cdbd5f99f8d.tar.gz
bcm5719-llvm-ccec40d9b75602c35025140fff5c4cdbd5f99f8d.zip
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 llvm-svn: 151943
Diffstat (limited to 'clang/test/SemaCXX/null_in_arithmetic_ops.cpp')
-rw-r--r--clang/test/SemaCXX/null_in_arithmetic_ops.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/null_in_arithmetic_ops.cpp b/clang/test/SemaCXX/null_in_arithmetic_ops.cpp
index 24590ce633f..a6c0dbfc656 100644
--- a/clang/test/SemaCXX/null_in_arithmetic_ops.cpp
+++ b/clang/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() {
OpenPOWER on IntegriCloud