]> granicus.if.org Git - clang/commit
PR10359: Template declarations which define classes are not permitted to also contain...
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 14 Jul 2011 21:35:26 +0000 (21:35 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 14 Jul 2011 21:35:26 +0000 (21:35 +0000)
commitcf6b0a20c697ba8daf2dff3a4cce2a028b33cb48
treed9f191f061a731f1f22fe4a51f62ab699e6ac6de
parente0e40768cc8c4b2a9093dac3d777e0d362cb7a88
PR10359: Template declarations which define classes are not permitted to also contain declarators. Previously we would accept code like this:

  template<typename T> struct S { } f() { return 0; }

This case now produces a missing ';' diagnostic, since that seems like a much more likely error than an attempt to declare a function or variable in addition to the class template.

Treat this

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135195 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Parse/ParseDeclCXX.cpp
test/CXX/temp/p3.cpp [new file with mode: 0644]
test/CXX/temp/temp.res/temp.local/p3.cpp
test/SemaCXX/PR9459.cpp
test/SemaTemplate/class-template-decl.cpp