aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclCXX.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-07-09 17:37:12 +0000
committerAnders Carlsson <andersca@mac.com>2009-07-09 17:37:12 +0000
commit5eda81624ff3b9f617fa377f43d89f36741460a7 (patch)
treec13b94615323907c8019ea5a7ebe0c016cd0b0ef /lib/Sema/SemaDeclCXX.cpp
parent08cc16d1850e1b5215a6b63b1b5f766988acd457 (diff)
Pass the DeclName to the diagnostic builder so that member names will be quoted correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75150 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclCXX.cpp')
-rw-r--r--lib/Sema/SemaDeclCXX.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index 72adcc22d1..5b22bb76fb 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -1989,13 +1989,13 @@ void Sema::DefineImplicitDefaultConstructor(SourceLocation CurrentLocation,
}
else if (FieldType->isReferenceType()) {
Diag(CurrentLocation, diag::err_unintialized_member)
- << Context.getTagDeclType(ClassDecl) << 0 << (*Field)->getNameAsCString();
+ << Context.getTagDeclType(ClassDecl) << 0 << Field->getDeclName();
Diag((*Field)->getLocation(), diag::note_declared_at);
err = true;
}
else if (FieldType.isConstQualified()) {
Diag(CurrentLocation, diag::err_unintialized_member)
- << Context.getTagDeclType(ClassDecl) << 1 << (*Field)->getNameAsCString();
+ << Context.getTagDeclType(ClassDecl) << 1 << Field->getDeclName();
Diag((*Field)->getLocation(), diag::note_declared_at);
err = true;
}