[PATCH] D49223: [AST] Check described template at structural equivalence check.

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 1 07:59:44 PDT 2018


balazske added inline comments.


================
Comment at: lib/AST/ASTStructuralEquivalence.cpp:958
 
+  if (D1->isTemplated() != D2->isTemplated())
+    return false;
----------------
a_sidorin wrote:
> I think we can move the changes for both RecordDecl and FunctionDecl into `Finish()` and use `Decl::getDescribedTemplate()`. This will both simplify the patch and give us the support for templated VarDecls and TypeAliasDecls for free. What do you think?
Yes it can be good to check with `getDescribedClassTemplate` in `Finish`. (Similarly, there can be more things that are common to check with all `Decl` or `NamedDecl` objects in `Finish`, specifically the name is checked. Or in some cases the name does not matter, but in others yes?)


Repository:
  rC Clang

https://reviews.llvm.org/D49223





More information about the cfe-commits mailing list