diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-08-17 21:23:17 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-08-17 21:23:17 +0000 |
commit | 82b4550fb25ad578b6c8143b87a003fae7106cae (patch) | |
tree | 9310d7cfa150600ad59b35643c4ce2c66e53416e /unittests/Tooling/RecursiveASTVisitorTest.cpp | |
parent | 4b5e48d39eb94ee12f3d89df60525053d8b0275e (diff) |
Part of PR13618: visit the TypeLoc when RecursiveASTVisitor visits a CompoundLiteralExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162133 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Tooling/RecursiveASTVisitorTest.cpp')
-rw-r--r-- | unittests/Tooling/RecursiveASTVisitorTest.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/unittests/Tooling/RecursiveASTVisitorTest.cpp b/unittests/Tooling/RecursiveASTVisitorTest.cpp index 4b539067b1..1952c7b211 100644 --- a/unittests/Tooling/RecursiveASTVisitorTest.cpp +++ b/unittests/Tooling/RecursiveASTVisitorTest.cpp @@ -392,4 +392,12 @@ TEST(RecursiveASTVisitor, VisitsExtension) { "int s = __extension__ (s);\n")); } +TEST(RecursiveASTVisitor, VisitsCompoundLiteralType) { + TypeLocVisitor Visitor; + Visitor.ExpectMatch("struct S", 1, 26); + EXPECT_TRUE(Visitor.runOver( + "int f() { return (struct S { int a; }){.a = 0}.a; }", + TypeLocVisitor::Lang_C)); +} + } // end namespace clang |