[clang] 235f9f7 - [SyntaxTree] Split `DynamicExceptionSpecification` test
Eduardo Caldas via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 24 07:32:11 PDT 2020
Author: Eduardo Caldas
Date: 2020-08-24T14:31:46Z
New Revision: 235f9f7fe94488904a60a8a1f5430183b0504945
URL: https://github.com/llvm/llvm-project/commit/235f9f7fe94488904a60a8a1f5430183b0504945
DIFF: https://github.com/llvm/llvm-project/commit/235f9f7fe94488904a60a8a1f5430183b0504945.diff
LOG: [SyntaxTree] Split `DynamicExceptionSpecification` test
Added:
Modified:
clang/unittests/Tooling/Syntax/BuildTreeTest.cpp
Removed:
################################################################################
diff --git a/clang/unittests/Tooling/Syntax/BuildTreeTest.cpp b/clang/unittests/Tooling/Syntax/BuildTreeTest.cpp
index 005f0a384d58..ce37a952ac1a 100644
--- a/clang/unittests/Tooling/Syntax/BuildTreeTest.cpp
+++ b/clang/unittests/Tooling/Syntax/BuildTreeTest.cpp
@@ -3800,79 +3800,72 @@ TEST_P(SyntaxTreeTest, DynamicExceptionSpecification) {
if (!GetParam().supportsCXXDynamicExceptionSpecification()) {
return;
}
- EXPECT_TRUE(treeDumpEqual(
+ EXPECT_TRUE(treeDumpEqualOnAnnotations(
R"cpp(
struct MyException1 {};
struct MyException2 {};
-int a() throw();
-int b() throw(...);
-int c() throw(MyException1);
-int d() throw(MyException1, MyException2);
+[[int a() throw();]]
+[[int b() throw(...);]]
+[[int c() throw(MyException1);]]
+[[int d() throw(MyException1, MyException2);]]
)cpp",
- R"txt(
-*: TranslationUnit
-|-SimpleDeclaration
-| |-struct
-| |-MyException1
-| |-{
-| |-}
-| `-;
-|-SimpleDeclaration
-| |-struct
-| |-MyException2
-| |-{
-| |-}
-| `-;
-|-SimpleDeclaration
-| |-int
-| |-SimpleDeclarator
-| | |-a
-| | `-ParametersAndQualifiers
-| | |-(
-| | |-)
-| | |-throw
-| | |-(
-| | `-)
-| `-;
-|-SimpleDeclaration
-| |-int
-| |-SimpleDeclarator
-| | |-b
-| | `-ParametersAndQualifiers
-| | |-(
-| | |-)
-| | |-throw
-| | |-(
-| | |-...
-| | `-)
-| `-;
-|-SimpleDeclaration
-| |-int
-| |-SimpleDeclarator
-| | |-c
-| | `-ParametersAndQualifiers
-| | |-(
-| | |-)
-| | |-throw
-| | |-(
-| | |-MyException1
-| | `-)
-| `-;
-`-SimpleDeclaration
- |-int
- |-SimpleDeclarator
- | |-d
- | `-ParametersAndQualifiers
- | |-(
- | |-)
- | |-throw
- | |-(
- | |-MyException1
- | |-,
- | |-MyException2
- | `-)
- `-;
-)txt"));
+ {R"txt(
+SimpleDeclaration
+|-int
+|-SimpleDeclarator
+| |-a
+| `-ParametersAndQualifiers
+| |-(
+| |-)
+| |-throw
+| |-(
+| `-)
+`-;
+)txt",
+ R"txt(
+SimpleDeclaration
+|-int
+|-SimpleDeclarator
+| |-b
+| `-ParametersAndQualifiers
+| |-(
+| |-)
+| |-throw
+| |-(
+| |-...
+| `-)
+`-;
+)txt",
+ R"txt(
+SimpleDeclaration
+|-int
+|-SimpleDeclarator
+| |-c
+| `-ParametersAndQualifiers
+| |-(
+| |-)
+| |-throw
+| |-(
+| |-MyException1
+| `-)
+`-;
+)txt",
+ R"txt(
+SimpleDeclaration
+|-int
+|-SimpleDeclarator
+| |-d
+| `-ParametersAndQualifiers
+| |-(
+| |-)
+| |-throw
+| |-(
+| |-MyException1
+| |-,
+| |-MyException2
+| `-)
+`-;
+)txt"}));
}
TEST_P(SyntaxTreeTest, NoexceptExceptionSpecification) {
More information about the cfe-commits
mailing list