diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-04-30 21:23:01 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-04-30 21:23:01 +0000 |
commit | 9b1317531d376738fd6631291b0a04109c76a63b (patch) | |
tree | 7ad9189e14f6588a784230d2278ea9399f91c8e3 /unittests | |
parent | 3d2f000df9311bfccb6d2ac350be3d3efa5a412b (diff) |
When deducing an 'auto' type, don't modify the type-as-written.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180808 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/ASTMatchers/ASTMatchersTest.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/unittests/ASTMatchers/ASTMatchersTest.cpp b/unittests/ASTMatchers/ASTMatchersTest.cpp index 24438a2ee4..cfa53868ed 100644 --- a/unittests/ASTMatchers/ASTMatchersTest.cpp +++ b/unittests/ASTMatchers/ASTMatchersTest.cpp @@ -3416,10 +3416,12 @@ TEST(TypeMatching, MatchesAutoTypes) { EXPECT_TRUE(matches("int v[] = { 2, 3 }; void f() { for (int i : v) {} }", autoType())); - EXPECT_TRUE(matches("auto a = 1;", - autoType(hasDeducedType(isInteger())))); - EXPECT_TRUE(notMatches("auto b = 2.0;", - autoType(hasDeducedType(isInteger())))); + // FIXME: Matching against the type-as-written can't work here, because the + // type as written was not deduced. + //EXPECT_TRUE(matches("auto a = 1;", + // autoType(hasDeducedType(isInteger())))); + //EXPECT_TRUE(notMatches("auto b = 2.0;", + // autoType(hasDeducedType(isInteger())))); } TEST(TypeMatching, MatchesFunctionTypes) { |