diff options
Diffstat (limited to 'clang/unittests/AST/SourceLocationTest.cpp')
-rw-r--r-- | clang/unittests/AST/SourceLocationTest.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/unittests/AST/SourceLocationTest.cpp b/clang/unittests/AST/SourceLocationTest.cpp index ca5a889..98460d9 100644 --- a/clang/unittests/AST/SourceLocationTest.cpp +++ b/clang/unittests/AST/SourceLocationTest.cpp @@ -122,6 +122,18 @@ TEST(CXXConstructorDecl, NoRetFunTypeLocRange) { EXPECT_TRUE(Verifier.match("class C { C(); };", functionDecl())); } +TEST(CXXConstructorDecl, DefaultedCtorLocRange) { + RangeVerifier<CXXConstructorDecl> Verifier; + Verifier.expectRange(1, 11, 1, 23); + EXPECT_TRUE(Verifier.match("class C { C() = default; };", functionDecl())); +} + +TEST(CXXConstructorDecl, DeletedCtorLocRange) { + RangeVerifier<CXXConstructorDecl> Verifier; + Verifier.expectRange(1, 11, 1, 22); + EXPECT_TRUE(Verifier.match("class C { C() = delete; };", functionDecl())); +} + TEST(CompoundLiteralExpr, CompoundVectorLiteralRange) { RangeVerifier<CompoundLiteralExpr> Verifier; Verifier.expectRange(2, 11, 2, 22); |