summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-04-02 18:40:40 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-04-02 18:40:40 +0000
commitcf8ec8dad61c09a5b5bfd0738c0484788b1e9e3f (patch)
tree2f62b106ca08fdbbb5a587c64ee0b442c795cc87 /clang/lib/Sema/SemaDecl.cpp
parentf208af02a47088f53a7f2a45e828fac2181b5add (diff)
downloadbcm5719-llvm-cf8ec8dad61c09a5b5bfd0738c0484788b1e9e3f.tar.gz
bcm5719-llvm-cf8ec8dad61c09a5b5bfd0738c0484788b1e9e3f.zip
Implement DR1402: if a field or base class is not movable, the derived class's
move constructor/move assignment operator are not declared, rather than being defined as deleted, so move operations on the derived class fall back to copying rather than moving. If a move operation on the derived class is explicitly defaulted, the unmovable subobject will be copied instead of being moved. llvm-svn: 153883
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 9e193bebbe5..cc75f3f4aa3 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -4651,8 +4651,9 @@ static NamedDecl* DiagnoseInvalidRedeclaration(
if (unsigned Idx = NearMatch->second) {
ParmVarDecl *FDParam = FD->getParamDecl(Idx-1);
- SemaRef.Diag(FDParam->getTypeSpecStartLoc(),
- diag::note_member_def_close_param_match)
+ SourceLocation Loc = FDParam->getTypeSpecStartLoc();
+ if (Loc.isInvalid()) Loc = FD->getLocation();
+ SemaRef.Diag(Loc, diag::note_member_def_close_param_match)
<< Idx << FDParam->getType() << NewFD->getParamDecl(Idx-1)->getType();
} else if (Correction) {
SemaRef.Diag(FD->getLocation(), diag::note_previous_decl)
OpenPOWER on IntegriCloud