summaryrefslogtreecommitdiffstats
path: root/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-04-30 21:23:01 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-04-30 21:23:01 +0000
commit061f1e21bee0c8fec2dda677958c3c27c5a538e5 (patch)
tree093a5f85b95dc4692e4e90b08ec2c96305ab7072 /clang/unittests/ASTMatchers/ASTMatchersTest.cpp
parent9da442f5068839dbc049cee3556855a17a85802e (diff)
downloadbcm5719-llvm-061f1e21bee0c8fec2dda677958c3c27c5a538e5.tar.gz
bcm5719-llvm-061f1e21bee0c8fec2dda677958c3c27c5a538e5.zip
When deducing an 'auto' type, don't modify the type-as-written.
llvm-svn: 180808
Diffstat (limited to 'clang/unittests/ASTMatchers/ASTMatchersTest.cpp')
-rw-r--r--clang/unittests/ASTMatchers/ASTMatchersTest.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
index 24438a2ee4f..cfa53868ed2 100644
--- a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
+++ b/clang/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) {
OpenPOWER on IntegriCloud