summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclCXX.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-02-05 06:12:42 +0000
committerDouglas Gregor <dgregor@apple.com>2010-02-05 06:12:42 +0000
commit1aa3edbb99852d587edf8b088fa7c7e9fb4da6d6 (patch)
treeaeb17a8bd57f86aa5413ccb91353f515a141240d /clang/lib/Sema/SemaDeclCXX.cpp
parent94e6d98caecc7e32eb5a31248631507fc6af6230 (diff)
downloadbcm5719-llvm-1aa3edbb99852d587edf8b088fa7c7e9fb4da6d6.tar.gz
bcm5719-llvm-1aa3edbb99852d587edf8b088fa7c7e9fb4da6d6.zip
A function declarator with a non-identifier name in an anonymous class
is a constructor for that class, right? Fixes PR6238. llvm-svn: 95367
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index e746a8e98c3..7fbbed40890 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -433,7 +433,7 @@ bool Sema::isCurrentClassName(const IdentifierInfo &II, Scope *,
} else
CurDecl = dyn_cast_or_null<CXXRecordDecl>(CurContext);
- if (CurDecl)
+ if (CurDecl && CurDecl->getIdentifier())
return &II == CurDecl->getIdentifier();
else
return false;
OpenPOWER on IntegriCloud