diff options
author | Haojian Wu <hokein.wu@gmail.com> | 2022-01-08 00:12:18 +0100 |
---|---|---|
committer | Haojian Wu <hokein.wu@gmail.com> | 2022-01-10 12:46:27 +0100 |
commit | 55d96ac3dc56bdebea854952a724c2a50d96ce19 (patch) | |
tree | ab613943b3937a7952e6ab3dc81e39f60e88b4bf /clang/unittests/AST/SourceLocationTest.cpp | |
parent | abe3003ead808518190d1e9717495735786938d3 (diff) | |
download | llvm-55d96ac3dc56bdebea854952a724c2a50d96ce19.zip llvm-55d96ac3dc56bdebea854952a724c2a50d96ce19.tar.gz llvm-55d96ac3dc56bdebea854952a724c2a50d96ce19.tar.bz2 |
[AST] Add RParen loc for decltype AutoTypeloc.
Differential Revision: https://reviews.llvm.org/D116919
Diffstat (limited to 'clang/unittests/AST/SourceLocationTest.cpp')
-rw-r--r-- | clang/unittests/AST/SourceLocationTest.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/unittests/AST/SourceLocationTest.cpp b/clang/unittests/AST/SourceLocationTest.cpp index 832d375..85f43ad 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_CXX11)); +} + TEST(TypeLoc, LongDoubleRange) { RangeVerifier<TypeLoc> Verifier; Verifier.expectRange(1, 1, 1, 6); |