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

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 20 06:50:04 PST 2017


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





More information about the cfe-commits mailing list