[PATCH] Remove one test in MSVC. I believe MSVC injects some code into the AST and is causing these tests to fail by finding nodes I am not expecting.

Manuel Klimek klimek at google.com
Thu Aug 29 00:55:30 PDT 2013


On Wed, Aug 28, 2013 at 11:43 PM, Aaron Ballman <aaron.ballman at gmail.com>wrote:

> I don't know enough about the matchers to really provide a review that
> means much.  But I'm a bit scared by the idea that MSVC injects some
> code into the AST that we don't fully understand.  Can we do a bit
> more research before disabling the test, and perhaps add a comment as
> to *why* that test is disabled for MSVC if it really should be
> disabled?
>

That is actually a well-known problem - we've dealt with that mostly by
making the matchers more specific in the past.


>
> Thanks!
>
> ~Aaron
>
> On Wed, Aug 28, 2013 at 5:30 PM, Samuel Benzaquen <sbenza at google.com>
> wrote:
> > Hi aaron.ballman,
> >
> > Remove one test in MSVC. I believe MSVC injects some code into the AST
> and is causing these tests to fail by finding nodes I am not expecting.
> >
> > http://llvm-reviews.chandlerc.com/D1541
> >
> > Files:
> >   unittests/ASTMatchers/Dynamic/RegistryTest.cpp
> >
> > Index: unittests/ASTMatchers/Dynamic/RegistryTest.cpp
> > ===================================================================
> > --- unittests/ASTMatchers/Dynamic/RegistryTest.cpp
> > +++ unittests/ASTMatchers/Dynamic/RegistryTest.cpp
> > @@ -270,7 +270,9 @@
> >
> >    EXPECT_TRUE(matches("void foo(){}", D));
> >    EXPECT_TRUE(matches("struct Foo{};", D));
> > +#if !defined(_MSC_VER)
> >    EXPECT_FALSE(matches("int i = 0;", D));
> > +#endif
> >
> >    D = constructMatcher(
> >        "allOf", constructMatcher("recordDecl"),
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130829/96eab38a/attachment.html>


More information about the cfe-commits mailing list