balazske added inline comments.
================ Comment at: clang/unittests/AST/ASTImporterODRStrategiesTest.cpp:36 + static constexpr auto *Definition = "void X(int a) {}"; + static constexpr auto *ConflictingDefinition = "void X(double a) {}"; + BindableMatcher<Decl> getPattern() { ---------------- Probably for (non-member?) functions there is no possibility for conflicting definition (for same prototype)? This can be the case if the function body is different but this is not checked now. For functions no name conflict happens because of overload, at least if C++ is used. I think the tests here with functions are not needed or only for C language. (Do all these pass?) ================ Comment at: clang/unittests/AST/ASTImporterODRStrategiesTest.cpp:128 +}; + +struct ClassTemplateSpec { ---------------- Is this better? ``` struct VariableTemplate { using DeclTy = VarTemplateDecl; static constexpr auto *Prototype = "template <class T> extern T X;"; static constexpr auto *ConflictingPrototype = "template <class T> extern float X;"; static constexpr auto *Definition = R"( template <class T> T X; template <> int X<int>; )"; static constexpr auto *ConflictingDefinition = R"( template <class T> T X; template <> float X<int>; )"; static constexpr auto *ConflictingProtoDef = R"( template <class T> float X; template <> float X<int>; )"; // There is no matcher for varTemplateDecl so use a work-around. BindableMatcher<Decl> getPattern() { return namedDecl(hasName("X"), unless(isImplicit()), has(templateTypeParmDecl())); } }; ``` ================ Comment at: clang/unittests/AST/ASTImporterODRStrategiesTest.cpp:151 +}; + +template <typename TypeParam, ASTImporter::ODRHandlingType ODRHandlingParam> ---------------- `FunctionTemplate` and `FunctionTemplateSpec` are missing? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66951/new/ https://reviews.llvm.org/D66951 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits