[PATCH] D15005: Fix PR8170: Clang does not check constructor declaration that uses a template-id
Faisal Vali via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 25 19:54:15 PST 2015
faisalv created this revision.
faisalv added a reviewer: rsmith.
faisalv added a subscriber: cfe-commits.
Clang currently does no real checking of the template argument list when a template-id is used to declare a constructor:
template<class T> struct X {
X<T*, T>(); // Clang erroneously accepts this.
};
Both gcc and edg emit an error on the above code (though one could claim the spec temp.local p1 is perhaps not as explicit as it could be in this regard)
See: https://llvm.org/bugs/show_bug.cgi?id=8170
http://reviews.llvm.org/D15005
Files:
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Parse/Parser.h
include/clang/Sema/Sema.h
lib/Parse/ParseDecl.cpp
lib/Parse/ParseExprCXX.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaTemplate.cpp
test/CXX/temp/temp.res/temp.local/p1.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15005.41206.patch
Type: text/x-patch
Size: 10673 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151126/9bc587c9/attachment-0001.bin>
More information about the cfe-commits
mailing list