[PATCH] D66951: [ASTImporter] Add comprehensive tests for ODR violation handling strategies
Shafik Yaghmour via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 10 22:30:15 PDT 2019
shafik added inline comments.
================
Comment at: clang/unittests/AST/ASTImporterODRStrategiesTest.cpp:151
+};
+
+template <typename TypeParam, ASTImporter::ODRHandlingType ODRHandlingParam>
----------------
martong wrote:
> balazske wrote:
> > `FunctionTemplate` and `FunctionTemplateSpec` are missing?
> Yes, because `FunctionTemplates` overload with each other. So they are imported always "liberally".
>
> There is no point to liberally import conflicting `FunctionTemplateSpecializations`.
> The only thing we can do in that case is to omit the conflicting declaration.
> And this is true in case of `ClassTemplateSpecialization`s too.
>
> Perhaps we should remove `struct ClassTemplateSpec` as well from here (?).
> Because they are never going to be handled "liberally".
>
> @shafik , what do you think about this?
What you say about `FunctionTemplateSpecializations` and `ClassTemplateSpecializations` seems to make sense, importing them liberally would require more than work in the importer.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66951/new/
https://reviews.llvm.org/D66951
More information about the cfe-commits
mailing list