r291450 - Follow up to r291448: use isStructorDecl in one more place

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 9 09:09:59 PST 2017


Author: rnk
Date: Mon Jan  9 11:09:59 2017
New Revision: 291450

URL: http://llvm.org/viewvc/llvm-project?rev=291450&view=rev
Log:
Follow up to r291448: use isStructorDecl in one more place

This pointer comparison has shown to be error-prone, so use the standard
helper for it. NFC

Modified:
    cfe/trunk/lib/AST/MicrosoftMangle.cpp

Modified: cfe/trunk/lib/AST/MicrosoftMangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/MicrosoftMangle.cpp?rev=291450&r1=291449&r2=291450&view=diff
==============================================================================
--- cfe/trunk/lib/AST/MicrosoftMangle.cpp (original)
+++ cfe/trunk/lib/AST/MicrosoftMangle.cpp Mon Jan  9 11:09:59 2017
@@ -902,7 +902,7 @@ void MicrosoftCXXNameMangler::mangleUnqu
       llvm_unreachable("Can't mangle Objective-C selector names here!");
 
     case DeclarationName::CXXConstructorName:
-      if (Structor == getStructor(ND)) {
+      if (isStructorDecl(ND)) {
         if (StructorType == Ctor_CopyingClosure) {
           Out << "?_O";
           return;




More information about the cfe-commits mailing list