[PATCH] Added check for kind of UnqualifiedId in Declarator::isStaticMember()

Petar Jovanovic petar.jovanovic at imgtec.com
Sun Mar 29 17:46:57 PDT 2015


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D8437

Files:
  cfe/trunk/lib/Sema/DeclSpec.cpp

Index: cfe/trunk/lib/Sema/DeclSpec.cpp
===================================================================
--- cfe/trunk/lib/Sema/DeclSpec.cpp
+++ cfe/trunk/lib/Sema/DeclSpec.cpp
@@ -345,8 +345,9 @@
 bool Declarator::isStaticMember() {
   assert(getContext() == MemberContext);
   return getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_static ||
-         CXXMethodDecl::isStaticOverloadedOperator(
-             getName().OperatorFunctionId.Operator);
+         (getName().Kind == UnqualifiedId::IK_OperatorFunctionId &&
+          CXXMethodDecl::isStaticOverloadedOperator(
+              getName().OperatorFunctionId.Operator));
 }
 
 bool DeclSpec::hasTagDefinition() const {

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8437.22858.patch
Type: text/x-patch
Size: 685 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150330/738df98d/attachment.bin>


More information about the cfe-commits mailing list