[Lldb-commits] [PATCH] D16155: possible ambigous resolution of clang::ArrayType/llvm::ArrayType in ClangAstContext

Luke Drummond via lldb-commits lldb-commits at lists.llvm.org
Wed Jan 13 14:10:26 PST 2016


ldrumm created this revision.
ldrumm added a reviewer: spyffe.
ldrumm added a subscriber: lldb-commits.

source/Symbol/ClangASTContext.cpp has `using namespace llvm; using namespace clang;` Both [llvm](http://llvm.org/docs/doxygen/html/classllvm_1_1ArrayType.html) and [clang](http://clang.llvm.org/doxygen/classclang_1_1ArrayType.html) have an `ArrayType` class, which can cause resolution to fail when llvm headers that are implicitly included name this  type.

http://reviews.llvm.org/D16155

Files:
  source/Symbol/ClangASTContext.cpp

Index: source/Symbol/ClangASTContext.cpp
===================================================================
--- source/Symbol/ClangASTContext.cpp
+++ source/Symbol/ClangASTContext.cpp
@@ -2105,14 +2105,14 @@
             if (element_count == 0)
             {
                 return CompilerType (ast, ast->getIncompleteArrayType (GetQualType(element_type),
-                                                                       ArrayType::Normal,
+                                                                       clang::ArrayType::Normal,
                                                                        0));
             }
             else
             {
                 return CompilerType (ast, ast->getConstantArrayType (GetQualType(element_type),
                                                                      ap_element_count,
-                                                                     ArrayType::Normal,
+                                                                     clang::ArrayType::Normal,
                                                                      0));
             }
         }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16155.44788.patch
Type: text/x-patch
Size: 1145 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160113/d7abcadf/attachment.bin>


More information about the lldb-commits mailing list