This revision was automatically updated to reflect the committed changes.
Closed by commit rL348473: Diagnose friend function template redefinitions.
(authored by sepavloff, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D21508?vs=1767
rsmith accepted this revision.
rsmith marked an inline comment as done.
rsmith added a comment.
This revision is now accepted and ready to land.
Thanks (and sorry for dropping the ball on this review).
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D21508/new/
http
sepavloff updated this revision to Diff 176763.
sepavloff added a comment.
Updated patch
The fix for https://bugs.llvm.org/show_bug.cgi?id=39742 put a test
case, which is not a valid code. The error is detected with this
patch, tests are updated accordingly.
Repository:
rC Clang
CHANGES SINC
sepavloff updated this revision to Diff 160298.
sepavloff added a comment.
Rebased the patch
Repository:
rC Clang
https://reviews.llvm.org/D21508
Files:
include/clang/AST/DeclBase.h
lib/Sema/SemaDecl.cpp
lib/Sema/SemaTemplateInstantiateDecl.cpp
test/Modules/friend-definition.cpp
te
sepavloff added a comment.
Other compilers successfully recognize errors (checked using
https://godbolt.org/). For instance, the code:
template inline void func_35(T *x);
template
struct C35a {
template friend void func_35(T *x) {}
};
template
struct C35b {
template friend vo
sepavloff updated this revision to Diff 138303.
sepavloff added a comment.
Updated patch
- Rebased relative to recent ToT
- Removed the change in `FunctionDecl::getTemplateInstantiationPattern()`, as
it is not necessary for error detection,
- Added test for use in module.
Repository:
rC Clan
sepavloff updated this revision to Diff 115539.
sepavloff added a comment.
Rebased
https://reviews.llvm.org/D21508
Files:
include/clang/AST/DeclBase.h
lib/AST/Decl.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaTemplateInstantiateDecl.cpp
test/SemaCXX/friend2.cpp
Index: test/SemaCXX/friend2.
sepavloff updated this revision to Diff 107091.
sepavloff added a comment.
Simplified patch
https://reviews.llvm.org/D21508
Files:
include/clang/AST/DeclBase.h
lib/AST/Decl.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaTemplateInstantiateDecl.cpp
test/SemaCXX/friend2.cpp
Index: test/SemaCXX
sepavloff updated this revision to Diff 106912.
sepavloff edited the summary of this revision.
sepavloff added a comment.
Aligned implementation with https://reviews.llvm.org/D30170.
https://reviews.llvm.org/D21508
Files:
include/clang/AST/DeclBase.h
lib/AST/Decl.cpp
lib/Sema/SemaDecl.cpp