aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-10-09 18:55:59 +0000
committerDouglas Gregor <dgregor@apple.com>2011-10-09 18:55:59 +0000
commitb5a0187b12524d2c1e6ac96e81715d1e70bbe0ad (patch)
tree8da5745be3540eebe457403fca487d040edd61be /lib/Sema/SemaDecl.cpp
parent43fe245b37c3cd36d837aab9eb98551328d30141 (diff)
Diagnose attempts to declare a non-static data member with a
non-identifier name. Fixes PR10839. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141513 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 1a80999b24..451751f143 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -3720,7 +3720,7 @@ Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC,
IdentifierInfo *II = Name.getAsIdentifierInfo();
if (!II) {
Diag(D.getIdentifierLoc(), diag::err_bad_variable_name)
- << Name.getAsString();
+ << Name;
return 0;
}