summaryrefslogtreecommitdiffstats
path: root/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
diff options
context:
space:
mode:
authorIsmail Pazarbasi <ismail.pazarbasi@gmail.com>2014-01-17 21:08:52 +0000
committerIsmail Pazarbasi <ismail.pazarbasi@gmail.com>2014-01-17 21:08:52 +0000
commit1121de36c26b9cf5a0f4f5d35a1fcd51553e74f4 (patch)
treed7df0f7ab29f1e89d32fb4e82c178ec1ec4235e4 /clang/unittests/ASTMatchers/ASTMatchersTest.cpp
parent990a692f4a9251d1fb694768e6c1895b8b8b9945 (diff)
downloadbcm5719-llvm-1121de36c26b9cf5a0f4f5d35a1fcd51553e74f4.tar.gz
bcm5719-llvm-1121de36c26b9cf5a0f4f5d35a1fcd51553e74f4.zip
Fix string-literal to char* conversion in overload resolution for C++11
String literal to char* conversion is deprecated in C++03, and is removed in C++11. We still accept this conversion in C++11 mode as an extension, if we find it in the best viable function. llvm-svn: 199513
Diffstat (limited to 'clang/unittests/ASTMatchers/ASTMatchersTest.cpp')
-rw-r--r--clang/unittests/ASTMatchers/ASTMatchersTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
index e042d54a9a0..771cf673ab2 100644
--- a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
+++ b/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
@@ -2608,13 +2608,13 @@ TEST(ReinterpretCast, DoesNotMatchOtherCasts) {
}
TEST(FunctionalCast, MatchesSimpleCase) {
- std::string foo_class = "class Foo { public: Foo(char*); };";
+ std::string foo_class = "class Foo { public: Foo(const char*); };";
EXPECT_TRUE(matches(foo_class + "void r() { Foo f = Foo(\"hello world\"); }",
functionalCastExpr()));
}
TEST(FunctionalCast, DoesNotMatchOtherCasts) {
- std::string FooClass = "class Foo { public: Foo(char*); };";
+ std::string FooClass = "class Foo { public: Foo(const char*); };";
EXPECT_TRUE(
notMatches(FooClass + "void r() { Foo f = (Foo) \"hello world\"; }",
functionalCastExpr()));
OpenPOWER on IntegriCloud