[Lldb-commits] [lldb] r179727 - Fix for regression in TestCPPStaticMethods.py due to refactoring in clang.

Ashok Thirumurthi ashok.thirumurthi at intel.com
Wed Apr 17 14:36:34 PDT 2013


Author: athirumu
Date: Wed Apr 17 16:36:33 2013
New Revision: 179727

URL: http://llvm.org/viewvc/llvm-project?rev=179727&view=rev
Log:
Fix for regression in TestCPPStaticMethods.py due to refactoring in clang.
- Specify SC_Static given DIE attributes for static methods and operators.

Thanks to Wei Pan for his review and the help with root-causing.

Modified:
    lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=179727&r1=179726&r2=179727&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Wed Apr 17 16:36:33 2013
@@ -1794,8 +1794,9 @@ ClangASTContext::AddMethodToCXXRecordTyp
     }
     else
     {   
-    
+        clang::StorageClass SC = is_static ? SC_Static : SC_None; 
         OverloadedOperatorKind op_kind = NUM_OVERLOADED_OPERATORS;
+
         if (IsOperator (name, op_kind))
         {
             if (op_kind != NUM_OVERLOADED_OPERATORS)
@@ -1813,7 +1814,7 @@ ClangASTContext::AddMethodToCXXRecordTyp
                                                          DeclarationNameInfo (ast->DeclarationNames.getCXXOperatorName (op_kind), SourceLocation()),
                                                          method_qual_type,
                                                          NULL, // TypeSourceInfo *
-                                                         SC_None,
+                                                         SC,
                                                          is_inline,
                                                          false /*is_constexpr*/,
                                                          SourceLocation());
@@ -1842,7 +1843,7 @@ ClangASTContext::AddMethodToCXXRecordTyp
                                                      DeclarationNameInfo (decl_name, SourceLocation()),
                                                      method_qual_type,
                                                      NULL, // TypeSourceInfo *
-                                                     SC_None,
+                                                     SC,
                                                      is_inline,
                                                      false /*is_constexpr*/,
                                                      SourceLocation());





More information about the lldb-commits mailing list