[PATCH] D41444: [ASTImporterTest] Make testing under '-fdelayed-template-parsing' mandatory

Zachary Turner via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 20 06:53:25 PST 2017


On the other hand, it doesn’t hurt anything to run the tests twice does it?
I’d feel better if this patch were *adding* test coverage as opposed to
changing coverage
On Wed, Dec 20, 2017 at 6:50 AM Gábor Horváth via Phabricator <
reviews at reviews.llvm.org> wrote:

> xazax.hun added a comment.
>
> In https://reviews.llvm.org/D41444#960848, @a.sidorin wrote:
>
> > In https://reviews.llvm.org/D41444#960841, @xazax.hun wrote:
> >
> > > Is it possible that this will hide other problems? Wouldn't it be
> better to run the tests twice once with this argument and once without it?
> >
> >
> > I don't think so. In fact, without instantiation, we are not even able
> to check semantic code correctness inside templates. So, we are solving
> this problem as well.
>
>
> E.g. the following code only compiles with `-fdelayed-template-parsing`
> flag added:
>
>   template<typename T>
>   struct Base {
>     int x;
>   };
>
>
>   template<typename T>
>   struct Derived : Base<T> {
>     int f() {
>       return x;
>     }
>   };
>
> But yeah, maybe it is not very likely that we hit such issues.
>
>
> Repository:
>   rC Clang
>
> https://reviews.llvm.org/D41444
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171220/e7a22429/attachment.html>


More information about the cfe-commits mailing list