]> granicus.if.org Git - clang/commit
Implement a new warning for when adding a default argument to a method
authorSean Hunt <scshunt@csclub.uwaterloo.ca>
Thu, 26 May 2011 01:26:05 +0000 (01:26 +0000)
committerSean Hunt <scshunt@csclub.uwaterloo.ca>
Thu, 26 May 2011 01:26:05 +0000 (01:26 +0000)
commit9ae60d54e4454192384933f3020968ea5c8c3540
treed3d6586a29f4941a1cd64d2a69fbe18e6b43f84e
parent55d484802f3e27930317739efc5f5956b78aac25
Implement a new warning for when adding a default argument to a method
makes it into a special member function. This is very bad and can lead
to all sorts of nastiness including implicit member functions violating
the One Definition Rule. This should probably be made ill-formed in a
later version of the standard, but for now we'll just warn.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132104 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp
test/SemaCXX/copy-constructor-error.cpp
test/SemaCXX/default-arg-special-member.cpp [new file with mode: 0644]