aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/AST/SourceLocationTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/AST/SourceLocationTest.cpp')
-rw-r--r--clang/unittests/AST/SourceLocationTest.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/unittests/AST/SourceLocationTest.cpp b/clang/unittests/AST/SourceLocationTest.cpp
index 832d375..a798f6b 100644
--- a/clang/unittests/AST/SourceLocationTest.cpp
+++ b/clang/unittests/AST/SourceLocationTest.cpp
@@ -242,6 +242,13 @@ TEST(TypeLoc, DecltypeTypeLocRange) {
verify(Target2->getSourceRange(), Code.range("full2"));
}
+TEST(TypeLoc, AutoTypeLocRange) {
+ RangeVerifier<TypeLoc> Verifier;
+ Verifier.expectRange(1, 1, 1, 14);
+ EXPECT_TRUE(Verifier.match("decltype(auto) a = 1;", typeLoc(loc(autoType())),
+ Lang_CXX14));
+}
+
TEST(TypeLoc, LongDoubleRange) {
RangeVerifier<TypeLoc> Verifier;
Verifier.expectRange(1, 1, 1, 6);