[www-releases] r225843 - Add documentation for 3.5.1

Tom Stellard thomas.stellard at amd.com
Tue Jan 13 14:55:45 PST 2015


Added: www-releases/trunk/3.5.1/tools/clang/docs/doxygen/html/SemaLookup_8cpp_source.html
URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/3.5.1/tools/clang/docs/doxygen/html/SemaLookup_8cpp_source.html?rev=225843&view=auto
==============================================================================
--- www-releases/trunk/3.5.1/tools/clang/docs/doxygen/html/SemaLookup_8cpp_source.html (added)
+++ www-releases/trunk/3.5.1/tools/clang/docs/doxygen/html/SemaLookup_8cpp_source.html Tue Jan 13 16:55:20 2015
@@ -0,0 +1,4761 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html><head>
+<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>
+<meta name="keywords" content="clang,LLVM,Low Level Virtual Machine,C,C++,doxygen,API,frontend,documentation"/>
+<meta name="description" content="C++ source code API documentation for clang."/>
+<title>clang: SemaLookup.cpp Source File</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+</head><body>
+<p class="title">clang API Documentation</p>
+<!-- Generated by Doxygen 1.8.3.1 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+  <div id="navrow1" class="tabs">
+    <ul class="tablist">
+      <li><a href="index.html"><span>Main Page</span></a></li>
+      <li><a href="pages.html"><span>Related Pages</span></a></li>
+      <li><a href="modules.html"><span>Modules</span></a></li>
+      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
+      <li><a href="annotated.html"><span>Classes</span></a></li>
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
+      <li>
+        <div id="MSearchBox" class="MSearchBoxInactive">
+        <span class="left">
+          <img id="MSearchSelect" src="search/mag_sel.png"
+               onmouseover="return searchBox.OnSearchSelectShow()"
+               onmouseout="return searchBox.OnSearchSelectHide()"
+               alt=""/>
+          <input type="text" id="MSearchField" value="Search" accesskey="S"
+               onfocus="searchBox.OnSearchFieldFocus(true)" 
+               onblur="searchBox.OnSearchFieldFocus(false)" 
+               onkeyup="searchBox.OnSearchFieldChange(event)"/>
+          </span><span class="right">
+            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+          </span>
+        </div>
+      </li>
+    </ul>
+  </div>
+  <div id="navrow2" class="tabs2">
+    <ul class="tablist">
+      <li><a href="files.html"><span>File List</span></a></li>
+      <li><a href="globals.html"><span>File Members</span></a></li>
+    </ul>
+  </div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void
 (0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark"> </span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(12)"><span class="SelectionMark"> </span>Pages</a></div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+  <ul>
+<li class="navelem"><a class="el" href="dir_f65986501076cc710d4b9355ae3fe06d.html">clang</a></li><li class="navelem"><a class="el" href="dir_87e2a7550f83bd8cbfc92736891468fc.html">lib</a></li><li class="navelem"><a class="el" href="dir_0c3cadfa2fbef89a3b8f57073e8a31f9.html">Sema</a></li>  </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+  <div class="headertitle">
+<div class="title">SemaLookup.cpp</div>  </div>
+</div><!--header-->
+<div class="contents">
+<a href="SemaLookup_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span> <span class="comment">//===--------------------- SemaLookup.cpp - Name Lookup  ------------------===//</span></div>
+<div class="line"><a name="l00002"></a><span class="lineno">    2</span> <span class="comment">//</span></div>
+<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">//                     The LLVM Compiler Infrastructure</span></div>
+<div class="line"><a name="l00004"></a><span class="lineno">    4</span> <span class="comment">//</span></div>
+<div class="line"><a name="l00005"></a><span class="lineno">    5</span> <span class="comment">// This file is distributed under the University of Illinois Open Source</span></div>
+<div class="line"><a name="l00006"></a><span class="lineno">    6</span> <span class="comment">// License. See LICENSE.TXT for details.</span></div>
+<div class="line"><a name="l00007"></a><span class="lineno">    7</span> <span class="comment">//</span></div>
+<div class="line"><a name="l00008"></a><span class="lineno">    8</span> <span class="comment">//===----------------------------------------------------------------------===//</span></div>
+<div class="line"><a name="l00009"></a><span class="lineno">    9</span> <span class="comment">//</span></div>
+<div class="line"><a name="l00010"></a><span class="lineno">   10</span> <span class="comment">//  This file implements name lookup for C, C++, Objective-C, and</span></div>
+<div class="line"><a name="l00011"></a><span class="lineno">   11</span> <span class="comment">//  Objective-C++.</span></div>
+<div class="line"><a name="l00012"></a><span class="lineno">   12</span> <span class="comment">//</span></div>
+<div class="line"><a name="l00013"></a><span class="lineno">   13</span> <span class="comment">//===----------------------------------------------------------------------===//</span></div>
+<div class="line"><a name="l00014"></a><span class="lineno">   14</span> <span class="preprocessor">#include "<a class="code" href="Lookup_8h.html">clang/Sema/Lookup.h</a>"</span></div>
+<div class="line"><a name="l00015"></a><span class="lineno">   15</span> <span class="preprocessor">#include "<a class="code" href="ASTContext_8h.html" title="Defines the clang::ASTContext interface.">clang/AST/ASTContext.h</a>"</span></div>
+<div class="line"><a name="l00016"></a><span class="lineno">   16</span> <span class="preprocessor">#include "<a class="code" href="CXXInheritance_8h.html">clang/AST/CXXInheritance.h</a>"</span></div>
+<div class="line"><a name="l00017"></a><span class="lineno">   17</span> <span class="preprocessor">#include "<a class="code" href="Decl_8h.html">clang/AST/Decl.h</a>"</span></div>
+<div class="line"><a name="l00018"></a><span class="lineno">   18</span> <span class="preprocessor">#include "<a class="code" href="DeclCXX_8h.html" title="Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).">clang/AST/DeclCXX.h</a>"</span></div>
+<div class="line"><a name="l00019"></a><span class="lineno">   19</span> <span class="preprocessor">#include "<a class="code" href="DeclLookups_8h.html">clang/AST/DeclLookups.h</a>"</span></div>
+<div class="line"><a name="l00020"></a><span class="lineno">   20</span> <span class="preprocessor">#include "<a class="code" href="DeclObjC_8h.html">clang/AST/DeclObjC.h</a>"</span></div>
+<div class="line"><a name="l00021"></a><span class="lineno">   21</span> <span class="preprocessor">#include "<a class="code" href="DeclTemplate_8h.html" title="Defines the C++ template declaration subclasses.">clang/AST/DeclTemplate.h</a>"</span></div>
+<div class="line"><a name="l00022"></a><span class="lineno">   22</span> <span class="preprocessor">#include "<a class="code" href="Expr_8h.html">clang/AST/Expr.h</a>"</span></div>
+<div class="line"><a name="l00023"></a><span class="lineno">   23</span> <span class="preprocessor">#include "<a class="code" href="ExprCXX_8h.html" title="Defines the clang::Expr interface and subclasses for C++ expressions.">clang/AST/ExprCXX.h</a>"</span></div>
+<div class="line"><a name="l00024"></a><span class="lineno">   24</span> <span class="preprocessor">#include "<a class="code" href="Builtins_8h.html" title="Defines enum values for all the target-independent builtin functions.">clang/Basic/Builtins.h</a>"</span></div>
+<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="preprocessor">#include "<a class="code" href="LangOptions_8h.html" title="Defines the clang::LangOptions interface.">clang/Basic/LangOptions.h</a>"</span></div>
+<div class="line"><a name="l00026"></a><span class="lineno">   26</span> <span class="preprocessor">#include "<a class="code" href="DeclSpec_8h.html" title="This file defines the classes used to store parsed information about declaration-specifiers and decla...">clang/Sema/DeclSpec.h</a>"</span></div>
+<div class="line"><a name="l00027"></a><span class="lineno">   27</span> <span class="preprocessor">#include "<a class="code" href="ExternalSemaSource_8h.html">clang/Sema/ExternalSemaSource.h</a>"</span></div>
+<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="preprocessor">#include "<a class="code" href="Overload_8h.html">clang/Sema/Overload.h</a>"</span></div>
+<div class="line"><a name="l00029"></a><span class="lineno">   29</span> <span class="preprocessor">#include "<a class="code" href="Scope_8h.html">clang/Sema/Scope.h</a>"</span></div>
+<div class="line"><a name="l00030"></a><span class="lineno">   30</span> <span class="preprocessor">#include "<a class="code" href="ScopeInfo_8h.html">clang/Sema/ScopeInfo.h</a>"</span></div>
+<div class="line"><a name="l00031"></a><span class="lineno">   31</span> <span class="preprocessor">#include "<a class="code" href="Sema_8h.html">clang/Sema/Sema.h</a>"</span></div>
+<div class="line"><a name="l00032"></a><span class="lineno">   32</span> <span class="preprocessor">#include "<a class="code" href="SemaInternal_8h.html">clang/Sema/SemaInternal.h</a>"</span></div>
+<div class="line"><a name="l00033"></a><span class="lineno">   33</span> <span class="preprocessor">#include "<a class="code" href="TemplateDeduction_8h.html">clang/Sema/TemplateDeduction.h</a>"</span></div>
+<div class="line"><a name="l00034"></a><span class="lineno">   34</span> <span class="preprocessor">#include "<a class="code" href="TypoCorrection_8h.html">clang/Sema/TypoCorrection.h</a>"</span></div>
+<div class="line"><a name="l00035"></a><span class="lineno">   35</span> <span class="preprocessor">#include "llvm/ADT/STLExtras.h"</span></div>
+<div class="line"><a name="l00036"></a><span class="lineno">   36</span> <span class="preprocessor">#include "llvm/ADT/SetVector.h"</span></div>
+<div class="line"><a name="l00037"></a><span class="lineno">   37</span> <span class="preprocessor">#include "llvm/ADT/SmallPtrSet.h"</span></div>
+<div class="line"><a name="l00038"></a><span class="lineno">   38</span> <span class="preprocessor">#include "llvm/ADT/StringMap.h"</span></div>
+<div class="line"><a name="l00039"></a><span class="lineno">   39</span> <span class="preprocessor">#include "llvm/ADT/TinyPtrVector.h"</span></div>
+<div class="line"><a name="l00040"></a><span class="lineno">   40</span> <span class="preprocessor">#include "llvm/ADT/edit_distance.h"</span></div>
+<div class="line"><a name="l00041"></a><span class="lineno">   41</span> <span class="preprocessor">#include "llvm/Support/ErrorHandling.h"</span></div>
+<div class="line"><a name="l00042"></a><span class="lineno">   42</span> <span class="preprocessor">#include <algorithm></span></div>
+<div class="line"><a name="l00043"></a><span class="lineno">   43</span> <span class="preprocessor">#include <iterator></span></div>
+<div class="line"><a name="l00044"></a><span class="lineno">   44</span> <span class="preprocessor">#include <limits></span></div>
+<div class="line"><a name="l00045"></a><span class="lineno">   45</span> <span class="preprocessor">#include <list></span></div>
+<div class="line"><a name="l00046"></a><span class="lineno">   46</span> <span class="preprocessor">#include <map></span></div>
+<div class="line"><a name="l00047"></a><span class="lineno">   47</span> <span class="preprocessor">#include <set></span></div>
+<div class="line"><a name="l00048"></a><span class="lineno">   48</span> <span class="preprocessor">#include <utility></span></div>
+<div class="line"><a name="l00049"></a><span class="lineno">   49</span> <span class="preprocessor">#include <vector></span></div>
+<div class="line"><a name="l00050"></a><span class="lineno">   50</span> </div>
+<div class="line"><a name="l00051"></a><span class="lineno">   51</span> <span class="keyword">using namespace </span>clang;</div>
+<div class="line"><a name="l00052"></a><span class="lineno">   52</span> <span class="keyword">using namespace </span>sema;</div>
+<div class="line"><a name="l00053"></a><span class="lineno">   53</span> </div>
+<div class="line"><a name="l00054"></a><span class="lineno">   54</span> <span class="keyword">namespace </span>{</div>
+<div class="line"><a name="l00055"></a><span class="lineno">   55</span>   <span class="keyword">class </span>UnqualUsingEntry {</div>
+<div class="line"><a name="l00056"></a><span class="lineno">   56</span>     <span class="keyword">const</span> <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *Nominated;</div>
+<div class="line"><a name="l00057"></a><span class="lineno">   57</span>     <span class="keyword">const</span> <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *CommonAncestor;</div>
+<div class="line"><a name="l00058"></a><span class="lineno">   58</span> </div>
+<div class="line"><a name="l00059"></a><span class="lineno">   59</span>   <span class="keyword">public</span>:</div>
+<div class="line"><a name="l00060"></a><span class="lineno">   60</span>     UnqualUsingEntry(<span class="keyword">const</span> <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *Nominated,</div>
+<div class="line"><a name="l00061"></a><span class="lineno">   61</span>                      <span class="keyword">const</span> <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *CommonAncestor)</div>
+<div class="line"><a name="l00062"></a><span class="lineno">   62</span>       : Nominated(Nominated), CommonAncestor(CommonAncestor) {</div>
+<div class="line"><a name="l00063"></a><span class="lineno">   63</span>     }</div>
+<div class="line"><a name="l00064"></a><span class="lineno">   64</span> </div>
+<div class="line"><a name="l00065"></a><span class="lineno">   65</span>     <span class="keyword">const</span> <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *getCommonAncestor()<span class="keyword"> const </span>{</div>
+<div class="line"><a name="l00066"></a><span class="lineno">   66</span>       <span class="keywordflow">return</span> CommonAncestor;</div>
+<div class="line"><a name="l00067"></a><span class="lineno">   67</span>     }</div>
+<div class="line"><a name="l00068"></a><span class="lineno">   68</span> </div>
+<div class="line"><a name="l00069"></a><span class="lineno">   69</span>     <span class="keyword">const</span> <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *getNominatedNamespace()<span class="keyword"> const </span>{</div>
+<div class="line"><a name="l00070"></a><span class="lineno">   70</span>       <span class="keywordflow">return</span> Nominated;</div>
+<div class="line"><a name="l00071"></a><span class="lineno">   71</span>     }</div>
+<div class="line"><a name="l00072"></a><span class="lineno">   72</span> </div>
+<div class="line"><a name="l00073"></a><span class="lineno">   73</span>     <span class="comment">// Sort by the pointer value of the common ancestor.</span></div>
+<div class="line"><a name="l00074"></a><span class="lineno">   74</span>     <span class="keyword">struct </span>Comparator {</div>
+<div class="line"><a name="l00075"></a><span class="lineno">   75</span>       <span class="keywordtype">bool</span> operator()(<span class="keyword">const</span> UnqualUsingEntry &L, <span class="keyword">const</span> UnqualUsingEntry &R) {</div>
+<div class="line"><a name="l00076"></a><span class="lineno">   76</span>         <span class="keywordflow">return</span> L.getCommonAncestor() < R.getCommonAncestor();</div>
+<div class="line"><a name="l00077"></a><span class="lineno">   77</span>       }</div>
+<div class="line"><a name="l00078"></a><span class="lineno">   78</span> </div>
+<div class="line"><a name="l00079"></a><span class="lineno">   79</span>       <span class="keywordtype">bool</span> operator()(<span class="keyword">const</span> UnqualUsingEntry &E, <span class="keyword">const</span> <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *DC) {</div>
+<div class="line"><a name="l00080"></a><span class="lineno">   80</span>         <span class="keywordflow">return</span> E.getCommonAncestor() < DC;</div>
+<div class="line"><a name="l00081"></a><span class="lineno">   81</span>       }</div>
+<div class="line"><a name="l00082"></a><span class="lineno">   82</span> </div>
+<div class="line"><a name="l00083"></a><span class="lineno">   83</span>       <span class="keywordtype">bool</span> operator()(<span class="keyword">const</span> <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *DC, <span class="keyword">const</span> UnqualUsingEntry &E) {</div>
+<div class="line"><a name="l00084"></a><span class="lineno">   84</span>         <span class="keywordflow">return</span> DC < E.getCommonAncestor();</div>
+<div class="line"><a name="l00085"></a><span class="lineno">   85</span>       }</div>
+<div class="line"><a name="l00086"></a><span class="lineno">   86</span>     };</div>
+<div class="line"><a name="l00087"></a><span class="lineno">   87</span>   };</div>
+<div class="line"><a name="l00088"></a><span class="lineno">   88</span> <span class="comment"></span></div>
+<div class="line"><a name="l00089"></a><span class="lineno">   89</span> <span class="comment">  /// A collection of using directives, as used by C++ unqualified</span></div>
+<div class="line"><a name="l00090"></a><span class="lineno">   90</span> <span class="comment">  /// lookup.</span></div>
+<div class="line"><a name="l00091"></a><span class="lineno">   91</span> <span class="comment"></span>  <span class="keyword">class </span>UnqualUsingDirectiveSet {</div>
+<div class="line"><a name="l00092"></a><span class="lineno">   92</span>     <span class="keyword">typedef</span> <a class="code" href="classllvm_1_1SmallVector.html">SmallVector<UnqualUsingEntry, 8></a> ListTy;</div>
+<div class="line"><a name="l00093"></a><span class="lineno">   93</span> </div>
+<div class="line"><a name="l00094"></a><span class="lineno">   94</span>     ListTy list;</div>
+<div class="line"><a name="l00095"></a><span class="lineno">   95</span>     llvm::SmallPtrSet<DeclContext*, 8> visited;</div>
+<div class="line"><a name="l00096"></a><span class="lineno">   96</span> </div>
+<div class="line"><a name="l00097"></a><span class="lineno">   97</span>   <span class="keyword">public</span>:</div>
+<div class="line"><a name="l00098"></a><span class="lineno">   98</span>     UnqualUsingDirectiveSet() {}</div>
+<div class="line"><a name="l00099"></a><span class="lineno">   99</span> </div>
+<div class="line"><a name="l00100"></a><span class="lineno">  100</span>     <span class="keywordtype">void</span> visitScopeChain(<a class="code" href="classclang_1_1Scope.html">Scope</a> *<a class="code" href="AnalysisBasedWarnings_8cpp.html#a33dc45a03958a0bf07b5da2dec4db648">S</a>, <a class="code" href="classclang_1_1Scope.html">Scope</a> *InnermostFileScope) {</div>
+<div class="line"><a name="l00101"></a><span class="lineno">  101</span>       <span class="comment">// C++ [namespace.udir]p1:</span></div>
+<div class="line"><a name="l00102"></a><span class="lineno">  102</span>       <span class="comment">//   During unqualified name lookup, the names appear as if they</span></div>
+<div class="line"><a name="l00103"></a><span class="lineno">  103</span>       <span class="comment">//   were declared in the nearest enclosing namespace which contains</span></div>
+<div class="line"><a name="l00104"></a><span class="lineno">  104</span>       <span class="comment">//   both the using-directive and the nominated namespace.</span></div>
+<div class="line"><a name="l00105"></a><span class="lineno">  105</span>       <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *InnermostFileDC = InnermostFileScope-><a class="code" href="classclang_1_1Scope.html#a0ddcbbc7cb53f7b1f407ef68696b8d37">getEntity</a>();</div>
+<div class="line"><a name="l00106"></a><span class="lineno">  106</span>       assert(InnermostFileDC && InnermostFileDC-><a class="code" href="classclang_1_1DeclContext.html#ac33a346d4e8db5e892aba87393f4e8e4">isFileContext</a>());</div>
+<div class="line"><a name="l00107"></a><span class="lineno">  107</span> </div>
+<div class="line"><a name="l00108"></a><span class="lineno">  108</span>       <span class="keywordflow">for</span> (; <a class="code" href="AnalysisBasedWarnings_8cpp.html#a33dc45a03958a0bf07b5da2dec4db648">S</a>; S = S-><a class="code" href="classclang_1_1Scope.html#a41a39e012b966ffcb2f05d41f4bdbb4b">getParent</a>()) {</div>
+<div class="line"><a name="l00109"></a><span class="lineno">  109</span>         <span class="comment">// C++ [namespace.udir]p1:</span></div>
+<div class="line"><a name="l00110"></a><span class="lineno">  110</span>         <span class="comment">//   A using-directive shall not appear in class scope, but may</span></div>
+<div class="line"><a name="l00111"></a><span class="lineno">  111</span>         <span class="comment">//   appear in namespace scope or in block scope.</span></div>
+<div class="line"><a name="l00112"></a><span class="lineno">  112</span>         <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *Ctx = S-><a class="code" href="classclang_1_1Scope.html#a0ddcbbc7cb53f7b1f407ef68696b8d37">getEntity</a>();</div>
+<div class="line"><a name="l00113"></a><span class="lineno">  113</span>         <span class="keywordflow">if</span> (Ctx && Ctx-><a class="code" href="classclang_1_1DeclContext.html#ac33a346d4e8db5e892aba87393f4e8e4">isFileContext</a>()) {</div>
+<div class="line"><a name="l00114"></a><span class="lineno">  114</span>           visit(Ctx, Ctx);</div>
+<div class="line"><a name="l00115"></a><span class="lineno">  115</span>         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (!Ctx || Ctx-><a class="code" href="classclang_1_1DeclContext.html#a05b966b6459e1d11c317f8abe3e2d66f">isFunctionOrMethod</a>()) {</div>
+<div class="line"><a name="l00116"></a><span class="lineno">  116</span>           <a class="code" href="classclang_1_1Scope.html#add4dd35684bcb10c52ffa290ebcd6ae2">Scope::udir_iterator</a> I = S-><a class="code" href="classclang_1_1Scope.html#a2ee0a4a67fea1c63130fc194841504d2">using_directives_begin</a>(),</div>
+<div class="line"><a name="l00117"></a><span class="lineno">  117</span>                              End = S-><a class="code" href="classclang_1_1Scope.html#a5f6a634274a6f7ae60fd1d85d8172db8">using_directives_end</a>();</div>
+<div class="line"><a name="l00118"></a><span class="lineno">  118</span>           <span class="keywordflow">for</span> (; I != End; ++I)</div>
+<div class="line"><a name="l00119"></a><span class="lineno">  119</span>             visit(*I, InnermostFileDC);</div>
+<div class="line"><a name="l00120"></a><span class="lineno">  120</span>         }</div>
+<div class="line"><a name="l00121"></a><span class="lineno">  121</span>       }</div>
+<div class="line"><a name="l00122"></a><span class="lineno">  122</span>     }</div>
+<div class="line"><a name="l00123"></a><span class="lineno">  123</span> </div>
+<div class="line"><a name="l00124"></a><span class="lineno">  124</span>     <span class="comment">// Visits a context and collect all of its using directives</span></div>
+<div class="line"><a name="l00125"></a><span class="lineno">  125</span>     <span class="comment">// recursively.  Treats all using directives as if they were</span></div>
+<div class="line"><a name="l00126"></a><span class="lineno">  126</span>     <span class="comment">// declared in the context.</span></div>
+<div class="line"><a name="l00127"></a><span class="lineno">  127</span>     <span class="comment">//</span></div>
+<div class="line"><a name="l00128"></a><span class="lineno">  128</span>     <span class="comment">// A given context is only every visited once, so it is important</span></div>
+<div class="line"><a name="l00129"></a><span class="lineno">  129</span>     <span class="comment">// that contexts be visited from the inside out in order to get</span></div>
+<div class="line"><a name="l00130"></a><span class="lineno">  130</span>     <span class="comment">// the effective DCs right.</span></div>
+<div class="line"><a name="l00131"></a><span class="lineno">  131</span>     <span class="keywordtype">void</span> visit(<a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *DC, <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *EffectiveDC) {</div>
+<div class="line"><a name="l00132"></a><span class="lineno">  132</span>       <span class="keywordflow">if</span> (!visited.insert(DC))</div>
+<div class="line"><a name="l00133"></a><span class="lineno">  133</span>         <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l00134"></a><span class="lineno">  134</span> </div>
+<div class="line"><a name="l00135"></a><span class="lineno">  135</span>       addUsingDirectives(DC, EffectiveDC);</div>
+<div class="line"><a name="l00136"></a><span class="lineno">  136</span>     }</div>
+<div class="line"><a name="l00137"></a><span class="lineno">  137</span> </div>
+<div class="line"><a name="l00138"></a><span class="lineno">  138</span>     <span class="comment">// Visits a using directive and collects all of its using</span></div>
+<div class="line"><a name="l00139"></a><span class="lineno">  139</span>     <span class="comment">// directives recursively.  Treats all using directives as if they</span></div>
+<div class="line"><a name="l00140"></a><span class="lineno">  140</span>     <span class="comment">// were declared in the effective DC.</span></div>
+<div class="line"><a name="l00141"></a><span class="lineno">  141</span>     <span class="keywordtype">void</span> visit(<a class="code" href="classclang_1_1UsingDirectiveDecl.html" title="Represents C++ using-directive.">UsingDirectiveDecl</a> *UD, <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *EffectiveDC) {</div>
+<div class="line"><a name="l00142"></a><span class="lineno">  142</span>       <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *NS = UD-><a class="code" href="classclang_1_1UsingDirectiveDecl.html#aa99e507d882d7017103af7a45c0d09f8" title="Returns the namespace nominated by this using-directive.">getNominatedNamespace</a>();</div>
+<div class="line"><a name="l00143"></a><span class="lineno">  143</span>       <span class="keywordflow">if</span> (!visited.insert(NS))</div>
+<div class="line"><a name="l00144"></a><span class="lineno">  144</span>         <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l00145"></a><span class="lineno">  145</span> </div>
+<div class="line"><a name="l00146"></a><span class="lineno">  146</span>       addUsingDirective(UD, EffectiveDC);</div>
+<div class="line"><a name="l00147"></a><span class="lineno">  147</span>       addUsingDirectives(NS, EffectiveDC);</div>
+<div class="line"><a name="l00148"></a><span class="lineno">  148</span>     }</div>
+<div class="line"><a name="l00149"></a><span class="lineno">  149</span> </div>
+<div class="line"><a name="l00150"></a><span class="lineno">  150</span>     <span class="comment">// Adds all the using directives in a context (and those nominated</span></div>
+<div class="line"><a name="l00151"></a><span class="lineno">  151</span>     <span class="comment">// by its using directives, transitively) as if they appeared in</span></div>
+<div class="line"><a name="l00152"></a><span class="lineno">  152</span>     <span class="comment">// the given effective context.</span></div>
+<div class="line"><a name="l00153"></a><span class="lineno">  153</span>     <span class="keywordtype">void</span> addUsingDirectives(<a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *DC, <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *EffectiveDC) {</div>
+<div class="line"><a name="l00154"></a><span class="lineno">  154</span>       <a class="code" href="classllvm_1_1SmallVector.html">SmallVector<DeclContext*,4></a> queue;</div>
+<div class="line"><a name="l00155"></a><span class="lineno">  155</span>       <span class="keywordflow">while</span> (<span class="keyword">true</span>) {</div>
+<div class="line"><a name="l00156"></a><span class="lineno">  156</span>         <a class="code" href="classclang_1_1DeclContext.html#a073bdd3d5bbee972cf008ebb15d50bbe">DeclContext::udir_iterator</a> I, End;</div>
+<div class="line"><a name="l00157"></a><span class="lineno">  157</span>         <span class="keywordflow">for</span> (llvm::tie(I, End) = DC-><a class="code" href="classclang_1_1DeclContext.html#a4d67d5fc4d4038c838d14e728250057d">getUsingDirectives</a>(); I != End; ++I) {</div>
+<div class="line"><a name="l00158"></a><span class="lineno">  158</span>           <a class="code" href="classclang_1_1UsingDirectiveDecl.html" title="Represents C++ using-directive.">UsingDirectiveDecl</a> *UD = *I;</div>
+<div class="line"><a name="l00159"></a><span class="lineno">  159</span>           <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *NS = UD-><a class="code" href="classclang_1_1UsingDirectiveDecl.html#aa99e507d882d7017103af7a45c0d09f8" title="Returns the namespace nominated by this using-directive.">getNominatedNamespace</a>();</div>
+<div class="line"><a name="l00160"></a><span class="lineno">  160</span>           <span class="keywordflow">if</span> (visited.insert(NS)) {</div>
+<div class="line"><a name="l00161"></a><span class="lineno">  161</span>             addUsingDirective(UD, EffectiveDC);</div>
+<div class="line"><a name="l00162"></a><span class="lineno">  162</span>             queue.push_back(NS);</div>
+<div class="line"><a name="l00163"></a><span class="lineno">  163</span>           }</div>
+<div class="line"><a name="l00164"></a><span class="lineno">  164</span>         }</div>
+<div class="line"><a name="l00165"></a><span class="lineno">  165</span> </div>
+<div class="line"><a name="l00166"></a><span class="lineno">  166</span>         <span class="keywordflow">if</span> (queue.empty())</div>
+<div class="line"><a name="l00167"></a><span class="lineno">  167</span>           <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l00168"></a><span class="lineno">  168</span> </div>
+<div class="line"><a name="l00169"></a><span class="lineno">  169</span>         DC = queue.pop_back_val();</div>
+<div class="line"><a name="l00170"></a><span class="lineno">  170</span>       }</div>
+<div class="line"><a name="l00171"></a><span class="lineno">  171</span>     }</div>
+<div class="line"><a name="l00172"></a><span class="lineno">  172</span> </div>
+<div class="line"><a name="l00173"></a><span class="lineno">  173</span>     <span class="comment">// Add a using directive as if it had been declared in the given</span></div>
+<div class="line"><a name="l00174"></a><span class="lineno">  174</span>     <span class="comment">// context.  This helps implement C++ [namespace.udir]p3:</span></div>
+<div class="line"><a name="l00175"></a><span class="lineno">  175</span>     <span class="comment">//   The using-directive is transitive: if a scope contains a</span></div>
+<div class="line"><a name="l00176"></a><span class="lineno">  176</span>     <span class="comment">//   using-directive that nominates a second namespace that itself</span></div>
+<div class="line"><a name="l00177"></a><span class="lineno">  177</span>     <span class="comment">//   contains using-directives, the effect is as if the</span></div>
+<div class="line"><a name="l00178"></a><span class="lineno">  178</span>     <span class="comment">//   using-directives from the second namespace also appeared in</span></div>
+<div class="line"><a name="l00179"></a><span class="lineno">  179</span>     <span class="comment">//   the first.</span></div>
+<div class="line"><a name="l00180"></a><span class="lineno">  180</span>     <span class="keywordtype">void</span> addUsingDirective(<a class="code" href="classclang_1_1UsingDirectiveDecl.html" title="Represents C++ using-directive.">UsingDirectiveDecl</a> *UD, <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *EffectiveDC) {</div>
+<div class="line"><a name="l00181"></a><span class="lineno">  181</span>       <span class="comment">// Find the common ancestor between the effective context and</span></div>
+<div class="line"><a name="l00182"></a><span class="lineno">  182</span>       <span class="comment">// the nominated namespace.</span></div>
+<div class="line"><a name="l00183"></a><span class="lineno">  183</span>       <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *Common = UD-><a class="code" href="classclang_1_1UsingDirectiveDecl.html#aa99e507d882d7017103af7a45c0d09f8" title="Returns the namespace nominated by this using-directive.">getNominatedNamespace</a>();</div>
+<div class="line"><a name="l00184"></a><span class="lineno">  184</span>       <span class="keywordflow">while</span> (!Common-><a class="code" href="classclang_1_1DeclContext.html#ac573b7eaf4f3177d1378df80e557160d" title="Determine whether this declaration context encloses the declaration context DC.">Encloses</a>(EffectiveDC))</div>
+<div class="line"><a name="l00185"></a><span class="lineno">  185</span>         Common = Common-><a class="code" href="classclang_1_1DeclContext.html#a31c99b38017e8d702fda9c0f1d021186" title="getParent - Returns the containing DeclContext.">getParent</a>();</div>
+<div class="line"><a name="l00186"></a><span class="lineno">  186</span>       Common = Common-><a class="code" href="classclang_1_1DeclContext.html#ac3368ad7389098f8fed5c5d346b77445">getPrimaryContext</a>();</div>
+<div class="line"><a name="l00187"></a><span class="lineno">  187</span> </div>
+<div class="line"><a name="l00188"></a><span class="lineno">  188</span>       list.push_back(UnqualUsingEntry(UD-><a class="code" href="classclang_1_1UsingDirectiveDecl.html#aa99e507d882d7017103af7a45c0d09f8" title="Returns the namespace nominated by this using-directive.">getNominatedNamespace</a>(), Common));</div>
+<div class="line"><a name="l00189"></a><span class="lineno">  189</span>     }</div>
+<div class="line"><a name="l00190"></a><span class="lineno">  190</span> </div>
+<div class="line"><a name="l00191"></a><span class="lineno">  191</span>     <span class="keywordtype">void</span> done() {</div>
+<div class="line"><a name="l00192"></a><span class="lineno">  192</span>       std::sort(list.begin(), list.end(), UnqualUsingEntry::Comparator());</div>
+<div class="line"><a name="l00193"></a><span class="lineno">  193</span>     }</div>
+<div class="line"><a name="l00194"></a><span class="lineno">  194</span> </div>
+<div class="line"><a name="l00195"></a><span class="lineno">  195</span>     <span class="keyword">typedef</span> ListTy::const_iterator const_iterator;</div>
+<div class="line"><a name="l00196"></a><span class="lineno">  196</span> </div>
+<div class="line"><a name="l00197"></a><span class="lineno">  197</span>     const_iterator begin()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> list.begin(); }</div>
+<div class="line"><a name="l00198"></a><span class="lineno">  198</span>     const_iterator end()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> list.end(); }</div>
+<div class="line"><a name="l00199"></a><span class="lineno">  199</span> </div>
+<div class="line"><a name="l00200"></a><span class="lineno">  200</span>     std::pair<const_iterator,const_iterator></div>
+<div class="line"><a name="l00201"></a><span class="lineno">  201</span>     getNamespacesFor(<a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *DC)<span class="keyword"> const </span>{</div>
+<div class="line"><a name="l00202"></a><span class="lineno">  202</span>       <span class="keywordflow">return</span> std::equal_range(begin(), end(), DC-><a class="code" href="classclang_1_1DeclContext.html#ac3368ad7389098f8fed5c5d346b77445">getPrimaryContext</a>(),</div>
+<div class="line"><a name="l00203"></a><span class="lineno">  203</span>                               UnqualUsingEntry::Comparator());</div>
+<div class="line"><a name="l00204"></a><span class="lineno">  204</span>     }</div>
+<div class="line"><a name="l00205"></a><span class="lineno">  205</span>   };</div>
+<div class="line"><a name="l00206"></a><span class="lineno">  206</span> }</div>
+<div class="line"><a name="l00207"></a><span class="lineno">  207</span> </div>
+<div class="line"><a name="l00208"></a><span class="lineno">  208</span> <span class="comment">// Retrieve the set of identifier namespaces that correspond to a</span></div>
+<div class="line"><a name="l00209"></a><span class="lineno">  209</span> <span class="comment">// specific kind of name lookup.</span></div>
+<div class="line"><a name="l00210"></a><span class="lineno"><a class="code" href="SemaLookup_8cpp.html#aef3ea2f0802854a2f22cc56fd1a0b89a">  210</a></span> <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <a class="code" href="SemaLookup_8cpp.html#aef3ea2f0802854a2f22cc56fd1a0b89a">getIDNS</a>(<a class="code" href="classclang_1_1Sema.html#a0c6e994c44767e74e2892aa0235efb1a" title="Describes the kind of name lookup to perform.">Sema::LookupNameKind</a> NameKind,</div>
+<div class="line"><a name="l00211"></a><span class="lineno">  211</span>                                <span class="keywordtype">bool</span> <a class="code" href="namespaceclang_1_1frontend.html#a09dfa01c4e997a3794d80922c5e853bbaf89a7ac6211aecefb5f7ecc17d3ebed4">CPlusPlus</a>,</div>
+<div class="line"><a name="l00212"></a><span class="lineno">  212</span>                                <span class="keywordtype">bool</span> Redeclaration) {</div>
+<div class="line"><a name="l00213"></a><span class="lineno">  213</span>   <span class="keywordtype">unsigned</span> IDNS = 0;</div>
+<div class="line"><a name="l00214"></a><span class="lineno">  214</span>   <span class="keywordflow">switch</span> (NameKind) {</div>
+<div class="line"><a name="l00215"></a><span class="lineno">  215</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1Sema.html#a0c6e994c44767e74e2892aa0235efb1aa63a55825133a7e4e591e4f68f8edd0dd" title="Look up implicit 'self' parameter of an objective-c method.">Sema::LookupObjCImplicitSelfParam</a>:</div>
+<div class="line"><a name="l00216"></a><span class="lineno">  216</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1Sema.html#a0c6e994c44767e74e2892aa0235efb1aa0f401cd356feef42a5d4f95df7a6bf66">Sema::LookupOrdinaryName</a>:</div>
+<div class="line"><a name="l00217"></a><span class="lineno">  217</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1Sema.html#a0c6e994c44767e74e2892aa0235efb1aa4735baa4836efba2bb5ae81bc44c0773">Sema::LookupRedeclarationWithLinkage</a>:</div>
+<div class="line"><a name="l00218"></a><span class="lineno">  218</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1Sema.html#a0c6e994c44767e74e2892aa0235efb1aa37fcc894fca1d66cafc13f5451162b95">Sema::LookupLocalFriendName</a>:</div>
+<div class="line"><a name="l00219"></a><span class="lineno">  219</span>     IDNS = <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710a404c48f346be24fe30ae9bb910177a34">Decl::IDNS_Ordinary</a>;</div>
+<div class="line"><a name="l00220"></a><span class="lineno">  220</span>     <span class="keywordflow">if</span> (CPlusPlus) {</div>
+<div class="line"><a name="l00221"></a><span class="lineno">  221</span>       IDNS |= <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710af56b326acd2688e908a81d22fdbf5f47">Decl::IDNS_Tag</a> | <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710a96e26295d5162e8a76b56de4e5b11602">Decl::IDNS_Member</a> | <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710ac22906eb1b728c3ed9e7524777b8ea79">Decl::IDNS_Namespace</a>;</div>
+<div class="line"><a name="l00222"></a><span class="lineno">  222</span>       <span class="keywordflow">if</span> (Redeclaration)</div>
+<div class="line"><a name="l00223"></a><span class="lineno">  223</span>         IDNS |= <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710a22bb6e3dcce3f488eba2cec593311e95">Decl::IDNS_TagFriend</a> | <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710aca967650768477c1434472f270759ec1">Decl::IDNS_OrdinaryFriend</a>;</div>
+<div class="line"><a name="l00224"></a><span class="lineno">  224</span>     }</div>
+<div class="line"><a name="l00225"></a><span class="lineno">  225</span>     <span class="keywordflow">if</span> (Redeclaration)</div>
+<div class="line"><a name="l00226"></a><span class="lineno">  226</span>       IDNS |= <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710ae8bb57335741794e2cfb71deefd7660b">Decl::IDNS_LocalExtern</a>;</div>
+<div class="line"><a name="l00227"></a><span class="lineno">  227</span>     <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l00228"></a><span class="lineno">  228</span> </div>
+<div class="line"><a name="l00229"></a><span class="lineno">  229</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1Sema.html#a0c6e994c44767e74e2892aa0235efb1aa6253ec1084459081e77ca3a11d3de567">Sema::LookupOperatorName</a>:</div>
+<div class="line"><a name="l00230"></a><span class="lineno">  230</span>     <span class="comment">// Operator lookup is its own crazy thing;  it is not the same</span></div>
+<div class="line"><a name="l00231"></a><span class="lineno">  231</span>     <span class="comment">// as (e.g.) looking up an operator name for redeclaration.</span></div>
+<div class="line"><a name="l00232"></a><span class="lineno">  232</span>     assert(!Redeclaration && <span class="stringliteral">"cannot do redeclaration operator lookup"</span>);</div>
+<div class="line"><a name="l00233"></a><span class="lineno">  233</span>     IDNS = <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710a172a261a236a3ca59c24d63c3e797006">Decl::IDNS_NonMemberOperator</a>;</div>
+<div class="line"><a name="l00234"></a><span class="lineno">  234</span>     <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l00235"></a><span class="lineno">  235</span> </div>
+<div class="line"><a name="l00236"></a><span class="lineno">  236</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1Sema.html#a0c6e994c44767e74e2892aa0235efb1aadbe88511d9a4a6ec1eec1278fa6b3888">Sema::LookupTagName</a>:</div>
+<div class="line"><a name="l00237"></a><span class="lineno">  237</span>     <span class="keywordflow">if</span> (CPlusPlus) {</div>
+<div class="line"><a name="l00238"></a><span class="lineno">  238</span>       IDNS = <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710a6cb28bd82a63a8a39fd86a3dbba7494e">Decl::IDNS_Type</a>;</div>
+<div class="line"><a name="l00239"></a><span class="lineno">  239</span> </div>
+<div class="line"><a name="l00240"></a><span class="lineno">  240</span>       <span class="comment">// When looking for a redeclaration of a tag name, we add:</span></div>
+<div class="line"><a name="l00241"></a><span class="lineno">  241</span>       <span class="comment">// 1) TagFriend to find undeclared friend decls</span></div>
+<div class="line"><a name="l00242"></a><span class="lineno">  242</span>       <span class="comment">// 2) Namespace because they can't "overload" with tag decls.</span></div>
+<div class="line"><a name="l00243"></a><span class="lineno">  243</span>       <span class="comment">// 3) Tag because it includes class templates, which can't</span></div>
+<div class="line"><a name="l00244"></a><span class="lineno">  244</span>       <span class="comment">//    "overload" with tag decls.</span></div>
+<div class="line"><a name="l00245"></a><span class="lineno">  245</span>       <span class="keywordflow">if</span> (Redeclaration)</div>
+<div class="line"><a name="l00246"></a><span class="lineno">  246</span>         IDNS |= <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710af56b326acd2688e908a81d22fdbf5f47">Decl::IDNS_Tag</a> | <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710a22bb6e3dcce3f488eba2cec593311e95">Decl::IDNS_TagFriend</a> | <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710ac22906eb1b728c3ed9e7524777b8ea79">Decl::IDNS_Namespace</a>;</div>
+<div class="line"><a name="l00247"></a><span class="lineno">  247</span>     } <span class="keywordflow">else</span> {</div>
+<div class="line"><a name="l00248"></a><span class="lineno">  248</span>       IDNS = <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710af56b326acd2688e908a81d22fdbf5f47">Decl::IDNS_Tag</a>;</div>
+<div class="line"><a name="l00249"></a><span class="lineno">  249</span>     }</div>
+<div class="line"><a name="l00250"></a><span class="lineno">  250</span>     <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l00251"></a><span class="lineno">  251</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1Sema.html#a0c6e994c44767e74e2892aa0235efb1aa0a332c1f1ad4dbaad25c7dd098ece486" title="Label name lookup.">Sema::LookupLabel</a>:</div>
+<div class="line"><a name="l00252"></a><span class="lineno">  252</span>     IDNS = <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710a889b068bc28ba56b900c0c8db58eec17" title="Labels, declared with 'x:' and referenced with 'goto x'.">Decl::IDNS_Label</a>;</div>
+<div class="line"><a name="l00253"></a><span class="lineno">  253</span>     <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l00254"></a><span class="lineno">  254</span>       </div>
+<div class="line"><a name="l00255"></a><span class="lineno">  255</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1Sema.html#a0c6e994c44767e74e2892aa0235efb1aa93f2be273881a14dc35b733bc8653dbc">Sema::LookupMemberName</a>:</div>
+<div class="line"><a name="l00256"></a><span class="lineno">  256</span>     IDNS = <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710a96e26295d5162e8a76b56de4e5b11602">Decl::IDNS_Member</a>;</div>
+<div class="line"><a name="l00257"></a><span class="lineno">  257</span>     <span class="keywordflow">if</span> (CPlusPlus)</div>
+<div class="line"><a name="l00258"></a><span class="lineno">  258</span>       IDNS |= <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710af56b326acd2688e908a81d22fdbf5f47">Decl::IDNS_Tag</a> | <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710a404c48f346be24fe30ae9bb910177a34">Decl::IDNS_Ordinary</a>;</div>
+<div class="line"><a name="l00259"></a><span class="lineno">  259</span>     <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l00260"></a><span class="lineno">  260</span> </div>
+<div class="line"><a name="l00261"></a><span class="lineno">  261</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1Sema.html#a0c6e994c44767e74e2892aa0235efb1aa34e1d356150277fe257beaa28e2c9256">Sema::LookupNestedNameSpecifierName</a>:</div>
+<div class="line"><a name="l00262"></a><span class="lineno">  262</span>     IDNS = <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710a6cb28bd82a63a8a39fd86a3dbba7494e">Decl::IDNS_Type</a> | <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710ac22906eb1b728c3ed9e7524777b8ea79">Decl::IDNS_Namespace</a>;</div>
+<div class="line"><a name="l00263"></a><span class="lineno">  263</span>     <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l00264"></a><span class="lineno">  264</span> </div>
+<div class="line"><a name="l00265"></a><span class="lineno">  265</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1Sema.html#a0c6e994c44767e74e2892aa0235efb1aa64ec60e96d2a8409027777446bd27ea0">Sema::LookupNamespaceName</a>:</div>
+<div class="line"><a name="l00266"></a><span class="lineno">  266</span>     IDNS = <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710ac22906eb1b728c3ed9e7524777b8ea79">Decl::IDNS_Namespace</a>;</div>
+<div class="line"><a name="l00267"></a><span class="lineno">  267</span>     <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l00268"></a><span class="lineno">  268</span> </div>
+<div class="line"><a name="l00269"></a><span class="lineno">  269</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1Sema.html#a0c6e994c44767e74e2892aa0235efb1aa15bf882e04429996f3806bc155c11b3f">Sema::LookupUsingDeclName</a>:</div>
+<div class="line"><a name="l00270"></a><span class="lineno">  270</span>     IDNS = <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710a404c48f346be24fe30ae9bb910177a34">Decl::IDNS_Ordinary</a> | <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710af56b326acd2688e908a81d22fdbf5f47">Decl::IDNS_Tag</a></div>
+<div class="line"><a name="l00271"></a><span class="lineno">  271</span>          | <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710a96e26295d5162e8a76b56de4e5b11602">Decl::IDNS_Member</a> | <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710adfc94294fd49428857d181bdb0533fd1">Decl::IDNS_Using</a>;</div>
+<div class="line"><a name="l00272"></a><span class="lineno">  272</span>     <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l00273"></a><span class="lineno">  273</span> </div>
+<div class="line"><a name="l00274"></a><span class="lineno">  274</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1Sema.html#a0c6e994c44767e74e2892aa0235efb1aa3cecd2a9d01a1d1ce7d9324e20993e92" title="Look up the name of an Objective-C protocol.">Sema::LookupObjCProtocolName</a>:</div>
+<div class="line"><a name="l00275"></a><span class="lineno">  275</span>     IDNS = <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710abdf62fd9f1af5e6c4d726c75569cbee8" title="Objective C @protocol.">Decl::IDNS_ObjCProtocol</a>;</div>
+<div class="line"><a name="l00276"></a><span class="lineno">  276</span>     <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l00277"></a><span class="lineno">  277</span> </div>
+<div class="line"><a name="l00278"></a><span class="lineno">  278</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1Sema.html#a0c6e994c44767e74e2892aa0235efb1aae50e7e561661c8309e642dbc7b5a1309" title="Look up any declaration with any name.">Sema::LookupAnyName</a>:</div>
+<div class="line"><a name="l00279"></a><span class="lineno">  279</span>     IDNS = <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710a404c48f346be24fe30ae9bb910177a34">Decl::IDNS_Ordinary</a> | <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710af56b326acd2688e908a81d22fdbf5f47">Decl::IDNS_Tag</a> | <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710a96e26295d5162e8a76b56de4e5b11602">Decl::IDNS_Member</a></div>
+<div class="line"><a name="l00280"></a><span class="lineno">  280</span>       | <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710adfc94294fd49428857d181bdb0533fd1">Decl::IDNS_Using</a> | <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710ac22906eb1b728c3ed9e7524777b8ea79">Decl::IDNS_Namespace</a> | <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710abdf62fd9f1af5e6c4d726c75569cbee8" title="Objective C @protocol.">Decl::IDNS_ObjCProtocol</a></div>
+<div class="line"><a name="l00281"></a><span class="lineno">  281</span>       | <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710a6cb28bd82a63a8a39fd86a3dbba7494e">Decl::IDNS_Type</a>;</div>
+<div class="line"><a name="l00282"></a><span class="lineno">  282</span>     <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l00283"></a><span class="lineno">  283</span>   }</div>
+<div class="line"><a name="l00284"></a><span class="lineno">  284</span>   <span class="keywordflow">return</span> IDNS;</div>
+<div class="line"><a name="l00285"></a><span class="lineno">  285</span> }</div>
+<div class="line"><a name="l00286"></a><span class="lineno">  286</span> </div>
+<div class="line"><a name="l00287"></a><span class="lineno">  287</span> <span class="keywordtype">void</span> LookupResult::configure() {</div>
+<div class="line"><a name="l00288"></a><span class="lineno">  288</span>   IDNS = <a class="code" href="SemaLookup_8cpp.html#aef3ea2f0802854a2f22cc56fd1a0b89a">getIDNS</a>(LookupKind, <a class="code" href="SemaOverload_8cpp.html#a2143ac7d927afc9feb28c9270c7ed86d">SemaRef</a>.<a class="code" href="classclang_1_1Sema.html#a5f632d714a520550786bde65d3771228">getLangOpts</a>().CPlusPlus,</div>
+<div class="line"><a name="l00289"></a><span class="lineno">  289</span>                  isForRedeclaration());</div>
+<div class="line"><a name="l00290"></a><span class="lineno">  290</span> </div>
+<div class="line"><a name="l00291"></a><span class="lineno">  291</span>   <span class="keywordflow">if</span> (!isForRedeclaration()) {</div>
+<div class="line"><a name="l00292"></a><span class="lineno">  292</span>     <span class="comment">// If we're looking for one of the allocation or deallocation</span></div>
+<div class="line"><a name="l00293"></a><span class="lineno">  293</span>     <span class="comment">// operators, make sure that the implicitly-declared new and delete</span></div>
+<div class="line"><a name="l00294"></a><span class="lineno">  294</span>     <span class="comment">// operators can be found.</span></div>
+<div class="line"><a name="l00295"></a><span class="lineno">  295</span>     <span class="keywordflow">switch</span> (NameInfo.getName().getCXXOverloadedOperator()) {</div>
+<div class="line"><a name="l00296"></a><span class="lineno">  296</span>     <span class="keywordflow">case</span> OO_New:</div>
+<div class="line"><a name="l00297"></a><span class="lineno">  297</span>     <span class="keywordflow">case</span> OO_Delete:</div>
+<div class="line"><a name="l00298"></a><span class="lineno">  298</span>     <span class="keywordflow">case</span> OO_Array_New:</div>
+<div class="line"><a name="l00299"></a><span class="lineno">  299</span>     <span class="keywordflow">case</span> OO_Array_Delete:</div>
+<div class="line"><a name="l00300"></a><span class="lineno">  300</span>       <a class="code" href="SemaOverload_8cpp.html#a2143ac7d927afc9feb28c9270c7ed86d">SemaRef</a>.<a class="code" href="classclang_1_1Sema.html#a006589aa20617b94a749967204864899">DeclareGlobalNewDelete</a>();</div>
+<div class="line"><a name="l00301"></a><span class="lineno">  301</span>       <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l00302"></a><span class="lineno">  302</span> </div>
+<div class="line"><a name="l00303"></a><span class="lineno">  303</span>     <span class="keywordflow">default</span>:</div>
+<div class="line"><a name="l00304"></a><span class="lineno">  304</span>       <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l00305"></a><span class="lineno">  305</span>     }</div>
+<div class="line"><a name="l00306"></a><span class="lineno">  306</span> </div>
+<div class="line"><a name="l00307"></a><span class="lineno">  307</span>     <span class="comment">// Compiler builtins are always visible, regardless of where they end</span></div>
+<div class="line"><a name="l00308"></a><span class="lineno">  308</span>     <span class="comment">// up being declared.</span></div>
+<div class="line"><a name="l00309"></a><span class="lineno">  309</span>     <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1IdentifierInfo.html">IdentifierInfo</a> *Id = NameInfo.<a class="code" href="classclang_1_1IdentifierInfo.html#a94caec6a16e508e8ca39eacd278bd2c5" title="Return the actual identifier string.">getName</a>().getAsIdentifierInfo()) {</div>
+<div class="line"><a name="l00310"></a><span class="lineno">  310</span>       <span class="keywordflow">if</span> (<span class="keywordtype">unsigned</span> BuiltinID = Id->getBuiltinID()) {</div>
+<div class="line"><a name="l00311"></a><span class="lineno">  311</span>         <span class="keywordflow">if</span> (!<a class="code" href="SemaOverload_8cpp.html#a2143ac7d927afc9feb28c9270c7ed86d">SemaRef</a>.<a class="code" href="classclang_1_1Sema.html#a3ccddacb1f4f71b084296175cc9e5b0e">Context</a>.<a class="code" href="classclang_1_1ASTContext.html#a502181c4f5710068dddb1b4fc3233238">BuiltinInfo</a>.<a class="code" href="classclang_1_1Builtin_1_1Context.html#a6917c2a83fe0103f6d39fc713ec8bf9e" title="Determines whether this builtin is a predefined libc/libm function, such as "malloc", where we know the signature a priori.">isPredefinedLibFunction</a>(BuiltinID))</div>
+<div class="line"><a name="l00312"></a><span class="lineno">  312</span>           AllowHidden = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l00313"></a><span class="lineno">  313</span>       }</div>
+<div class="line"><a name="l00314"></a><span class="lineno">  314</span>     }</div>
+<div class="line"><a name="l00315"></a><span class="lineno">  315</span>   }</div>
+<div class="line"><a name="l00316"></a><span class="lineno">  316</span> }</div>
+<div class="line"><a name="l00317"></a><span class="lineno">  317</span> </div>
+<div class="line"><a name="l00318"></a><span class="lineno">  318</span> <span class="keywordtype">void</span> LookupResult::sanityImpl()<span class="keyword"> const </span>{</div>
+<div class="line"><a name="l00319"></a><span class="lineno">  319</span>   <span class="comment">// Note that this function is never called by NDEBUG builds. See</span></div>
+<div class="line"><a name="l00320"></a><span class="lineno">  320</span>   <span class="comment">// LookupResult::sanity().</span></div>
+<div class="line"><a name="l00321"></a><span class="lineno">  321</span>   assert(ResultKind != NotFound || Decls.size() == 0);</div>
+<div class="line"><a name="l00322"></a><span class="lineno">  322</span>   assert(ResultKind != Found || Decls.size() == 1);</div>
+<div class="line"><a name="l00323"></a><span class="lineno">  323</span>   assert(ResultKind != FoundOverloaded || Decls.size() > 1 ||</div>
+<div class="line"><a name="l00324"></a><span class="lineno">  324</span>          (Decls.size() == 1 &&</div>
+<div class="line"><a name="l00325"></a><span class="lineno">  325</span>           isa<FunctionTemplateDecl>((*begin())->getUnderlyingDecl())));</div>
+<div class="line"><a name="l00326"></a><span class="lineno">  326</span>   assert(ResultKind != FoundUnresolvedValue || sanityCheckUnresolved());</div>
+<div class="line"><a name="l00327"></a><span class="lineno">  327</span>   assert(ResultKind != Ambiguous || Decls.size() > 1 ||</div>
+<div class="line"><a name="l00328"></a><span class="lineno">  328</span>          (Decls.size() == 1 && (Ambiguity == AmbiguousBaseSubobjects ||</div>
+<div class="line"><a name="l00329"></a><span class="lineno">  329</span>                                 Ambiguity == AmbiguousBaseSubobjectTypes)));</div>
+<div class="line"><a name="l00330"></a><span class="lineno">  330</span>   assert((Paths != <a class="code" href="stddef_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>) == (ResultKind == Ambiguous &&</div>
+<div class="line"><a name="l00331"></a><span class="lineno">  331</span>                              (Ambiguity == AmbiguousBaseSubobjectTypes ||</div>
+<div class="line"><a name="l00332"></a><span class="lineno">  332</span>                               Ambiguity == AmbiguousBaseSubobjects)));</div>
+<div class="line"><a name="l00333"></a><span class="lineno">  333</span> }</div>
+<div class="line"><a name="l00334"></a><span class="lineno">  334</span> </div>
+<div class="line"><a name="l00335"></a><span class="lineno">  335</span> <span class="comment">// Necessary because CXXBasePaths is not complete in Sema.h</span></div>
+<div class="line"><a name="l00336"></a><span class="lineno">  336</span> <span class="keywordtype">void</span> LookupResult::deletePaths(<a class="code" href="classclang_1_1CXXBasePaths.html">CXXBasePaths</a> *Paths) {</div>
+<div class="line"><a name="l00337"></a><span class="lineno">  337</span>   <span class="keyword">delete</span> Paths;</div>
+<div class="line"><a name="l00338"></a><span class="lineno">  338</span> }</div>
+<div class="line"><a name="l00339"></a><span class="lineno">  339</span> <span class="comment"></span></div>
+<div class="line"><a name="l00340"></a><span class="lineno">  340</span> <span class="comment">/// Get a representative context for a declaration such that two declarations</span></div>
+<div class="line"><a name="l00341"></a><span class="lineno">  341</span> <span class="comment">/// will have the same context if they were found within the same scope.</span></div>
+<div class="line"><a name="l00342"></a><span class="lineno"><a class="code" href="SemaLookup_8cpp.html#aebe4dd16a7437a7d5d1a9c16bc1e5b3e">  342</a></span> <span class="comment"></span><span class="keyword">static</span> <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *<a class="code" href="SemaLookup_8cpp.html#aebe4dd16a7437a7d5d1a9c16bc1e5b3e">getContextForScopeMatching</a>(<a class="code" href="classclang_1_1Decl.html">Decl</a> *D) {</div>
+<div class="line"><a name="l00343"></a><span class="lineno">  343</span>   <span class="comment">// For function-local declarations, use that function as the context. This</span></div>
+<div class="line"><a name="l00344"></a><span class="lineno">  344</span>   <span class="comment">// doesn't account for scopes within the function; the caller must deal with</span></div>
+<div class="line"><a name="l00345"></a><span class="lineno">  345</span>   <span class="comment">// those.</span></div>
+<div class="line"><a name="l00346"></a><span class="lineno">  346</span>   <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *DC = D-><a class="code" href="classclang_1_1Decl.html#aa390f755d0a0a1fc7fc557af886e4c93">getLexicalDeclContext</a>();</div>
+<div class="line"><a name="l00347"></a><span class="lineno">  347</span>   <span class="keywordflow">if</span> (DC-><a class="code" href="classclang_1_1DeclContext.html#a05b966b6459e1d11c317f8abe3e2d66f">isFunctionOrMethod</a>())</div>
+<div class="line"><a name="l00348"></a><span class="lineno">  348</span>     <span class="keywordflow">return</span> DC;</div>
+<div class="line"><a name="l00349"></a><span class="lineno">  349</span> </div>
+<div class="line"><a name="l00350"></a><span class="lineno">  350</span>   <span class="comment">// Otherwise, look at the semantic context of the declaration. The</span></div>
+<div class="line"><a name="l00351"></a><span class="lineno">  351</span>   <span class="comment">// declaration must have been found there.</span></div>
+<div class="line"><a name="l00352"></a><span class="lineno">  352</span>   <span class="keywordflow">return</span> D-><a class="code" href="classclang_1_1Decl.html#af67e1a1d24dcc51093b95dbcf68d4288">getDeclContext</a>()-><a class="code" href="classclang_1_1DeclContext.html#a61743ae6acff989a26641900282e6305">getRedeclContext</a>();</div>
+<div class="line"><a name="l00353"></a><span class="lineno">  353</span> }</div>
+<div class="line"><a name="l00354"></a><span class="lineno">  354</span> <span class="comment"></span></div>
+<div class="line"><a name="l00355"></a><span class="lineno">  355</span> <span class="comment">/// Resolves the result kind of this lookup.</span></div>
+<div class="line"><a name="l00356"></a><span class="lineno"><a class="code" href="classclang_1_1LookupResult.html#a7bca9f6ca6b6a32dca0ac2dfc8568261">  356</a></span> <span class="comment"></span><span class="keywordtype">void</span> <a class="code" href="classclang_1_1LookupResult.html#a7bca9f6ca6b6a32dca0ac2dfc8568261" title="Resolves the result kind of the lookup, possibly hiding decls.">LookupResult::resolveKind</a>() {</div>
+<div class="line"><a name="l00357"></a><span class="lineno">  357</span>   <span class="keywordtype">unsigned</span> N = Decls.size();</div>
+<div class="line"><a name="l00358"></a><span class="lineno">  358</span> </div>
+<div class="line"><a name="l00359"></a><span class="lineno">  359</span>   <span class="comment">// Fast case: no possible ambiguity.</span></div>
+<div class="line"><a name="l00360"></a><span class="lineno">  360</span>   <span class="keywordflow">if</span> (N == 0) {</div>
+<div class="line"><a name="l00361"></a><span class="lineno">  361</span>     assert(ResultKind == NotFound || ResultKind == NotFoundInCurrentInstantiation);</div>
+<div class="line"><a name="l00362"></a><span class="lineno">  362</span>     <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l00363"></a><span class="lineno">  363</span>   }</div>
+<div class="line"><a name="l00364"></a><span class="lineno">  364</span> </div>
+<div class="line"><a name="l00365"></a><span class="lineno">  365</span>   <span class="comment">// If there's a single decl, we need to examine it to decide what</span></div>
+<div class="line"><a name="l00366"></a><span class="lineno">  366</span>   <span class="comment">// kind of lookup this is.</span></div>
+<div class="line"><a name="l00367"></a><span class="lineno">  367</span>   <span class="keywordflow">if</span> (N == 1) {</div>
+<div class="line"><a name="l00368"></a><span class="lineno">  368</span>     <a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *D = (*Decls.begin())->getUnderlyingDecl();</div>
+<div class="line"><a name="l00369"></a><span class="lineno">  369</span>     <span class="keywordflow">if</span> (isa<FunctionTemplateDecl>(D))</div>
+<div class="line"><a name="l00370"></a><span class="lineno">  370</span>       ResultKind = FoundOverloaded;</div>
+<div class="line"><a name="l00371"></a><span class="lineno">  371</span>     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (isa<UnresolvedUsingValueDecl>(D))</div>
+<div class="line"><a name="l00372"></a><span class="lineno">  372</span>       ResultKind = FoundUnresolvedValue;</div>
+<div class="line"><a name="l00373"></a><span class="lineno">  373</span>     <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l00374"></a><span class="lineno">  374</span>   }</div>
+<div class="line"><a name="l00375"></a><span class="lineno">  375</span> </div>
+<div class="line"><a name="l00376"></a><span class="lineno">  376</span>   <span class="comment">// Don't do any extra resolution if we've already resolved as ambiguous.</span></div>
+<div class="line"><a name="l00377"></a><span class="lineno">  377</span>   <span class="keywordflow">if</span> (ResultKind == Ambiguous) <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l00378"></a><span class="lineno">  378</span> </div>
+<div class="line"><a name="l00379"></a><span class="lineno">  379</span>   llvm::SmallPtrSet<NamedDecl*, 16> Unique;</div>
+<div class="line"><a name="l00380"></a><span class="lineno">  380</span>   llvm::SmallPtrSet<QualType, 16> UniqueTypes;</div>
+<div class="line"><a name="l00381"></a><span class="lineno">  381</span> </div>
+<div class="line"><a name="l00382"></a><span class="lineno">  382</span>   <span class="keywordtype">bool</span> Ambiguous = <span class="keyword">false</span>;</div>
+<div class="line"><a name="l00383"></a><span class="lineno">  383</span>   <span class="keywordtype">bool</span> HasTag = <span class="keyword">false</span>, HasFunction = <span class="keyword">false</span>, HasNonFunction = <span class="keyword">false</span>;</div>
+<div class="line"><a name="l00384"></a><span class="lineno">  384</span>   <span class="keywordtype">bool</span> HasFunctionTemplate = <span class="keyword">false</span>, HasUnresolved = <span class="keyword">false</span>;</div>
+<div class="line"><a name="l00385"></a><span class="lineno">  385</span> </div>
+<div class="line"><a name="l00386"></a><span class="lineno">  386</span>   <span class="keywordtype">unsigned</span> UniqueTagIndex = 0;</div>
+<div class="line"><a name="l00387"></a><span class="lineno">  387</span> </div>
+<div class="line"><a name="l00388"></a><span class="lineno">  388</span>   <span class="keywordtype">unsigned</span> I = 0;</div>
+<div class="line"><a name="l00389"></a><span class="lineno">  389</span>   <span class="keywordflow">while</span> (I < N) {</div>
+<div class="line"><a name="l00390"></a><span class="lineno">  390</span>     <a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *D = Decls[I]-><a class="code" href="classclang_1_1NamedDecl.html#a8fee30304b9ae8b24136a279b678b951" title="Looks through UsingDecls and ObjCCompatibleAliasDecls for the underlying named decl.">getUnderlyingDecl</a>();</div>
+<div class="line"><a name="l00391"></a><span class="lineno">  391</span>     D = cast<NamedDecl>(D-><a class="code" href="classclang_1_1Decl.html#a8dc8c86b18af77eba9afe42e4f429fdc" title="Retrieves the "canonical" declaration of the given declaration.">getCanonicalDecl</a>());</div>
+<div class="line"><a name="l00392"></a><span class="lineno">  392</span> </div>
+<div class="line"><a name="l00393"></a><span class="lineno">  393</span>     <span class="comment">// Ignore an invalid declaration unless it's the only one left.</span></div>
+<div class="line"><a name="l00394"></a><span class="lineno">  394</span>     <span class="keywordflow">if</span> (D-><a class="code" href="classclang_1_1Decl.html#a17ec912fd67469eea51741d45eb0c800">isInvalidDecl</a>() && I < N-1) {</div>
+<div class="line"><a name="l00395"></a><span class="lineno">  395</span>       Decls[I] = Decls[--N];</div>
+<div class="line"><a name="l00396"></a><span class="lineno">  396</span>       <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l00397"></a><span class="lineno">  397</span>     }</div>
+<div class="line"><a name="l00398"></a><span class="lineno">  398</span> </div>
+<div class="line"><a name="l00399"></a><span class="lineno">  399</span>     <span class="comment">// Redeclarations of types via typedef can occur both within a scope</span></div>
+<div class="line"><a name="l00400"></a><span class="lineno">  400</span>     <span class="comment">// and, through using declarations and directives, across scopes. There is</span></div>
+<div class="line"><a name="l00401"></a><span class="lineno">  401</span>     <span class="comment">// no ambiguity if they all refer to the same type, so unique based on the</span></div>
+<div class="line"><a name="l00402"></a><span class="lineno">  402</span>     <span class="comment">// canonical type.</span></div>
+<div class="line"><a name="l00403"></a><span class="lineno">  403</span>     <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1TypeDecl.html">TypeDecl</a> *TD = dyn_cast<TypeDecl>(D)) {</div>
+<div class="line"><a name="l00404"></a><span class="lineno">  404</span>       <span class="keywordflow">if</span> (!TD->getDeclContext()->isRecord()) {</div>
+<div class="line"><a name="l00405"></a><span class="lineno">  405</span>         <a class="code" href="classclang_1_1QualType.html">QualType</a> T = <a class="code" href="SemaOverload_8cpp.html#a2143ac7d927afc9feb28c9270c7ed86d">SemaRef</a>.<a class="code" href="classclang_1_1Sema.html#a3ccddacb1f4f71b084296175cc9e5b0e">Context</a>.<a class="code" href="classclang_1_1ASTContext.html#a028b11acbffc8c91facbab289df57771" title="Return the unique reference to the type for the specified type declaration.">getTypeDeclType</a>(TD);</div>
+<div class="line"><a name="l00406"></a><span class="lineno">  406</span>         <span class="keywordflow">if</span> (!UniqueTypes.insert(<a class="code" href="SemaOverload_8cpp.html#a2143ac7d927afc9feb28c9270c7ed86d">SemaRef</a>.<a class="code" href="classclang_1_1Sema.html#a3ccddacb1f4f71b084296175cc9e5b0e">Context</a>.<a class="code" href="classclang_1_1ASTContext.html#a7e70bb7eebf01548a0cab752e390ba37" title="Return the canonical (structural) type corresponding to the specified potentially non-canonical type ...">getCanonicalType</a>(T))) {</div>
+<div class="line"><a name="l00407"></a><span class="lineno">  407</span>           <span class="comment">// The type is not unique; pull something off the back and continue</span></div>
+<div class="line"><a name="l00408"></a><span class="lineno">  408</span>           <span class="comment">// at this index.</span></div>
+<div class="line"><a name="l00409"></a><span class="lineno">  409</span>           Decls[I] = Decls[--N];</div>
+<div class="line"><a name="l00410"></a><span class="lineno">  410</span>           <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l00411"></a><span class="lineno">  411</span>         }</div>
+<div class="line"><a name="l00412"></a><span class="lineno">  412</span>       }</div>
+<div class="line"><a name="l00413"></a><span class="lineno">  413</span>     }</div>
+<div class="line"><a name="l00414"></a><span class="lineno">  414</span> </div>
+<div class="line"><a name="l00415"></a><span class="lineno">  415</span>     <span class="keywordflow">if</span> (!Unique.insert(D)) {</div>
+<div class="line"><a name="l00416"></a><span class="lineno">  416</span>       <span class="comment">// If it's not unique, pull something off the back (and</span></div>
+<div class="line"><a name="l00417"></a><span class="lineno">  417</span>       <span class="comment">// continue at this index).</span></div>
+<div class="line"><a name="l00418"></a><span class="lineno">  418</span>       Decls[I] = Decls[--N];</div>
+<div class="line"><a name="l00419"></a><span class="lineno">  419</span>       <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l00420"></a><span class="lineno">  420</span>     }</div>
+<div class="line"><a name="l00421"></a><span class="lineno">  421</span> </div>
+<div class="line"><a name="l00422"></a><span class="lineno">  422</span>     <span class="comment">// Otherwise, do some decl type analysis and then continue.</span></div>
+<div class="line"><a name="l00423"></a><span class="lineno">  423</span> </div>
+<div class="line"><a name="l00424"></a><span class="lineno">  424</span>     <span class="keywordflow">if</span> (isa<UnresolvedUsingValueDecl>(D)) {</div>
+<div class="line"><a name="l00425"></a><span class="lineno">  425</span>       HasUnresolved = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l00426"></a><span class="lineno">  426</span>     } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (isa<TagDecl>(D)) {</div>
+<div class="line"><a name="l00427"></a><span class="lineno">  427</span>       <span class="keywordflow">if</span> (HasTag)</div>
+<div class="line"><a name="l00428"></a><span class="lineno">  428</span>         Ambiguous = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l00429"></a><span class="lineno">  429</span>       UniqueTagIndex = I;</div>
+<div class="line"><a name="l00430"></a><span class="lineno">  430</span>       HasTag = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l00431"></a><span class="lineno">  431</span>     } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (isa<FunctionTemplateDecl>(D)) {</div>
+<div class="line"><a name="l00432"></a><span class="lineno">  432</span>       HasFunction = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l00433"></a><span class="lineno">  433</span>       HasFunctionTemplate = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l00434"></a><span class="lineno">  434</span>     } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (isa<FunctionDecl>(D)) {</div>
+<div class="line"><a name="l00435"></a><span class="lineno">  435</span>       HasFunction = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l00436"></a><span class="lineno">  436</span>     } <span class="keywordflow">else</span> {</div>
+<div class="line"><a name="l00437"></a><span class="lineno">  437</span>       <span class="keywordflow">if</span> (HasNonFunction)</div>
+<div class="line"><a name="l00438"></a><span class="lineno">  438</span>         Ambiguous = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l00439"></a><span class="lineno">  439</span>       HasNonFunction = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l00440"></a><span class="lineno">  440</span>     }</div>
+<div class="line"><a name="l00441"></a><span class="lineno">  441</span>     I++;</div>
+<div class="line"><a name="l00442"></a><span class="lineno">  442</span>   }</div>
+<div class="line"><a name="l00443"></a><span class="lineno">  443</span> </div>
+<div class="line"><a name="l00444"></a><span class="lineno">  444</span>   <span class="comment">// C++ [basic.scope.hiding]p2:</span></div>
+<div class="line"><a name="l00445"></a><span class="lineno">  445</span>   <span class="comment">//   A class name or enumeration name can be hidden by the name of</span></div>
+<div class="line"><a name="l00446"></a><span class="lineno">  446</span>   <span class="comment">//   an object, function, or enumerator declared in the same</span></div>
+<div class="line"><a name="l00447"></a><span class="lineno">  447</span>   <span class="comment">//   scope. If a class or enumeration name and an object, function,</span></div>
+<div class="line"><a name="l00448"></a><span class="lineno">  448</span>   <span class="comment">//   or enumerator are declared in the same scope (in any order)</span></div>
+<div class="line"><a name="l00449"></a><span class="lineno">  449</span>   <span class="comment">//   with the same name, the class or enumeration name is hidden</span></div>
+<div class="line"><a name="l00450"></a><span class="lineno">  450</span>   <span class="comment">//   wherever the object, function, or enumerator name is visible.</span></div>
+<div class="line"><a name="l00451"></a><span class="lineno">  451</span>   <span class="comment">// But it's still an error if there are distinct tag types found,</span></div>
+<div class="line"><a name="l00452"></a><span class="lineno">  452</span>   <span class="comment">// even if they're not visible. (ref?)</span></div>
+<div class="line"><a name="l00453"></a><span class="lineno">  453</span>   <span class="keywordflow">if</span> (HideTags && HasTag && !Ambiguous &&</div>
+<div class="line"><a name="l00454"></a><span class="lineno">  454</span>       (HasFunction || HasNonFunction || HasUnresolved)) {</div>
+<div class="line"><a name="l00455"></a><span class="lineno">  455</span>     <span class="keywordflow">if</span> (<a class="code" href="SemaLookup_8cpp.html#aebe4dd16a7437a7d5d1a9c16bc1e5b3e">getContextForScopeMatching</a>(Decls[UniqueTagIndex])-><a class="code" href="classclang_1_1DeclContext.html#ab26c189165e15c46df7e4c734da0b0b8" title="Determine whether this declaration context is equivalent to the declaration context DC...">Equals</a>(</div>
+<div class="line"><a name="l00456"></a><span class="lineno">  456</span>             <a class="code" href="SemaLookup_8cpp.html#aebe4dd16a7437a7d5d1a9c16bc1e5b3e">getContextForScopeMatching</a>(Decls[UniqueTagIndex ? 0 : N - 1])))</div>
+<div class="line"><a name="l00457"></a><span class="lineno">  457</span>       Decls[UniqueTagIndex] = Decls[--N];</div>
+<div class="line"><a name="l00458"></a><span class="lineno">  458</span>     <span class="keywordflow">else</span></div>
+<div class="line"><a name="l00459"></a><span class="lineno">  459</span>       Ambiguous = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l00460"></a><span class="lineno">  460</span>   }</div>
+<div class="line"><a name="l00461"></a><span class="lineno">  461</span> </div>
+<div class="line"><a name="l00462"></a><span class="lineno">  462</span>   Decls.set_size(N);</div>
+<div class="line"><a name="l00463"></a><span class="lineno">  463</span> </div>
+<div class="line"><a name="l00464"></a><span class="lineno">  464</span>   <span class="keywordflow">if</span> (HasNonFunction && (HasFunction || HasUnresolved))</div>
+<div class="line"><a name="l00465"></a><span class="lineno">  465</span>     Ambiguous = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l00466"></a><span class="lineno">  466</span> </div>
+<div class="line"><a name="l00467"></a><span class="lineno">  467</span>   <span class="keywordflow">if</span> (Ambiguous)</div>
+<div class="line"><a name="l00468"></a><span class="lineno">  468</span>     setAmbiguous(<a class="code" href="classclang_1_1LookupResult.html#aebf19a2597e5da2800d1fdf6ce23791ca821378a71aaf0c0e149092739ad331e9">LookupResult::AmbiguousReference</a>);</div>
+<div class="line"><a name="l00469"></a><span class="lineno">  469</span>   <span class="keywordflow">else</span> <span class="keywordflow">if</span> (HasUnresolved)</div>
+<div class="line"><a name="l00470"></a><span class="lineno">  470</span>     ResultKind = <a class="code" href="classclang_1_1LookupResult.html#a1ca33eb830beacd6f646737a21a4686aa1e208636865be93b4e400891bd69baf6" title="Name lookup found an unresolvable value declaration and cannot yet complete. This only happens in C++...">LookupResult::FoundUnresolvedValue</a>;</div>
+<div class="line"><a name="l00471"></a><span class="lineno">  471</span>   <span class="keywordflow">else</span> <span class="keywordflow">if</span> (N > 1 || HasFunctionTemplate)</div>
+<div class="line"><a name="l00472"></a><span class="lineno">  472</span>     ResultKind = <a class="code" href="classclang_1_1LookupResult.html#a1ca33eb830beacd6f646737a21a4686aa17c909142b06001d7e2bb77df6c4e9cf" title="Name lookup found a set of overloaded functions that met the criteria.">LookupResult::FoundOverloaded</a>;</div>
+<div class="line"><a name="l00473"></a><span class="lineno">  473</span>   <span class="keywordflow">else</span></div>
+<div class="line"><a name="l00474"></a><span class="lineno">  474</span>     ResultKind = <a class="code" href="classclang_1_1LookupResult.html#a1ca33eb830beacd6f646737a21a4686aaf75c8c7895a084ec560226061e6c69cb" title="Name lookup found a single declaration that met the criteria. getFoundDecl() will return this declara...">LookupResult::Found</a>;</div>
+<div class="line"><a name="l00475"></a><span class="lineno">  475</span> }</div>
+<div class="line"><a name="l00476"></a><span class="lineno">  476</span> </div>
+<div class="line"><a name="l00477"></a><span class="lineno">  477</span> <span class="keywordtype">void</span> LookupResult::addDeclsFromBasePaths(<span class="keyword">const</span> <a class="code" href="classclang_1_1CXXBasePaths.html">CXXBasePaths</a> &<a class="code" href="TokenAnnotator_8cpp.html#a0bf8bdaf8596b1161b6ce63c4232a1fb">P</a>) {</div>
+<div class="line"><a name="l00478"></a><span class="lineno">  478</span>   <a class="code" href="classclang_1_1CXXBasePaths.html#a7d85667e35e04f594d26dcf27cf988b9">CXXBasePaths::const_paths_iterator</a> I, E;</div>
+<div class="line"><a name="l00479"></a><span class="lineno">  479</span>   <span class="keywordflow">for</span> (I = P.<a class="code" href="classclang_1_1CXXBasePaths.html#a2ffc670a3f2252e2348a5685740b1b59">begin</a>(), E = P.<a class="code" href="classclang_1_1CXXBasePaths.html#a3ff4746eb6460f4165d48f2a8d0887e1">end</a>(); I != E; ++I)</div>
+<div class="line"><a name="l00480"></a><span class="lineno">  480</span>     <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1NamedDecl.html">DeclContext::lookup_iterator</a> DI = I->Decls.begin(),</div>
+<div class="line"><a name="l00481"></a><span class="lineno">  481</span>          DE = I->Decls.end(); DI != DE; ++DI)</div>
+<div class="line"><a name="l00482"></a><span class="lineno">  482</span>       addDecl(*DI);</div>
+<div class="line"><a name="l00483"></a><span class="lineno">  483</span> }</div>
+<div class="line"><a name="l00484"></a><span class="lineno">  484</span> </div>
+<div class="line"><a name="l00485"></a><span class="lineno"><a class="code" href="classclang_1_1LookupResult.html#a6b4c6ea23f29d8f8ff0fd3ab4e5d0e66">  485</a></span> <span class="keywordtype">void</span> <a class="code" href="classclang_1_1LookupResult.html#a6b4c6ea23f29d8f8ff0fd3ab4e5d0e66" title="Make these results show that the name was found in distinct base classes of the same type...">LookupResult::setAmbiguousBaseSubobjects</a>(<a class="code" href="classclang_1_1CXXBasePaths.html">CXXBasePaths</a> &P) {</div>
+<div class="line"><a name="l00486"></a><span class="lineno">  486</span>   Paths = <span class="keyword">new</span> <a class="code" href="classclang_1_1CXXBasePaths.html">CXXBasePaths</a>;</div>
+<div class="line"><a name="l00487"></a><span class="lineno">  487</span>   Paths-><a class="code" href="classclang_1_1CXXBasePaths.html#ae5922aed0852f129516e235941bcfb44" title="Swap this data structure's contents with another CXXBasePaths object.">swap</a>(P);</div>
+<div class="line"><a name="l00488"></a><span class="lineno">  488</span>   addDeclsFromBasePaths(*Paths);</div>
+<div class="line"><a name="l00489"></a><span class="lineno">  489</span>   resolveKind();</div>
+<div class="line"><a name="l00490"></a><span class="lineno">  490</span>   setAmbiguous(AmbiguousBaseSubobjects);</div>
+<div class="line"><a name="l00491"></a><span class="lineno">  491</span> }</div>
+<div class="line"><a name="l00492"></a><span class="lineno">  492</span> </div>
+<div class="line"><a name="l00493"></a><span class="lineno"><a class="code" href="classclang_1_1LookupResult.html#a88cb68e184d4361c5bec97e7b8a51557">  493</a></span> <span class="keywordtype">void</span> <a class="code" href="classclang_1_1LookupResult.html#a88cb68e184d4361c5bec97e7b8a51557" title="Make these results show that the name was found in base classes of different types.">LookupResult::setAmbiguousBaseSubobjectTypes</a>(<a class="code" href="classclang_1_1CXXBasePaths.html">CXXBasePaths</a> &P) {</div>
+<div class="line"><a name="l00494"></a><span class="lineno">  494</span>   Paths = <span class="keyword">new</span> <a class="code" href="classclang_1_1CXXBasePaths.html">CXXBasePaths</a>;</div>
+<div class="line"><a name="l00495"></a><span class="lineno">  495</span>   Paths-><a class="code" href="classclang_1_1CXXBasePaths.html#ae5922aed0852f129516e235941bcfb44" title="Swap this data structure's contents with another CXXBasePaths object.">swap</a>(P);</div>
+<div class="line"><a name="l00496"></a><span class="lineno">  496</span>   addDeclsFromBasePaths(*Paths);</div>
+<div class="line"><a name="l00497"></a><span class="lineno">  497</span>   resolveKind();</div>
+<div class="line"><a name="l00498"></a><span class="lineno">  498</span>   setAmbiguous(AmbiguousBaseSubobjectTypes);</div>
+<div class="line"><a name="l00499"></a><span class="lineno">  499</span> }</div>
+<div class="line"><a name="l00500"></a><span class="lineno">  500</span> </div>
+<div class="line"><a name="l00501"></a><span class="lineno"><a class="code" href="classclang_1_1LookupResult.html#adc5b3b8bc87b490cb59015e598c3faf4">  501</a></span> <span class="keywordtype">void</span> <a class="code" href="classclang_1_1LookupResult.html#adc5b3b8bc87b490cb59015e598c3faf4">LookupResult::print</a>(raw_ostream &Out) {</div>
+<div class="line"><a name="l00502"></a><span class="lineno">  502</span>   Out << Decls.size() << <span class="stringliteral">" result(s)"</span>;</div>
+<div class="line"><a name="l00503"></a><span class="lineno">  503</span>   <span class="keywordflow">if</span> (isAmbiguous()) Out << <span class="stringliteral">", ambiguous"</span>;</div>
+<div class="line"><a name="l00504"></a><span class="lineno">  504</span>   <span class="keywordflow">if</span> (Paths) Out << <span class="stringliteral">", base paths present"</span>;</div>
+<div class="line"><a name="l00505"></a><span class="lineno">  505</span> </div>
+<div class="line"><a name="l00506"></a><span class="lineno">  506</span>   <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1UnresolvedSetIterator.html">iterator</a> I = begin(), E = end(); I != E; ++I) {</div>
+<div class="line"><a name="l00507"></a><span class="lineno">  507</span>     Out << <span class="stringliteral">"\n"</span>;</div>
+<div class="line"><a name="l00508"></a><span class="lineno">  508</span>     (*I)->print(Out, 2);</div>
+<div class="line"><a name="l00509"></a><span class="lineno">  509</span>   }</div>
+<div class="line"><a name="l00510"></a><span class="lineno">  510</span> }</div>
+<div class="line"><a name="l00511"></a><span class="lineno">  511</span> <span class="comment"></span></div>
+<div class="line"><a name="l00512"></a><span class="lineno">  512</span> <span class="comment">/// \brief Lookup a builtin function, when name lookup would otherwise</span></div>
+<div class="line"><a name="l00513"></a><span class="lineno">  513</span> <span class="comment">/// fail.</span></div>
+<div class="line"><a name="l00514"></a><span class="lineno"><a class="code" href="SemaLookup_8cpp.html#a1494a9e94162edb9a43261fcc0f61f85">  514</a></span> <span class="comment"></span><span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="SemaLookup_8cpp.html#a1494a9e94162edb9a43261fcc0f61f85" title="Lookup a builtin function, when name lookup would otherwise fail.">LookupBuiltin</a>(<a class="code" href="classclang_1_1Sema.html" title="Sema - This implements semantic analysis and AST building for C.">Sema</a> &S, <a class="code" href="classclang_1_1LookupResult.html" title="Represents the results of name lookup.">LookupResult</a> &R) {</div>
+<div class="line"><a name="l00515"></a><span class="lineno">  515</span>   <a class="code" href="classclang_1_1Sema.html#a0c6e994c44767e74e2892aa0235efb1a" title="Describes the kind of name lookup to perform.">Sema::LookupNameKind</a> NameKind = R.<a class="code" href="classclang_1_1LookupResult.html#a915bb2f2bfa4bd99bf3d546e6568003f" title="Gets the kind of lookup to perform.">getLookupKind</a>();</div>
+<div class="line"><a name="l00516"></a><span class="lineno">  516</span> </div>
+<div class="line"><a name="l00517"></a><span class="lineno">  517</span>   <span class="comment">// If we didn't find a use of this identifier, and if the identifier</span></div>
+<div class="line"><a name="l00518"></a><span class="lineno">  518</span>   <span class="comment">// corresponds to a compiler builtin, create the decl object for the builtin</span></div>
+<div class="line"><a name="l00519"></a><span class="lineno">  519</span>   <span class="comment">// now, injecting it into translation unit scope, and return it.</span></div>
+<div class="line"><a name="l00520"></a><span class="lineno">  520</span>   <span class="keywordflow">if</span> (NameKind == <a class="code" href="classclang_1_1Sema.html#a0c6e994c44767e74e2892aa0235efb1aa0f401cd356feef42a5d4f95df7a6bf66">Sema::LookupOrdinaryName</a> ||</div>
+<div class="line"><a name="l00521"></a><span class="lineno">  521</span>       NameKind == <a class="code" href="classclang_1_1Sema.html#a0c6e994c44767e74e2892aa0235efb1aa4735baa4836efba2bb5ae81bc44c0773">Sema::LookupRedeclarationWithLinkage</a>) {</div>
+<div class="line"><a name="l00522"></a><span class="lineno">  522</span>     <a class="code" href="classclang_1_1IdentifierInfo.html">IdentifierInfo</a> *II = R.<a class="code" href="classclang_1_1LookupResult.html#a3dd82d154e991b574d70a6a5aba8c61b" title="Gets the name to look up.">getLookupName</a>().<a class="code" href="classclang_1_1DeclarationName.html#a1ac2d6e470af6bb6313c390760a1e155">getAsIdentifierInfo</a>();</div>
+<div class="line"><a name="l00523"></a><span class="lineno">  523</span>     <span class="keywordflow">if</span> (II) {</div>
+<div class="line"><a name="l00524"></a><span class="lineno">  524</span>       <span class="keywordflow">if</span> (S.<a class="code" href="classclang_1_1Sema.html#a5f632d714a520550786bde65d3771228">getLangOpts</a>().CPlusPlus11 && S.<a class="code" href="classclang_1_1Sema.html#a5f632d714a520550786bde65d3771228">getLangOpts</a>().GNUMode &&</div>
+<div class="line"><a name="l00525"></a><span class="lineno">  525</span>           II == S.<a class="code" href="classclang_1_1Sema.html#ac95b1e7cfc9c2be2ac276761e14cc3dc">getFloat128Identifier</a>()) {</div>
+<div class="line"><a name="l00526"></a><span class="lineno">  526</span>         <span class="comment">// libstdc++4.7's type_traits expects type __float128 to exist, so</span></div>
+<div class="line"><a name="l00527"></a><span class="lineno">  527</span>         <span class="comment">// insert a dummy type to make that header build in gnu++11 mode.</span></div>
+<div class="line"><a name="l00528"></a><span class="lineno">  528</span>         R.<a class="code" href="classclang_1_1LookupResult.html#a62d3dbd6c56a75cad9685c81817253ac" title="Add a declaration to these results with its natural access. Does not test the acceptance criteria...">addDecl</a>(S.<a class="code" href="classclang_1_1Sema.html#a67eff5b9492fff49360d8000819a6719">getASTContext</a>().<a class="code" href="classclang_1_1ASTContext.html#afaf171ad89a8091584476dfe4e3a75c2" title="Retrieve the declaration for a 128-bit float stub type.">getFloat128StubType</a>());</div>
+<div class="line"><a name="l00529"></a><span class="lineno">  529</span>         <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
+<div class="line"><a name="l00530"></a><span class="lineno">  530</span>       }</div>
+<div class="line"><a name="l00531"></a><span class="lineno">  531</span> </div>
+<div class="line"><a name="l00532"></a><span class="lineno">  532</span>       <span class="comment">// If this is a builtin on this (or all) targets, create the decl.</span></div>
+<div class="line"><a name="l00533"></a><span class="lineno">  533</span>       <span class="keywordflow">if</span> (<span class="keywordtype">unsigned</span> BuiltinID = II-><a class="code" href="classclang_1_1IdentifierInfo.html#a9ccc5a2b6343bb5ceb2b3d533ecf8332" title="Return a value indicating whether this is a builtin function.">getBuiltinID</a>()) {</div>
+<div class="line"><a name="l00534"></a><span class="lineno">  534</span>         <span class="comment">// In C++, we don't have any predefined library functions like</span></div>
+<div class="line"><a name="l00535"></a><span class="lineno">  535</span>         <span class="comment">// 'malloc'. Instead, we'll just error.</span></div>
+<div class="line"><a name="l00536"></a><span class="lineno">  536</span>         <span class="keywordflow">if</span> (S.<a class="code" href="classclang_1_1Sema.html#a5f632d714a520550786bde65d3771228">getLangOpts</a>().CPlusPlus &&</div>
+<div class="line"><a name="l00537"></a><span class="lineno">  537</span>             S.<a class="code" href="classclang_1_1Sema.html#a3ccddacb1f4f71b084296175cc9e5b0e">Context</a>.<a class="code" href="classclang_1_1ASTContext.html#a502181c4f5710068dddb1b4fc3233238">BuiltinInfo</a>.<a class="code" href="classclang_1_1Builtin_1_1Context.html#a6917c2a83fe0103f6d39fc713ec8bf9e" title="Determines whether this builtin is a predefined libc/libm function, such as "malloc", where we know the signature a priori.">isPredefinedLibFunction</a>(BuiltinID))</div>
+<div class="line"><a name="l00538"></a><span class="lineno">  538</span>           <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l00539"></a><span class="lineno">  539</span> </div>
+<div class="line"><a name="l00540"></a><span class="lineno">  540</span>         <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *D = S.<a class="code" href="classclang_1_1Sema.html#a472e453d6a0b96bb4c73a2c611f53d30">LazilyCreateBuiltin</a>((<a class="code" href="classclang_1_1IdentifierInfo.html">IdentifierInfo</a> *)II,</div>
+<div class="line"><a name="l00541"></a><span class="lineno">  541</span>                                                  BuiltinID, S.<a class="code" href="classclang_1_1Sema.html#ac4a2923573dc0610e557c98a19f3e1b9">TUScope</a>,</div>
+<div class="line"><a name="l00542"></a><span class="lineno">  542</span>                                                  R.<a class="code" href="classclang_1_1LookupResult.html#a5b06ceea23259bb185a7108679564b15" title="True if this lookup is just looking for an existing declaration.">isForRedeclaration</a>(),</div>
+<div class="line"><a name="l00543"></a><span class="lineno">  543</span>                                                  R.<a class="code" href="classclang_1_1LookupResult.html#af980e0b636ede7d9e0018dff05b0d269">getNameLoc</a>())) {</div>
+<div class="line"><a name="l00544"></a><span class="lineno">  544</span>           R.<a class="code" href="classclang_1_1LookupResult.html#a62d3dbd6c56a75cad9685c81817253ac" title="Add a declaration to these results with its natural access. Does not test the acceptance criteria...">addDecl</a>(D);</div>
+<div class="line"><a name="l00545"></a><span class="lineno">  545</span>           <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
+<div class="line"><a name="l00546"></a><span class="lineno">  546</span>         }</div>
+<div class="line"><a name="l00547"></a><span class="lineno">  547</span> </div>
+<div class="line"><a name="l00548"></a><span class="lineno">  548</span>         <span class="keywordflow">if</span> (R.<a class="code" href="classclang_1_1LookupResult.html#a5b06ceea23259bb185a7108679564b15" title="True if this lookup is just looking for an existing declaration.">isForRedeclaration</a>()) {</div>
+<div class="line"><a name="l00549"></a><span class="lineno">  549</span>           <span class="comment">// If we're redeclaring this function anyway, forget that</span></div>
+<div class="line"><a name="l00550"></a><span class="lineno">  550</span>           <span class="comment">// this was a builtin at all.</span></div>
+<div class="line"><a name="l00551"></a><span class="lineno">  551</span>           S.<a class="code" href="classclang_1_1Sema.html#a3ccddacb1f4f71b084296175cc9e5b0e">Context</a>.<a class="code" href="classclang_1_1ASTContext.html#a502181c4f5710068dddb1b4fc3233238">BuiltinInfo</a>.<a class="code" href="classclang_1_1Builtin_1_1Context.html#a16dff1bc8fc6df65c22f3953f49aa86b" title="Completely forget that the given ID was ever considered a builtin, e.g., because the user provided a ...">ForgetBuiltin</a>(BuiltinID, S.<a class="code" href="classclang_1_1Sema.html#a3ccddacb1f4f71b084296175cc9e5b0e">Context</a>.<a class="code" href="classclang_1_1ASTContext.html#a4f95adb9958e22fbe55212ae6482feb4">Idents</a>);</div>
+<div class="line"><a name="l00552"></a><span class="lineno">  552</span>         }</div>
+<div class="line"><a name="l00553"></a><span class="lineno">  553</span> </div>
+<div class="line"><a name="l00554"></a><span class="lineno">  554</span>         <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l00555"></a><span class="lineno">  555</span>       }</div>
+<div class="line"><a name="l00556"></a><span class="lineno">  556</span>     }</div>
+<div class="line"><a name="l00557"></a><span class="lineno">  557</span>   }</div>
+<div class="line"><a name="l00558"></a><span class="lineno">  558</span> </div>
+<div class="line"><a name="l00559"></a><span class="lineno">  559</span>   <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l00560"></a><span class="lineno">  560</span> }</div>
+<div class="line"><a name="l00561"></a><span class="lineno">  561</span> <span class="comment"></span></div>
+<div class="line"><a name="l00562"></a><span class="lineno">  562</span> <span class="comment">/// \brief Determine whether we can declare a special member function within</span></div>
+<div class="line"><a name="l00563"></a><span class="lineno">  563</span> <span class="comment">/// the class at this point.</span></div>
+<div class="line"><a name="l00564"></a><span class="lineno"><a class="code" href="SemaLookup_8cpp.html#a1b34cb2cdb835df7a4e31f38591a8e6a">  564</a></span> <span class="comment"></span><span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="SemaLookup_8cpp.html#a1b34cb2cdb835df7a4e31f38591a8e6a" title="Determine whether we can declare a special member function within the class at this point...">CanDeclareSpecialMemberFunction</a>(<span class="keyword">const</span> <a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *Class) {</div>
+<div class="line"><a name="l00565"></a><span class="lineno">  565</span>   <span class="comment">// We need to have a definition for the class.</span></div>
+<div class="line"><a name="l00566"></a><span class="lineno">  566</span>   <span class="keywordflow">if</span> (!Class-><a class="code" href="classclang_1_1CXXRecordDecl.html#a2bd01ec3ffb06b176ced1bfc31abd99f">getDefinition</a>() || Class-><a class="code" href="classclang_1_1DeclContext.html#a0d06ccd1db1b1f60e91d95d50aeae75d" title="Determines whether this context is dependent on a template parameter.">isDependentContext</a>())</div>
+<div class="line"><a name="l00567"></a><span class="lineno">  567</span>     <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l00568"></a><span class="lineno">  568</span> </div>
+<div class="line"><a name="l00569"></a><span class="lineno">  569</span>   <span class="comment">// We can't be in the middle of defining the class.</span></div>
+<div class="line"><a name="l00570"></a><span class="lineno">  570</span>   <span class="keywordflow">return</span> !Class-><a class="code" href="classclang_1_1TagDecl.html#a9266d1647f8010e74f9ab657b7b0fb96" title="isBeingDefined - Return true if this decl is currently being defined.">isBeingDefined</a>();</div>
+<div class="line"><a name="l00571"></a><span class="lineno">  571</span> }</div>
+<div class="line"><a name="l00572"></a><span class="lineno">  572</span> </div>
+<div class="line"><a name="l00573"></a><span class="lineno"><a class="code" href="classclang_1_1Sema.html#a13e40364e7b40a2311e03d010610bd34">  573</a></span> <span class="keywordtype">void</span> <a class="code" href="classclang_1_1Sema.html#a13e40364e7b40a2311e03d010610bd34" title="Force the declaration of any implicitly-declared members of this class.">Sema::ForceDeclarationOfImplicitMembers</a>(<a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *Class) {</div>
+<div class="line"><a name="l00574"></a><span class="lineno">  574</span>   <span class="keywordflow">if</span> (!<a class="code" href="SemaLookup_8cpp.html#a1b34cb2cdb835df7a4e31f38591a8e6a" title="Determine whether we can declare a special member function within the class at this point...">CanDeclareSpecialMemberFunction</a>(Class))</div>
+<div class="line"><a name="l00575"></a><span class="lineno">  575</span>     <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l00576"></a><span class="lineno">  576</span> </div>
+<div class="line"><a name="l00577"></a><span class="lineno">  577</span>   <span class="comment">// If the default constructor has not yet been declared, do so now.</span></div>
+<div class="line"><a name="l00578"></a><span class="lineno">  578</span>   <span class="keywordflow">if</span> (Class-><a class="code" href="classclang_1_1CXXRecordDecl.html#a94c0049d53c9807b9a92e2e739e6cf4d" title="Determine if we need to declare a default constructor for this class.">needsImplicitDefaultConstructor</a>())</div>
+<div class="line"><a name="l00579"></a><span class="lineno">  579</span>     DeclareImplicitDefaultConstructor(Class);</div>
+<div class="line"><a name="l00580"></a><span class="lineno">  580</span> </div>
+<div class="line"><a name="l00581"></a><span class="lineno">  581</span>   <span class="comment">// If the copy constructor has not yet been declared, do so now.</span></div>
+<div class="line"><a name="l00582"></a><span class="lineno">  582</span>   <span class="keywordflow">if</span> (Class-><a class="code" href="classclang_1_1CXXRecordDecl.html#ad2e8da39d768392004ee0d22aa68bd55" title="Determine whether this class needs an implicit copy constructor to be lazily declared.">needsImplicitCopyConstructor</a>())</div>
+<div class="line"><a name="l00583"></a><span class="lineno">  583</span>     DeclareImplicitCopyConstructor(Class);</div>
+<div class="line"><a name="l00584"></a><span class="lineno">  584</span> </div>
+<div class="line"><a name="l00585"></a><span class="lineno">  585</span>   <span class="comment">// If the copy assignment operator has not yet been declared, do so now.</span></div>
+<div class="line"><a name="l00586"></a><span class="lineno">  586</span>   <span class="keywordflow">if</span> (Class-><a class="code" href="classclang_1_1CXXRecordDecl.html#aaf068cf695909682bc02503ff1dad038" title="Determine whether this class needs an implicit copy assignment operator to be lazily declared...">needsImplicitCopyAssignment</a>())</div>
+<div class="line"><a name="l00587"></a><span class="lineno">  587</span>     DeclareImplicitCopyAssignment(Class);</div>
+<div class="line"><a name="l00588"></a><span class="lineno">  588</span> </div>
+<div class="line"><a name="l00589"></a><span class="lineno">  589</span>   <span class="keywordflow">if</span> (getLangOpts().CPlusPlus11) {</div>
+<div class="line"><a name="l00590"></a><span class="lineno">  590</span>     <span class="comment">// If the move constructor has not yet been declared, do so now.</span></div>
+<div class="line"><a name="l00591"></a><span class="lineno">  591</span>     <span class="keywordflow">if</span> (Class-><a class="code" href="classclang_1_1CXXRecordDecl.html#a1f4cf820298b5b08a2095af4e882aa8d" title="Determine whether this class should get an implicit move constructor or if any existing special membe...">needsImplicitMoveConstructor</a>())</div>
+<div class="line"><a name="l00592"></a><span class="lineno">  592</span>       DeclareImplicitMoveConstructor(Class); <span class="comment">// might not actually do it</span></div>
+<div class="line"><a name="l00593"></a><span class="lineno">  593</span> </div>
+<div class="line"><a name="l00594"></a><span class="lineno">  594</span>     <span class="comment">// If the move assignment operator has not yet been declared, do so now.</span></div>
+<div class="line"><a name="l00595"></a><span class="lineno">  595</span>     <span class="keywordflow">if</span> (Class-><a class="code" href="classclang_1_1CXXRecordDecl.html#a663c46f736eda04ddbbf599816341db9" title="Determine whether this class should get an implicit move assignment operator or if any existing speci...">needsImplicitMoveAssignment</a>())</div>
+<div class="line"><a name="l00596"></a><span class="lineno">  596</span>       DeclareImplicitMoveAssignment(Class); <span class="comment">// might not actually do it</span></div>
+<div class="line"><a name="l00597"></a><span class="lineno">  597</span>   }</div>
+<div class="line"><a name="l00598"></a><span class="lineno">  598</span> </div>
+<div class="line"><a name="l00599"></a><span class="lineno">  599</span>   <span class="comment">// If the destructor has not yet been declared, do so now.</span></div>
+<div class="line"><a name="l00600"></a><span class="lineno">  600</span>   <span class="keywordflow">if</span> (Class-><a class="code" href="classclang_1_1CXXRecordDecl.html#a2a2bd09612b3bb5c8f59bf8260a180c4" title="Determine whether this class needs an implicit destructor to be lazily declared.">needsImplicitDestructor</a>())</div>
+<div class="line"><a name="l00601"></a><span class="lineno">  601</span>     DeclareImplicitDestructor(Class);</div>
+<div class="line"><a name="l00602"></a><span class="lineno">  602</span> }</div>
+<div class="line"><a name="l00603"></a><span class="lineno">  603</span> <span class="comment"></span></div>
+<div class="line"><a name="l00604"></a><span class="lineno">  604</span> <span class="comment">/// \brief Determine whether this is the name of an implicitly-declared</span></div>
+<div class="line"><a name="l00605"></a><span class="lineno">  605</span> <span class="comment">/// special member function.</span></div>
+<div class="line"><a name="l00606"></a><span class="lineno"><a class="code" href="SemaLookup_8cpp.html#a9b4b0f89d5707d0a72c5fb6bc3ef366e">  606</a></span> <span class="comment"></span><span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="SemaLookup_8cpp.html#a9b4b0f89d5707d0a72c5fb6bc3ef366e" title="Determine whether this is the name of an implicitly-declared special member function.">isImplicitlyDeclaredMemberFunctionName</a>(<a class="code" href="classclang_1_1DeclarationName.html">DeclarationName</a> Name) {</div>
+<div class="line"><a name="l00607"></a><span class="lineno">  607</span>   <span class="keywordflow">switch</span> (Name.<a class="code" href="classclang_1_1DeclarationName.html#a3e722af81dd4b5670e834b20f47ba94b" title="getNameKind - Determine what kind of name this is.">getNameKind</a>()) {</div>
+<div class="line"><a name="l00608"></a><span class="lineno">  608</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1DeclarationName.html#a9ab322d434446b43379d39e41af5cbe3a3df3681bdb9f6f1a80535aaa4136e14f">DeclarationName::CXXConstructorName</a>:</div>
+<div class="line"><a name="l00609"></a><span class="lineno">  609</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1DeclarationName.html#a9ab322d434446b43379d39e41af5cbe3a3dd601f149fac45969958b93199092dc">DeclarationName::CXXDestructorName</a>:</div>
+<div class="line"><a name="l00610"></a><span class="lineno">  610</span>     <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
+<div class="line"><a name="l00611"></a><span class="lineno">  611</span> </div>
+<div class="line"><a name="l00612"></a><span class="lineno">  612</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1DeclarationName.html#a9ab322d434446b43379d39e41af5cbe3aa12a1e5dd5f04687d11eaf8ca7924faf">DeclarationName::CXXOperatorName</a>:</div>
+<div class="line"><a name="l00613"></a><span class="lineno">  613</span>     <span class="keywordflow">return</span> Name.<a class="code" href="classclang_1_1DeclarationName.html#a6c76421a3cdb33248e6ae27ceba55caf">getCXXOverloadedOperator</a>() == OO_Equal;</div>
+<div class="line"><a name="l00614"></a><span class="lineno">  614</span> </div>
+<div class="line"><a name="l00615"></a><span class="lineno">  615</span>   <span class="keywordflow">default</span>:</div>
+<div class="line"><a name="l00616"></a><span class="lineno">  616</span>     <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l00617"></a><span class="lineno">  617</span>   }</div>
+<div class="line"><a name="l00618"></a><span class="lineno">  618</span> </div>
+<div class="line"><a name="l00619"></a><span class="lineno">  619</span>   <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l00620"></a><span class="lineno">  620</span> }</div>
+<div class="line"><a name="l00621"></a><span class="lineno">  621</span> <span class="comment"></span></div>
+<div class="line"><a name="l00622"></a><span class="lineno">  622</span> <span class="comment">/// \brief If there are any implicit member functions with the given name</span></div>
+<div class="line"><a name="l00623"></a><span class="lineno">  623</span> <span class="comment">/// that need to be declared in the given declaration context, do so.</span></div>
+<div class="line"><a name="l00624"></a><span class="lineno"><a class="code" href="SemaLookup_8cpp.html#adf1e857b64a4c9b5a1ca2c91b9f0ec0e">  624</a></span> <span class="comment"></span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="SemaLookup_8cpp.html#adf1e857b64a4c9b5a1ca2c91b9f0ec0e" title="If there are any implicit member functions with the given name that need to be declared in the given ...">DeclareImplicitMemberFunctionsWithName</a>(<a class="code" href="classclang_1_1Sema.html" title="Sema - This implements semantic analysis and AST building for C.">Sema</a> &S,</div>
+<div class="line"><a name="l00625"></a><span class="lineno">  625</span>                                                    <a class="code" href="classclang_1_1DeclarationName.html">DeclarationName</a> Name,</div>
+<div class="line"><a name="l00626"></a><span class="lineno">  626</span>                                                    <span class="keyword">const</span> <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *DC) {</div>
+<div class="line"><a name="l00627"></a><span class="lineno">  627</span>   <span class="keywordflow">if</span> (!DC)</div>
+<div class="line"><a name="l00628"></a><span class="lineno">  628</span>     <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l00629"></a><span class="lineno">  629</span> </div>
+<div class="line"><a name="l00630"></a><span class="lineno">  630</span>   <span class="keywordflow">switch</span> (Name.<a class="code" href="classclang_1_1DeclarationName.html#a3e722af81dd4b5670e834b20f47ba94b" title="getNameKind - Determine what kind of name this is.">getNameKind</a>()) {</div>
+<div class="line"><a name="l00631"></a><span class="lineno">  631</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1DeclarationName.html#a9ab322d434446b43379d39e41af5cbe3a3df3681bdb9f6f1a80535aaa4136e14f">DeclarationName::CXXConstructorName</a>:</div>
+<div class="line"><a name="l00632"></a><span class="lineno">  632</span>     <span class="keywordflow">if</span> (<span class="keyword">const</span> <a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *Record = dyn_cast<CXXRecordDecl>(DC))</div>
+<div class="line"><a name="l00633"></a><span class="lineno">  633</span>       <span class="keywordflow">if</span> (Record->getDefinition() && <a class="code" href="SemaLookup_8cpp.html#a1b34cb2cdb835df7a4e31f38591a8e6a" title="Determine whether we can declare a special member function within the class at this point...">CanDeclareSpecialMemberFunction</a>(Record)) {</div>
+<div class="line"><a name="l00634"></a><span class="lineno">  634</span>         <a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *Class = <span class="keyword">const_cast<</span><a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *<span class="keyword">></span>(Record);</div>
+<div class="line"><a name="l00635"></a><span class="lineno">  635</span>         <span class="keywordflow">if</span> (Record->needsImplicitDefaultConstructor())</div>
+<div class="line"><a name="l00636"></a><span class="lineno">  636</span>           S.<a class="code" href="classclang_1_1Sema.html#a014411078997234b395a695801a56ef9" title="Declare the implicit default constructor for the given class.">DeclareImplicitDefaultConstructor</a>(Class);</div>
+<div class="line"><a name="l00637"></a><span class="lineno">  637</span>         <span class="keywordflow">if</span> (Record->needsImplicitCopyConstructor())</div>
+<div class="line"><a name="l00638"></a><span class="lineno">  638</span>           S.<a class="code" href="classclang_1_1Sema.html#acfdba3e8f70e543610e200726936e635" title="Declare the implicit copy constructor for the given class.">DeclareImplicitCopyConstructor</a>(Class);</div>
+<div class="line"><a name="l00639"></a><span class="lineno">  639</span>         <span class="keywordflow">if</span> (S.<a class="code" href="classclang_1_1Sema.html#a5f632d714a520550786bde65d3771228">getLangOpts</a>().CPlusPlus11 &&</div>
+<div class="line"><a name="l00640"></a><span class="lineno">  640</span>             Record->needsImplicitMoveConstructor())</div>
+<div class="line"><a name="l00641"></a><span class="lineno">  641</span>           S.<a class="code" href="classclang_1_1Sema.html#a27e04be53cf25f42fa1ff9775d3317ca" title="Declare the implicit move constructor for the given class.">DeclareImplicitMoveConstructor</a>(Class);</div>
+<div class="line"><a name="l00642"></a><span class="lineno">  642</span>       }</div>
+<div class="line"><a name="l00643"></a><span class="lineno">  643</span>     <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l00644"></a><span class="lineno">  644</span> </div>
+<div class="line"><a name="l00645"></a><span class="lineno">  645</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1DeclarationName.html#a9ab322d434446b43379d39e41af5cbe3a3dd601f149fac45969958b93199092dc">DeclarationName::CXXDestructorName</a>:</div>
+<div class="line"><a name="l00646"></a><span class="lineno">  646</span>     <span class="keywordflow">if</span> (<span class="keyword">const</span> <a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *Record = dyn_cast<CXXRecordDecl>(DC))</div>
+<div class="line"><a name="l00647"></a><span class="lineno">  647</span>       <span class="keywordflow">if</span> (Record->getDefinition() && Record->needsImplicitDestructor() &&</div>
+<div class="line"><a name="l00648"></a><span class="lineno">  648</span>           <a class="code" href="SemaLookup_8cpp.html#a1b34cb2cdb835df7a4e31f38591a8e6a" title="Determine whether we can declare a special member function within the class at this point...">CanDeclareSpecialMemberFunction</a>(Record))</div>
+<div class="line"><a name="l00649"></a><span class="lineno">  649</span>         S.<a class="code" href="classclang_1_1Sema.html#aff0992915cb3208733b6a450548cb5f5" title="Declare the implicit destructor for the given class.">DeclareImplicitDestructor</a>(const_cast<CXXRecordDecl *>(Record));</div>
+<div class="line"><a name="l00650"></a><span class="lineno">  650</span>     <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l00651"></a><span class="lineno">  651</span> </div>
+<div class="line"><a name="l00652"></a><span class="lineno">  652</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1DeclarationName.html#a9ab322d434446b43379d39e41af5cbe3aa12a1e5dd5f04687d11eaf8ca7924faf">DeclarationName::CXXOperatorName</a>:</div>
+<div class="line"><a name="l00653"></a><span class="lineno">  653</span>     <span class="keywordflow">if</span> (Name.<a class="code" href="classclang_1_1DeclarationName.html#a6c76421a3cdb33248e6ae27ceba55caf">getCXXOverloadedOperator</a>() != OO_Equal)</div>
+<div class="line"><a name="l00654"></a><span class="lineno">  654</span>       <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l00655"></a><span class="lineno">  655</span> </div>
+<div class="line"><a name="l00656"></a><span class="lineno">  656</span>     <span class="keywordflow">if</span> (<span class="keyword">const</span> <a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *Record = dyn_cast<CXXRecordDecl>(DC)) {</div>
+<div class="line"><a name="l00657"></a><span class="lineno">  657</span>       <span class="keywordflow">if</span> (Record->getDefinition() && <a class="code" href="SemaLookup_8cpp.html#a1b34cb2cdb835df7a4e31f38591a8e6a" title="Determine whether we can declare a special member function within the class at this point...">CanDeclareSpecialMemberFunction</a>(Record)) {</div>
+<div class="line"><a name="l00658"></a><span class="lineno">  658</span>         <a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *Class = <span class="keyword">const_cast<</span><a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *<span class="keyword">></span>(Record);</div>
+<div class="line"><a name="l00659"></a><span class="lineno">  659</span>         <span class="keywordflow">if</span> (Record->needsImplicitCopyAssignment())</div>
+<div class="line"><a name="l00660"></a><span class="lineno">  660</span>           S.<a class="code" href="classclang_1_1Sema.html#a98a21e0f7265344d5bd63ab607259465" title="Declare the implicit copy assignment operator for the given class.">DeclareImplicitCopyAssignment</a>(Class);</div>
+<div class="line"><a name="l00661"></a><span class="lineno">  661</span>         <span class="keywordflow">if</span> (S.<a class="code" href="classclang_1_1Sema.html#a5f632d714a520550786bde65d3771228">getLangOpts</a>().CPlusPlus11 &&</div>
+<div class="line"><a name="l00662"></a><span class="lineno">  662</span>             Record->needsImplicitMoveAssignment())</div>
+<div class="line"><a name="l00663"></a><span class="lineno">  663</span>           S.<a class="code" href="classclang_1_1Sema.html#a75744f598af6b7d7f3fe7112538d89f4" title="Declare the implicit move assignment operator for the given class.">DeclareImplicitMoveAssignment</a>(Class);</div>
+<div class="line"><a name="l00664"></a><span class="lineno">  664</span>       }</div>
+<div class="line"><a name="l00665"></a><span class="lineno">  665</span>     }</div>
+<div class="line"><a name="l00666"></a><span class="lineno">  666</span>     <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l00667"></a><span class="lineno">  667</span> </div>
+<div class="line"><a name="l00668"></a><span class="lineno">  668</span>   <span class="keywordflow">default</span>:</div>
+<div class="line"><a name="l00669"></a><span class="lineno">  669</span>     <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l00670"></a><span class="lineno">  670</span>   }</div>
+<div class="line"><a name="l00671"></a><span class="lineno">  671</span> }</div>
+<div class="line"><a name="l00672"></a><span class="lineno">  672</span> </div>
+<div class="line"><a name="l00673"></a><span class="lineno">  673</span> <span class="comment">// Adds all qualifying matches for a name within a decl context to the</span></div>
+<div class="line"><a name="l00674"></a><span class="lineno">  674</span> <span class="comment">// given lookup result.  Returns true if any matches were found.</span></div>
+<div class="line"><a name="l00675"></a><span class="lineno"><a class="code" href="SemaLookup_8cpp.html#a70b03be68c3669d7d3cbbbe57cce89b7">  675</a></span> <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="SemaLookup_8cpp.html#a70b03be68c3669d7d3cbbbe57cce89b7">LookupDirect</a>(<a class="code" href="classclang_1_1Sema.html" title="Sema - This implements semantic analysis and AST building for C.">Sema</a> &S, <a class="code" href="classclang_1_1LookupResult.html" title="Represents the results of name lookup.">LookupResult</a> &R, <span class="keyword">const</span> <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *DC) {</div>
+<div class="line"><a name="l00676"></a><span class="lineno">  676</span>   <span class="keywordtype">bool</span> Found = <span class="keyword">false</span>;</div>
+<div class="line"><a name="l00677"></a><span class="lineno">  677</span> </div>
+<div class="line"><a name="l00678"></a><span class="lineno">  678</span>   <span class="comment">// Lazily declare C++ special member functions.</span></div>
+<div class="line"><a name="l00679"></a><span class="lineno">  679</span>   <span class="keywordflow">if</span> (S.<a class="code" href="classclang_1_1Sema.html#a5f632d714a520550786bde65d3771228">getLangOpts</a>().CPlusPlus)</div>
+<div class="line"><a name="l00680"></a><span class="lineno">  680</span>     <a class="code" href="SemaLookup_8cpp.html#adf1e857b64a4c9b5a1ca2c91b9f0ec0e" title="If there are any implicit member functions with the given name that need to be declared in the given ...">DeclareImplicitMemberFunctionsWithName</a>(S, R.<a class="code" href="classclang_1_1LookupResult.html#a3dd82d154e991b574d70a6a5aba8c61b" title="Gets the name to look up.">getLookupName</a>(), DC);</div>
+<div class="line"><a name="l00681"></a><span class="lineno">  681</span> </div>
+<div class="line"><a name="l00682"></a><span class="lineno">  682</span>   <span class="comment">// Perform lookup into this declaration context.</span></div>
+<div class="line"><a name="l00683"></a><span class="lineno">  683</span>   <a class="code" href="classllvm_1_1ArrayRef.html">DeclContext::lookup_const_result</a> DR = DC-><a class="code" href="classclang_1_1DeclContext.html#a0916b364472e2acc42122885e087222b">lookup</a>(R.<a class="code" href="classclang_1_1LookupResult.html#a3dd82d154e991b574d70a6a5aba8c61b" title="Gets the name to look up.">getLookupName</a>());</div>
+<div class="line"><a name="l00684"></a><span class="lineno">  684</span>   <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1DeclContext.html#aa83c28928182d1434331fe846a2ab628">DeclContext::lookup_const_iterator</a> I = DR.begin(), E = DR.end(); I != E;</div>
+<div class="line"><a name="l00685"></a><span class="lineno">  685</span>        ++I) {</div>
+<div class="line"><a name="l00686"></a><span class="lineno">  686</span>     <a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *D = *I;</div>
+<div class="line"><a name="l00687"></a><span class="lineno">  687</span>     <span class="keywordflow">if</span> ((D = R.<a class="code" href="classclang_1_1LookupResult.html#aaa70a0b9fc7600f4077789afeee34f63" title="Retrieve the accepted (re)declaration of the given declaration, if there is one.">getAcceptableDecl</a>(D))) {</div>
+<div class="line"><a name="l00688"></a><span class="lineno">  688</span>       R.<a class="code" href="classclang_1_1LookupResult.html#a62d3dbd6c56a75cad9685c81817253ac" title="Add a declaration to these results with its natural access. Does not test the acceptance criteria...">addDecl</a>(D);</div>
+<div class="line"><a name="l00689"></a><span class="lineno">  689</span>       Found = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l00690"></a><span class="lineno">  690</span>     }</div>
+<div class="line"><a name="l00691"></a><span class="lineno">  691</span>   }</div>
+<div class="line"><a name="l00692"></a><span class="lineno">  692</span> </div>
+<div class="line"><a name="l00693"></a><span class="lineno">  693</span>   <span class="keywordflow">if</span> (!Found && DC-><a class="code" href="classclang_1_1DeclContext.html#add710d53ebeab05385a08e978862c149">isTranslationUnit</a>() && <a class="code" href="SemaLookup_8cpp.html#a1494a9e94162edb9a43261fcc0f61f85" title="Lookup a builtin function, when name lookup would otherwise fail.">LookupBuiltin</a>(S, R))</div>
+<div class="line"><a name="l00694"></a><span class="lineno">  694</span>     <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
+<div class="line"><a name="l00695"></a><span class="lineno">  695</span> </div>
+<div class="line"><a name="l00696"></a><span class="lineno">  696</span>   <span class="keywordflow">if</span> (R.<a class="code" href="classclang_1_1LookupResult.html#a3dd82d154e991b574d70a6a5aba8c61b" title="Gets the name to look up.">getLookupName</a>().<a class="code" href="classclang_1_1DeclarationName.html#a3e722af81dd4b5670e834b20f47ba94b" title="getNameKind - Determine what kind of name this is.">getNameKind</a>()</div>
+<div class="line"><a name="l00697"></a><span class="lineno">  697</span>         != <a class="code" href="classclang_1_1DeclarationName.html#a9ab322d434446b43379d39e41af5cbe3aecafb8f0bcaa01d99791b0bebf534ac6">DeclarationName::CXXConversionFunctionName</a> ||</div>
+<div class="line"><a name="l00698"></a><span class="lineno">  698</span>       R.<a class="code" href="classclang_1_1LookupResult.html#a3dd82d154e991b574d70a6a5aba8c61b" title="Gets the name to look up.">getLookupName</a>().<a class="code" href="classclang_1_1DeclarationName.html#a23c5ec694c695d34a1a1261705148179">getCXXNameType</a>()-><a class="code" href="classclang_1_1Type.html#a7e475b7859ae970eb837da95e94ab26c">isDependentType</a>() ||</div>
+<div class="line"><a name="l00699"></a><span class="lineno">  699</span>       !isa<CXXRecordDecl>(DC))</div>
+<div class="line"><a name="l00700"></a><span class="lineno">  700</span>     <span class="keywordflow">return</span> Found;</div>
+<div class="line"><a name="l00701"></a><span class="lineno">  701</span> </div>
+<div class="line"><a name="l00702"></a><span class="lineno">  702</span>   <span class="comment">// C++ [temp.mem]p6:</span></div>
+<div class="line"><a name="l00703"></a><span class="lineno">  703</span>   <span class="comment">//   A specialization of a conversion function template is not found by</span></div>
+<div class="line"><a name="l00704"></a><span class="lineno">  704</span>   <span class="comment">//   name lookup. Instead, any conversion function templates visible in the</span></div>
+<div class="line"><a name="l00705"></a><span class="lineno">  705</span>   <span class="comment">//   context of the use are considered. [...]</span></div>
+<div class="line"><a name="l00706"></a><span class="lineno">  706</span>   <span class="keyword">const</span> <a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *Record = cast<CXXRecordDecl>(DC);</div>
+<div class="line"><a name="l00707"></a><span class="lineno">  707</span>   <span class="keywordflow">if</span> (!Record-><a class="code" href="classclang_1_1TagDecl.html#a05518a8ffe57a8add6b7777796c12362">isCompleteDefinition</a>())</div>
+<div class="line"><a name="l00708"></a><span class="lineno">  708</span>     <span class="keywordflow">return</span> Found;</div>
+<div class="line"><a name="l00709"></a><span class="lineno">  709</span> </div>
+<div class="line"><a name="l00710"></a><span class="lineno">  710</span>   <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1UnresolvedSetIterator.html">CXXRecordDecl::conversion_iterator</a> U = Record-><a class="code" href="classclang_1_1CXXRecordDecl.html#a5d131b53d5705d363bff82c68685f9dd">conversion_begin</a>(),</div>
+<div class="line"><a name="l00711"></a><span class="lineno">  711</span>          UEnd = Record-><a class="code" href="classclang_1_1CXXRecordDecl.html#ad498b9edf9506021a0bdd54bac2767ae">conversion_end</a>(); U != UEnd; ++U) {</div>
+<div class="line"><a name="l00712"></a><span class="lineno">  712</span>     <a class="code" href="classclang_1_1FunctionTemplateDecl.html" title="Declaration of a template function.">FunctionTemplateDecl</a> *ConvTemplate = dyn_cast<<a class="code" href="classclang_1_1FunctionTemplateDecl.html" title="Declaration of a template function.">FunctionTemplateDecl</a>>(*U);</div>
+<div class="line"><a name="l00713"></a><span class="lineno">  713</span>     <span class="keywordflow">if</span> (!ConvTemplate)</div>
+<div class="line"><a name="l00714"></a><span class="lineno">  714</span>       <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l00715"></a><span class="lineno">  715</span> </div>
+<div class="line"><a name="l00716"></a><span class="lineno">  716</span>     <span class="comment">// When we're performing lookup for the purposes of redeclaration, just</span></div>
+<div class="line"><a name="l00717"></a><span class="lineno">  717</span>     <span class="comment">// add the conversion function template. When we deduce template</span></div>
+<div class="line"><a name="l00718"></a><span class="lineno">  718</span>     <span class="comment">// arguments for specializations, we'll end up unifying the return</span></div>
+<div class="line"><a name="l00719"></a><span class="lineno">  719</span>     <span class="comment">// type of the new declaration with the type of the function template.</span></div>
+<div class="line"><a name="l00720"></a><span class="lineno">  720</span>     <span class="keywordflow">if</span> (R.<a class="code" href="classclang_1_1LookupResult.html#a5b06ceea23259bb185a7108679564b15" title="True if this lookup is just looking for an existing declaration.">isForRedeclaration</a>()) {</div>
+<div class="line"><a name="l00721"></a><span class="lineno">  721</span>       R.<a class="code" href="classclang_1_1LookupResult.html#a62d3dbd6c56a75cad9685c81817253ac" title="Add a declaration to these results with its natural access. Does not test the acceptance criteria...">addDecl</a>(ConvTemplate);</div>
+<div class="line"><a name="l00722"></a><span class="lineno">  722</span>       Found = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l00723"></a><span class="lineno">  723</span>       <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l00724"></a><span class="lineno">  724</span>     }</div>
+<div class="line"><a name="l00725"></a><span class="lineno">  725</span> </div>
+<div class="line"><a name="l00726"></a><span class="lineno">  726</span>     <span class="comment">// C++ [temp.mem]p6:</span></div>
+<div class="line"><a name="l00727"></a><span class="lineno">  727</span>     <span class="comment">//   [...] For each such operator, if argument deduction succeeds</span></div>
+<div class="line"><a name="l00728"></a><span class="lineno">  728</span>     <span class="comment">//   (14.9.2.3), the resulting specialization is used as if found by</span></div>
+<div class="line"><a name="l00729"></a><span class="lineno">  729</span>     <span class="comment">//   name lookup.</span></div>
+<div class="line"><a name="l00730"></a><span class="lineno">  730</span>     <span class="comment">//</span></div>
+<div class="line"><a name="l00731"></a><span class="lineno">  731</span>     <span class="comment">// When referencing a conversion function for any purpose other than</span></div>
+<div class="line"><a name="l00732"></a><span class="lineno">  732</span>     <span class="comment">// a redeclaration (such that we'll be building an expression with the</span></div>
+<div class="line"><a name="l00733"></a><span class="lineno">  733</span>     <span class="comment">// result), perform template argument deduction and place the</span></div>
+<div class="line"><a name="l00734"></a><span class="lineno">  734</span>     <span class="comment">// specialization into the result set. We do this to avoid forcing all</span></div>
+<div class="line"><a name="l00735"></a><span class="lineno">  735</span>     <span class="comment">// callers to perform special deduction for conversion functions.</span></div>
+<div class="line"><a name="l00736"></a><span class="lineno">  736</span>     <a class="code" href="classclang_1_1sema_1_1TemplateDeductionInfo.html" title="Provides information about an attempted template argument deduction, whose success or failure was des...">TemplateDeductionInfo</a> Info(R.<a class="code" href="classclang_1_1LookupResult.html#af980e0b636ede7d9e0018dff05b0d269">getNameLoc</a>());</div>
+<div class="line"><a name="l00737"></a><span class="lineno">  737</span>     <a class="code" href="classclang_1_1FunctionDecl.html">FunctionDecl</a> *Specialization = 0;</div>
+<div class="line"><a name="l00738"></a><span class="lineno">  738</span> </div>
+<div class="line"><a name="l00739"></a><span class="lineno">  739</span>     <span class="keyword">const</span> <a class="code" href="classclang_1_1FunctionProtoType.html">FunctionProtoType</a> *ConvProto</div>
+<div class="line"><a name="l00740"></a><span class="lineno">  740</span>       = ConvTemplate-><a class="code" href="classclang_1_1FunctionTemplateDecl.html#ad81ffc46ec5f0ff58641b23a787c55e5" title="Get the underlying function declaration of the template.">getTemplatedDecl</a>()-><a class="code" href="classclang_1_1ValueDecl.html#aefa6d3327144aee23d2935f41d993484">getType</a>()-><a class="code" href="classclang_1_1Type.html#a12103ea8bee9506930287bab68a08569">getAs</a><<a class="code" href="classclang_1_1FunctionProtoType.html">FunctionProtoType</a>>();</div>
+<div class="line"><a name="l00741"></a><span class="lineno">  741</span>     assert(ConvProto && <span class="stringliteral">"Nonsensical conversion function template type"</span>);</div>
+<div class="line"><a name="l00742"></a><span class="lineno">  742</span> </div>
+<div class="line"><a name="l00743"></a><span class="lineno">  743</span>     <span class="comment">// Compute the type of the function that we would expect the conversion</span></div>
+<div class="line"><a name="l00744"></a><span class="lineno">  744</span>     <span class="comment">// function to have, if it were to match the name given.</span></div>
+<div class="line"><a name="l00745"></a><span class="lineno">  745</span>     <span class="comment">// FIXME: Calling convention!</span></div>
+<div class="line"><a name="l00746"></a><span class="lineno">  746</span>     <a class="code" href="structclang_1_1FunctionProtoType_1_1ExtProtoInfo.html" title="ExtProtoInfo - Extra information about a function prototype.">FunctionProtoType::ExtProtoInfo</a> EPI = ConvProto-><a class="code" href="classclang_1_1FunctionProtoType.html#ad9dbcc8b1538d72ba9caea5de7c4db84">getExtProtoInfo</a>();</div>
+<div class="line"><a name="l00747"></a><span class="lineno">  747</span>     EPI.<a class="code" href="structclang_1_1FunctionProtoType_1_1ExtProtoInfo.html#af409c3d94eabd1a972dbbd9e95b8b135">ExtInfo</a> = EPI.<a class="code" href="structclang_1_1FunctionProtoType_1_1ExtProtoInfo.html#af409c3d94eabd1a972dbbd9e95b8b135">ExtInfo</a>.<a class="code" href="classclang_1_1FunctionType_1_1ExtInfo.html#a5762eb39dea9398e10f1c4a40b05dc4c">withCallingConv</a>(<a class="code" href="namespaceclang.html#ae6d16e133294b0b9c8c8d3108aadd25ba7a504297547dacad7f909bc7da059378">CC_C</a>);</div>
+<div class="line"><a name="l00748"></a><span class="lineno">  748</span>     EPI.<a class="code" href="structclang_1_1FunctionProtoType_1_1ExtProtoInfo.html#a397c16170f77b96329bf09a9fd0d7bbf">ExceptionSpecType</a> = <a class="code" href="namespaceclang.html#af8a91eed04532d5da41ef08e7c9c081ea8cabd964c552c9a643fd6e57bad90220" title="no exception specification">EST_None</a>;</div>
+<div class="line"><a name="l00749"></a><span class="lineno">  749</span>     EPI.<a class="code" href="structclang_1_1FunctionProtoType_1_1ExtProtoInfo.html#a573e6e3a7b3f29e7e6c790a8a03fc30a">NumExceptions</a> = 0;</div>
+<div class="line"><a name="l00750"></a><span class="lineno">  750</span>     <a class="code" href="classclang_1_1QualType.html">QualType</a> ExpectedType</div>
+<div class="line"><a name="l00751"></a><span class="lineno">  751</span>       = R.<a class="code" href="classclang_1_1LookupResult.html#a9a66340b9004f3dfbd4a8048cf991d42" title="Get the Sema object that this lookup result is searching with.">getSema</a>().<a class="code" href="classclang_1_1Sema.html#a3ccddacb1f4f71b084296175cc9e5b0e">Context</a>.<a class="code" href="classclang_1_1ASTContext.html#ac553ae12dc7460ab3a57381bdf9d74fb" title="Return a normal function type with a typed argument list.">getFunctionType</a>(R.<a class="code" href="classclang_1_1LookupResult.html#a3dd82d154e991b574d70a6a5aba8c61b" title="Gets the name to look up.">getLookupName</a>().<a class="code" href="classclang_1_1DeclarationName.html#a23c5ec694c695d34a1a1261705148179">getCXXNameType</a>(),</div>
+<div class="line"><a name="l00752"></a><span class="lineno">  752</span>                                             None, EPI);</div>
+<div class="line"><a name="l00753"></a><span class="lineno">  753</span> </div>
+<div class="line"><a name="l00754"></a><span class="lineno">  754</span>     <span class="comment">// Perform template argument deduction against the type that we would</span></div>
+<div class="line"><a name="l00755"></a><span class="lineno">  755</span>     <span class="comment">// expect the function to have.</span></div>
+<div class="line"><a name="l00756"></a><span class="lineno">  756</span>     <span class="keywordflow">if</span> (R.<a class="code" href="classclang_1_1LookupResult.html#a9a66340b9004f3dfbd4a8048cf991d42" title="Get the Sema object that this lookup result is searching with.">getSema</a>().<a class="code" href="classclang_1_1Sema.html#a628722d3c517967a0e03ac04f28d53ec" title="Perform template argument deduction to determine whether the given template arguments match the given...">DeduceTemplateArguments</a>(ConvTemplate, 0, ExpectedType,</div>
+<div class="line"><a name="l00757"></a><span class="lineno">  757</span>                                             Specialization, Info)</div>
+<div class="line"><a name="l00758"></a><span class="lineno">  758</span>           == <a class="code" href="classclang_1_1Sema.html#a6eb4b2d9b3e8ff8c0ff75a26f172a7d6a2632cd4c1b1bba16016bc4f6fabd0f91" title="Template argument deduction was successful.">Sema::TDK_Success</a>) {</div>
+<div class="line"><a name="l00759"></a><span class="lineno">  759</span>       R.<a class="code" href="classclang_1_1LookupResult.html#a62d3dbd6c56a75cad9685c81817253ac" title="Add a declaration to these results with its natural access. Does not test the acceptance criteria...">addDecl</a>(Specialization);</div>
+<div class="line"><a name="l00760"></a><span class="lineno">  760</span>       Found = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l00761"></a><span class="lineno">  761</span>     }</div>
+<div class="line"><a name="l00762"></a><span class="lineno">  762</span>   }</div>
+<div class="line"><a name="l00763"></a><span class="lineno">  763</span> </div>
+<div class="line"><a name="l00764"></a><span class="lineno">  764</span>   <span class="keywordflow">return</span> Found;</div>
+<div class="line"><a name="l00765"></a><span class="lineno">  765</span> }</div>
+<div class="line"><a name="l00766"></a><span class="lineno">  766</span> </div>
+<div class="line"><a name="l00767"></a><span class="lineno">  767</span> <span class="comment">// Performs C++ unqualified lookup into the given file context.</span></div>
+<div class="line"><a name="l00768"></a><span class="lineno">  768</span> <span class="keyword">static</span> <span class="keywordtype">bool</span></div>
+<div class="line"><a name="l00769"></a><span class="lineno"><a class="code" href="SemaLookup_8cpp.html#afa8cedec547b628a2e5864a93ed832de">  769</a></span> <a class="code" href="SemaLookup_8cpp.html#afa8cedec547b628a2e5864a93ed832de">CppNamespaceLookup</a>(<a class="code" href="classclang_1_1Sema.html" title="Sema - This implements semantic analysis and AST building for C.">Sema</a> &S, <a class="code" href="classclang_1_1LookupResult.html" title="Represents the results of name lookup.">LookupResult</a> &R, <a class="code" href="classclang_1_1ASTContext.html" title="Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...">ASTContext</a> &<a class="code" href="ASTMatchFinder_8cpp.html#a779280869b9fac47a9bc391e7709171f">Context</a>,</div>
+<div class="line"><a name="l00770"></a><span class="lineno">  770</span>                    <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *NS, UnqualUsingDirectiveSet &UDirs) {</div>
+<div class="line"><a name="l00771"></a><span class="lineno">  771</span> </div>
+<div class="line"><a name="l00772"></a><span class="lineno">  772</span>   assert(NS && NS-><a class="code" href="classclang_1_1DeclContext.html#ac33a346d4e8db5e892aba87393f4e8e4">isFileContext</a>() && <span class="stringliteral">"CppNamespaceLookup() requires namespace!"</span>);</div>
+<div class="line"><a name="l00773"></a><span class="lineno">  773</span> </div>
+<div class="line"><a name="l00774"></a><span class="lineno">  774</span>   <span class="comment">// Perform direct name lookup into the LookupCtx.</span></div>
+<div class="line"><a name="l00775"></a><span class="lineno">  775</span>   <span class="keywordtype">bool</span> Found = <a class="code" href="SemaLookup_8cpp.html#a70b03be68c3669d7d3cbbbe57cce89b7">LookupDirect</a>(S, R, NS);</div>
+<div class="line"><a name="l00776"></a><span class="lineno">  776</span> </div>
+<div class="line"><a name="l00777"></a><span class="lineno">  777</span>   <span class="comment">// Perform direct name lookup into the namespaces nominated by the</span></div>
+<div class="line"><a name="l00778"></a><span class="lineno">  778</span>   <span class="comment">// using directives whose common ancestor is this namespace.</span></div>
+<div class="line"><a name="l00779"></a><span class="lineno">  779</span>   UnqualUsingDirectiveSet::const_iterator UI, UEnd;</div>
+<div class="line"><a name="l00780"></a><span class="lineno">  780</span>   llvm::tie(UI, UEnd) = UDirs.getNamespacesFor(NS);</div>
+<div class="line"><a name="l00781"></a><span class="lineno">  781</span> </div>
+<div class="line"><a name="l00782"></a><span class="lineno">  782</span>   <span class="keywordflow">for</span> (; UI != UEnd; ++UI)</div>
+<div class="line"><a name="l00783"></a><span class="lineno">  783</span>     <span class="keywordflow">if</span> (<a class="code" href="SemaLookup_8cpp.html#a70b03be68c3669d7d3cbbbe57cce89b7">LookupDirect</a>(S, R, UI->getNominatedNamespace()))</div>
+<div class="line"><a name="l00784"></a><span class="lineno">  784</span>       Found = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l00785"></a><span class="lineno">  785</span> </div>
+<div class="line"><a name="l00786"></a><span class="lineno">  786</span>   R.<a class="code" href="classclang_1_1LookupResult.html#a7bca9f6ca6b6a32dca0ac2dfc8568261" title="Resolves the result kind of the lookup, possibly hiding decls.">resolveKind</a>();</div>
+<div class="line"><a name="l00787"></a><span class="lineno">  787</span> </div>
+<div class="line"><a name="l00788"></a><span class="lineno">  788</span>   <span class="keywordflow">return</span> Found;</div>
+<div class="line"><a name="l00789"></a><span class="lineno">  789</span> }</div>
+<div class="line"><a name="l00790"></a><span class="lineno">  790</span> </div>
+<div class="line"><a name="l00791"></a><span class="lineno"><a class="code" href="SemaLookup_8cpp.html#a65d38506c270453f91a02a15477f8f0b">  791</a></span> <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="SemaLookup_8cpp.html#a65d38506c270453f91a02a15477f8f0b">isNamespaceOrTranslationUnitScope</a>(<a class="code" href="classclang_1_1Scope.html">Scope</a> *S) {</div>
+<div class="line"><a name="l00792"></a><span class="lineno">  792</span>   <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *Ctx = S-><a class="code" href="classclang_1_1Scope.html#a0ddcbbc7cb53f7b1f407ef68696b8d37">getEntity</a>())</div>
+<div class="line"><a name="l00793"></a><span class="lineno">  793</span>     <span class="keywordflow">return</span> Ctx-><a class="code" href="classclang_1_1DeclContext.html#ac33a346d4e8db5e892aba87393f4e8e4">isFileContext</a>();</div>
+<div class="line"><a name="l00794"></a><span class="lineno">  794</span>   <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l00795"></a><span class="lineno">  795</span> }</div>
+<div class="line"><a name="l00796"></a><span class="lineno">  796</span> </div>
+<div class="line"><a name="l00797"></a><span class="lineno">  797</span> <span class="comment">// Find the next outer declaration context from this scope. This</span></div>
+<div class="line"><a name="l00798"></a><span class="lineno">  798</span> <span class="comment">// routine actually returns the semantic outer context, which may</span></div>
+<div class="line"><a name="l00799"></a><span class="lineno">  799</span> <span class="comment">// differ from the lexical context (encoded directly in the Scope</span></div>
+<div class="line"><a name="l00800"></a><span class="lineno">  800</span> <span class="comment">// stack) when we are parsing a member of a class template. In this</span></div>
+<div class="line"><a name="l00801"></a><span class="lineno">  801</span> <span class="comment">// case, the second element of the pair will be true, to indicate that</span></div>
+<div class="line"><a name="l00802"></a><span class="lineno">  802</span> <span class="comment">// name lookup should continue searching in this semantic context when</span></div>
+<div class="line"><a name="l00803"></a><span class="lineno">  803</span> <span class="comment">// it leaves the current template parameter scope.</span></div>
+<div class="line"><a name="l00804"></a><span class="lineno"><a class="code" href="SemaLookup_8cpp.html#a50e6e1b149e77014c7011c0352501fc8">  804</a></span> <span class="keyword">static</span> std::pair<DeclContext *, bool> <a class="code" href="SemaLookup_8cpp.html#a50e6e1b149e77014c7011c0352501fc8">findOuterContext</a>(<a class="code" href="classclang_1_1Scope.html">Scope</a> *S) {</div>
+<div class="line"><a name="l00805"></a><span class="lineno">  805</span>   <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *DC = S-><a class="code" href="classclang_1_1Scope.html#a0ddcbbc7cb53f7b1f407ef68696b8d37">getEntity</a>();</div>
+<div class="line"><a name="l00806"></a><span class="lineno">  806</span>   <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *Lexical = 0;</div>
+<div class="line"><a name="l00807"></a><span class="lineno">  807</span>   <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1Scope.html">Scope</a> *OuterS = S-><a class="code" href="classclang_1_1Scope.html#a41a39e012b966ffcb2f05d41f4bdbb4b">getParent</a>(); OuterS;</div>
+<div class="line"><a name="l00808"></a><span class="lineno">  808</span>        OuterS = OuterS-><a class="code" href="classclang_1_1Scope.html#a41a39e012b966ffcb2f05d41f4bdbb4b">getParent</a>()) {</div>
+<div class="line"><a name="l00809"></a><span class="lineno">  809</span>     <span class="keywordflow">if</span> (OuterS->getEntity()) {</div>
+<div class="line"><a name="l00810"></a><span class="lineno">  810</span>       Lexical = OuterS->getEntity();</div>
+<div class="line"><a name="l00811"></a><span class="lineno">  811</span>       <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l00812"></a><span class="lineno">  812</span>     }</div>
+<div class="line"><a name="l00813"></a><span class="lineno">  813</span>   }</div>
+<div class="line"><a name="l00814"></a><span class="lineno">  814</span> </div>
+<div class="line"><a name="l00815"></a><span class="lineno">  815</span>   <span class="comment">// C++ [temp.local]p8:</span></div>
+<div class="line"><a name="l00816"></a><span class="lineno">  816</span>   <span class="comment">//   In the definition of a member of a class template that appears</span></div>
+<div class="line"><a name="l00817"></a><span class="lineno">  817</span>   <span class="comment">//   outside of the namespace containing the class template</span></div>
+<div class="line"><a name="l00818"></a><span class="lineno">  818</span>   <span class="comment">//   definition, the name of a template-parameter hides the name of</span></div>
+<div class="line"><a name="l00819"></a><span class="lineno">  819</span>   <span class="comment">//   a member of this namespace.</span></div>
+<div class="line"><a name="l00820"></a><span class="lineno">  820</span>   <span class="comment">//</span></div>
+<div class="line"><a name="l00821"></a><span class="lineno">  821</span>   <span class="comment">// Example:</span></div>
+<div class="line"><a name="l00822"></a><span class="lineno">  822</span>   <span class="comment">//</span></div>
+<div class="line"><a name="l00823"></a><span class="lineno">  823</span>   <span class="comment">//   namespace N {</span></div>
+<div class="line"><a name="l00824"></a><span class="lineno">  824</span>   <span class="comment">//     class C { };</span></div>
+<div class="line"><a name="l00825"></a><span class="lineno">  825</span>   <span class="comment">//</span></div>
+<div class="line"><a name="l00826"></a><span class="lineno">  826</span>   <span class="comment">//     template<class T> class B {</span></div>
+<div class="line"><a name="l00827"></a><span class="lineno">  827</span>   <span class="comment">//       void f(T);</span></div>
+<div class="line"><a name="l00828"></a><span class="lineno">  828</span>   <span class="comment">//     };</span></div>
+<div class="line"><a name="l00829"></a><span class="lineno">  829</span>   <span class="comment">//   }</span></div>
+<div class="line"><a name="l00830"></a><span class="lineno">  830</span>   <span class="comment">//</span></div>
+<div class="line"><a name="l00831"></a><span class="lineno">  831</span>   <span class="comment">//   template<class C> void N::B<C>::f(C) {</span></div>
+<div class="line"><a name="l00832"></a><span class="lineno">  832</span>   <span class="comment">//     C b;  // C is the template parameter, not N::C</span></div>
+<div class="line"><a name="l00833"></a><span class="lineno">  833</span>   <span class="comment">//   }</span></div>
+<div class="line"><a name="l00834"></a><span class="lineno">  834</span>   <span class="comment">//</span></div>
+<div class="line"><a name="l00835"></a><span class="lineno">  835</span>   <span class="comment">// In this example, the lexical context we return is the</span></div>
+<div class="line"><a name="l00836"></a><span class="lineno">  836</span>   <span class="comment">// TranslationUnit, while the semantic context is the namespace N.</span></div>
+<div class="line"><a name="l00837"></a><span class="lineno">  837</span>   <span class="keywordflow">if</span> (!Lexical || !DC || !S-><a class="code" href="classclang_1_1Scope.html#a41a39e012b966ffcb2f05d41f4bdbb4b">getParent</a>() ||</div>
+<div class="line"><a name="l00838"></a><span class="lineno">  838</span>       !S-><a class="code" href="classclang_1_1Scope.html#a41a39e012b966ffcb2f05d41f4bdbb4b">getParent</a>()-><a class="code" href="classclang_1_1Scope.html#addcf7c6c2b6b49e4c5d25fce5ca94643">isTemplateParamScope</a>())</div>
+<div class="line"><a name="l00839"></a><span class="lineno">  839</span>     <span class="keywordflow">return</span> std::make_pair(Lexical, <span class="keyword">false</span>);</div>
+<div class="line"><a name="l00840"></a><span class="lineno">  840</span> </div>
+<div class="line"><a name="l00841"></a><span class="lineno">  841</span>   <span class="comment">// Find the outermost template parameter scope.</span></div>
+<div class="line"><a name="l00842"></a><span class="lineno">  842</span>   <span class="comment">// For the example, this is the scope for the template parameters of</span></div>
+<div class="line"><a name="l00843"></a><span class="lineno">  843</span>   <span class="comment">// template<class C>.</span></div>
+<div class="line"><a name="l00844"></a><span class="lineno">  844</span>   <a class="code" href="classclang_1_1Scope.html">Scope</a> *OutermostTemplateScope = S-><a class="code" href="classclang_1_1Scope.html#a41a39e012b966ffcb2f05d41f4bdbb4b">getParent</a>();</div>
+<div class="line"><a name="l00845"></a><span class="lineno">  845</span>   <span class="keywordflow">while</span> (OutermostTemplateScope-><a class="code" href="classclang_1_1Scope.html#a41a39e012b966ffcb2f05d41f4bdbb4b">getParent</a>() &&</div>
+<div class="line"><a name="l00846"></a><span class="lineno">  846</span>          OutermostTemplateScope-><a class="code" href="classclang_1_1Scope.html#a41a39e012b966ffcb2f05d41f4bdbb4b">getParent</a>()-><a class="code" href="classclang_1_1Scope.html#addcf7c6c2b6b49e4c5d25fce5ca94643">isTemplateParamScope</a>())</div>
+<div class="line"><a name="l00847"></a><span class="lineno">  847</span>     OutermostTemplateScope = OutermostTemplateScope-><a class="code" href="classclang_1_1Scope.html#a41a39e012b966ffcb2f05d41f4bdbb4b">getParent</a>();</div>
+<div class="line"><a name="l00848"></a><span class="lineno">  848</span> </div>
+<div class="line"><a name="l00849"></a><span class="lineno">  849</span>   <span class="comment">// Find the namespace context in which the original scope occurs. In</span></div>
+<div class="line"><a name="l00850"></a><span class="lineno">  850</span>   <span class="comment">// the example, this is namespace N.</span></div>
+<div class="line"><a name="l00851"></a><span class="lineno">  851</span>   <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *Semantic = DC;</div>
+<div class="line"><a name="l00852"></a><span class="lineno">  852</span>   <span class="keywordflow">while</span> (!Semantic-><a class="code" href="classclang_1_1DeclContext.html#ac33a346d4e8db5e892aba87393f4e8e4">isFileContext</a>())</div>
+<div class="line"><a name="l00853"></a><span class="lineno">  853</span>     Semantic = Semantic-><a class="code" href="classclang_1_1DeclContext.html#a31c99b38017e8d702fda9c0f1d021186" title="getParent - Returns the containing DeclContext.">getParent</a>();</div>
+<div class="line"><a name="l00854"></a><span class="lineno">  854</span> </div>
+<div class="line"><a name="l00855"></a><span class="lineno">  855</span>   <span class="comment">// Find the declaration context just outside of the template</span></div>
+<div class="line"><a name="l00856"></a><span class="lineno">  856</span>   <span class="comment">// parameter scope. This is the context in which the template is</span></div>
+<div class="line"><a name="l00857"></a><span class="lineno">  857</span>   <span class="comment">// being lexically declaration (a namespace context). In the</span></div>
+<div class="line"><a name="l00858"></a><span class="lineno">  858</span>   <span class="comment">// example, this is the global scope.</span></div>
+<div class="line"><a name="l00859"></a><span class="lineno">  859</span>   <span class="keywordflow">if</span> (Lexical-><a class="code" href="classclang_1_1DeclContext.html#ac33a346d4e8db5e892aba87393f4e8e4">isFileContext</a>() && !Lexical-><a class="code" href="classclang_1_1DeclContext.html#ab26c189165e15c46df7e4c734da0b0b8" title="Determine whether this declaration context is equivalent to the declaration context DC...">Equals</a>(Semantic) &&</div>
+<div class="line"><a name="l00860"></a><span class="lineno">  860</span>       Lexical-><a class="code" href="classclang_1_1DeclContext.html#ac573b7eaf4f3177d1378df80e557160d" title="Determine whether this declaration context encloses the declaration context DC.">Encloses</a>(Semantic))</div>
+<div class="line"><a name="l00861"></a><span class="lineno">  861</span>     <span class="keywordflow">return</span> std::make_pair(Semantic, <span class="keyword">true</span>);</div>
+<div class="line"><a name="l00862"></a><span class="lineno">  862</span> </div>
+<div class="line"><a name="l00863"></a><span class="lineno">  863</span>   <span class="keywordflow">return</span> std::make_pair(Lexical, <span class="keyword">false</span>);</div>
+<div class="line"><a name="l00864"></a><span class="lineno">  864</span> }</div>
+<div class="line"><a name="l00865"></a><span class="lineno">  865</span> </div>
+<div class="line"><a name="l00866"></a><span class="lineno">  866</span> <span class="keyword">namespace </span>{<span class="comment"></span></div>
+<div class="line"><a name="l00867"></a><span class="lineno">  867</span> <span class="comment">/// An RAII object to specify that we want to find block scope extern</span></div>
+<div class="line"><a name="l00868"></a><span class="lineno">  868</span> <span class="comment">/// declarations.</span></div>
+<div class="line"><a name="l00869"></a><span class="lineno">  869</span> <span class="comment"></span><span class="keyword">struct </span>FindLocalExternScope {</div>
+<div class="line"><a name="l00870"></a><span class="lineno">  870</span>   FindLocalExternScope(<a class="code" href="classclang_1_1LookupResult.html" title="Represents the results of name lookup.">LookupResult</a> &R)</div>
+<div class="line"><a name="l00871"></a><span class="lineno">  871</span>       : R(R), OldFindLocalExtern(R.getIdentifierNamespace() &</div>
+<div class="line"><a name="l00872"></a><span class="lineno">  872</span>                                  <a class="code" href="classclang_1_1Decl.html">Decl</a>::IDNS_LocalExtern) {</div>
+<div class="line"><a name="l00873"></a><span class="lineno">  873</span>     R.<a class="code" href="classclang_1_1LookupResult.html#a44649d39205258b80f0814668e100726">setFindLocalExtern</a>(R.<a class="code" href="classclang_1_1LookupResult.html#a0cbcf0386efd9564423569c6215c7aa6" title="Returns the identifier namespace mask for this lookup.">getIdentifierNamespace</a>() & <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710a404c48f346be24fe30ae9bb910177a34">Decl::IDNS_Ordinary</a>);</div>
+<div class="line"><a name="l00874"></a><span class="lineno">  874</span>   }</div>
+<div class="line"><a name="l00875"></a><span class="lineno">  875</span>   <span class="keywordtype">void</span> restore() {</div>
+<div class="line"><a name="l00876"></a><span class="lineno">  876</span>     R.<a class="code" href="classclang_1_1LookupResult.html#a44649d39205258b80f0814668e100726">setFindLocalExtern</a>(OldFindLocalExtern);</div>
+<div class="line"><a name="l00877"></a><span class="lineno">  877</span>   }</div>
+<div class="line"><a name="l00878"></a><span class="lineno">  878</span>   ~FindLocalExternScope() {</div>
+<div class="line"><a name="l00879"></a><span class="lineno">  879</span>     restore();</div>
+<div class="line"><a name="l00880"></a><span class="lineno">  880</span>   }</div>
+<div class="line"><a name="l00881"></a><span class="lineno">  881</span>   <a class="code" href="classclang_1_1LookupResult.html" title="Represents the results of name lookup.">LookupResult</a> &R;</div>
+<div class="line"><a name="l00882"></a><span class="lineno">  882</span>   <span class="keywordtype">bool</span> OldFindLocalExtern;</div>
+<div class="line"><a name="l00883"></a><span class="lineno">  883</span> };</div>
+<div class="line"><a name="l00884"></a><span class="lineno">  884</span> }</div>
+<div class="line"><a name="l00885"></a><span class="lineno">  885</span> </div>
+<div class="line"><a name="l00886"></a><span class="lineno">  886</span> <span class="keywordtype">bool</span> Sema::CppLookupName(<a class="code" href="classclang_1_1LookupResult.html" title="Represents the results of name lookup.">LookupResult</a> &R, <a class="code" href="classclang_1_1Scope.html">Scope</a> *S) {</div>
+<div class="line"><a name="l00887"></a><span class="lineno">  887</span>   assert(getLangOpts().<a class="code" href="namespaceclang_1_1frontend.html#a09dfa01c4e997a3794d80922c5e853bbaf89a7ac6211aecefb5f7ecc17d3ebed4">CPlusPlus</a> && <span class="stringliteral">"Can perform only C++ lookup"</span>);</div>
+<div class="line"><a name="l00888"></a><span class="lineno">  888</span> </div>
+<div class="line"><a name="l00889"></a><span class="lineno">  889</span>   <a class="code" href="classclang_1_1DeclarationName.html">DeclarationName</a> Name = R.<a class="code" href="classclang_1_1LookupResult.html#a3dd82d154e991b574d70a6a5aba8c61b" title="Gets the name to look up.">getLookupName</a>();</div>
+<div class="line"><a name="l00890"></a><span class="lineno">  890</span>   <a class="code" href="classclang_1_1Sema.html#a0c6e994c44767e74e2892aa0235efb1a" title="Describes the kind of name lookup to perform.">Sema::LookupNameKind</a> NameKind = R.<a class="code" href="classclang_1_1LookupResult.html#a915bb2f2bfa4bd99bf3d546e6568003f" title="Gets the kind of lookup to perform.">getLookupKind</a>();</div>
+<div class="line"><a name="l00891"></a><span class="lineno">  891</span> </div>
+<div class="line"><a name="l00892"></a><span class="lineno">  892</span>   <span class="comment">// If this is the name of an implicitly-declared special member function,</span></div>
+<div class="line"><a name="l00893"></a><span class="lineno">  893</span>   <span class="comment">// go through the scope stack to implicitly declare</span></div>
+<div class="line"><a name="l00894"></a><span class="lineno">  894</span>   <span class="keywordflow">if</span> (<a class="code" href="SemaLookup_8cpp.html#a9b4b0f89d5707d0a72c5fb6bc3ef366e" title="Determine whether this is the name of an implicitly-declared special member function.">isImplicitlyDeclaredMemberFunctionName</a>(Name)) {</div>
+<div class="line"><a name="l00895"></a><span class="lineno">  895</span>     <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1Scope.html">Scope</a> *PreS = S; PreS; PreS = PreS-><a class="code" href="classclang_1_1Scope.html#a41a39e012b966ffcb2f05d41f4bdbb4b">getParent</a>())</div>
+<div class="line"><a name="l00896"></a><span class="lineno">  896</span>       <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *DC = PreS->getEntity())</div>
+<div class="line"><a name="l00897"></a><span class="lineno">  897</span>         <a class="code" href="SemaLookup_8cpp.html#adf1e857b64a4c9b5a1ca2c91b9f0ec0e" title="If there are any implicit member functions with the given name that need to be declared in the given ...">DeclareImplicitMemberFunctionsWithName</a>(*<span class="keyword">this</span>, Name, DC);</div>
+<div class="line"><a name="l00898"></a><span class="lineno">  898</span>   }</div>
+<div class="line"><a name="l00899"></a><span class="lineno">  899</span> </div>
+<div class="line"><a name="l00900"></a><span class="lineno">  900</span>   <span class="comment">// Implicitly declare member functions with the name we're looking for, if in</span></div>
+<div class="line"><a name="l00901"></a><span class="lineno">  901</span>   <span class="comment">// fact we are in a scope where it matters.</span></div>
+<div class="line"><a name="l00902"></a><span class="lineno">  902</span> </div>
+<div class="line"><a name="l00903"></a><span class="lineno">  903</span>   <a class="code" href="classclang_1_1Scope.html">Scope</a> *Initial = <a class="code" href="AnalysisBasedWarnings_8cpp.html#a33dc45a03958a0bf07b5da2dec4db648">S</a>;</div>
+<div class="line"><a name="l00904"></a><span class="lineno">  904</span>   <a class="code" href="classclang_1_1IdentifierResolver_1_1iterator.html">IdentifierResolver::iterator</a></div>
+<div class="line"><a name="l00905"></a><span class="lineno">  905</span>     I = IdResolver.begin(Name),</div>
+<div class="line"><a name="l00906"></a><span class="lineno">  906</span>     IEnd = IdResolver.end();</div>
+<div class="line"><a name="l00907"></a><span class="lineno">  907</span> </div>
+<div class="line"><a name="l00908"></a><span class="lineno">  908</span>   <span class="comment">// First we lookup local scope.</span></div>
+<div class="line"><a name="l00909"></a><span class="lineno">  909</span>   <span class="comment">// We don't consider using-directives, as per 7.3.4.p1 [namespace.udir]</span></div>
+<div class="line"><a name="l00910"></a><span class="lineno">  910</span>   <span class="comment">// ...During unqualified name lookup (3.4.1), the names appear as if</span></div>
+<div class="line"><a name="l00911"></a><span class="lineno">  911</span>   <span class="comment">// they were declared in the nearest enclosing namespace which contains</span></div>
+<div class="line"><a name="l00912"></a><span class="lineno">  912</span>   <span class="comment">// both the using-directive and the nominated namespace.</span></div>
+<div class="line"><a name="l00913"></a><span class="lineno">  913</span>   <span class="comment">// [Note: in this context, "contains" means "contains directly or</span></div>
+<div class="line"><a name="l00914"></a><span class="lineno">  914</span>   <span class="comment">// indirectly".</span></div>
+<div class="line"><a name="l00915"></a><span class="lineno">  915</span>   <span class="comment">//</span></div>
+<div class="line"><a name="l00916"></a><span class="lineno">  916</span>   <span class="comment">// For example:</span></div>
+<div class="line"><a name="l00917"></a><span class="lineno">  917</span>   <span class="comment">// namespace A { int i; }</span></div>
+<div class="line"><a name="l00918"></a><span class="lineno">  918</span>   <span class="comment">// void foo() {</span></div>
+<div class="line"><a name="l00919"></a><span class="lineno">  919</span>   <span class="comment">//   int i;</span></div>
+<div class="line"><a name="l00920"></a><span class="lineno">  920</span>   <span class="comment">//   {</span></div>
+<div class="line"><a name="l00921"></a><span class="lineno">  921</span>   <span class="comment">//     using namespace A;</span></div>
+<div class="line"><a name="l00922"></a><span class="lineno">  922</span>   <span class="comment">//     ++i; // finds local 'i', A::i appears at global scope</span></div>
+<div class="line"><a name="l00923"></a><span class="lineno">  923</span>   <span class="comment">//   }</span></div>
+<div class="line"><a name="l00924"></a><span class="lineno">  924</span>   <span class="comment">// }</span></div>
+<div class="line"><a name="l00925"></a><span class="lineno">  925</span>   <span class="comment">//</span></div>
+<div class="line"><a name="l00926"></a><span class="lineno">  926</span>   UnqualUsingDirectiveSet UDirs;</div>
+<div class="line"><a name="l00927"></a><span class="lineno">  927</span>   <span class="keywordtype">bool</span> VisitedUsingDirectives = <span class="keyword">false</span>;</div>
+<div class="line"><a name="l00928"></a><span class="lineno">  928</span>   <span class="keywordtype">bool</span> LeftStartingScope = <span class="keyword">false</span>;</div>
+<div class="line"><a name="l00929"></a><span class="lineno">  929</span>   <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *OutsideOfTemplateParamDC = 0;</div>
+<div class="line"><a name="l00930"></a><span class="lineno">  930</span> </div>
+<div class="line"><a name="l00931"></a><span class="lineno">  931</span>   <span class="comment">// When performing a scope lookup, we want to find local extern decls.</span></div>
+<div class="line"><a name="l00932"></a><span class="lineno">  932</span>   FindLocalExternScope FindLocals(R);</div>
+<div class="line"><a name="l00933"></a><span class="lineno">  933</span> </div>
+<div class="line"><a name="l00934"></a><span class="lineno">  934</span>   <span class="keywordflow">for</span> (; S && !<a class="code" href="SemaLookup_8cpp.html#a65d38506c270453f91a02a15477f8f0b">isNamespaceOrTranslationUnitScope</a>(S); S = S-><a class="code" href="classclang_1_1Scope.html#a41a39e012b966ffcb2f05d41f4bdbb4b">getParent</a>()) {</div>
+<div class="line"><a name="l00935"></a><span class="lineno">  935</span>     <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *Ctx = S-><a class="code" href="classclang_1_1Scope.html#a0ddcbbc7cb53f7b1f407ef68696b8d37">getEntity</a>();</div>
+<div class="line"><a name="l00936"></a><span class="lineno">  936</span> </div>
+<div class="line"><a name="l00937"></a><span class="lineno">  937</span>     <span class="comment">// Check whether the IdResolver has anything in this scope.</span></div>
+<div class="line"><a name="l00938"></a><span class="lineno">  938</span>     <span class="keywordtype">bool</span> Found = <span class="keyword">false</span>;</div>
+<div class="line"><a name="l00939"></a><span class="lineno">  939</span>     <span class="keywordflow">for</span> (; I != IEnd && S-><a class="code" href="classclang_1_1Scope.html#a704908bfa8ade9ea0ff027f1c45b0e12">isDeclScope</a>(*I); ++I) {</div>
+<div class="line"><a name="l00940"></a><span class="lineno">  940</span>       <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *ND = R.<a class="code" href="classclang_1_1LookupResult.html#aaa70a0b9fc7600f4077789afeee34f63" title="Retrieve the accepted (re)declaration of the given declaration, if there is one.">getAcceptableDecl</a>(*I)) {</div>
+<div class="line"><a name="l00941"></a><span class="lineno">  941</span>         <span class="keywordflow">if</span> (NameKind == LookupRedeclarationWithLinkage) {</div>
+<div class="line"><a name="l00942"></a><span class="lineno">  942</span>           <span class="comment">// Determine whether this (or a previous) declaration is</span></div>
+<div class="line"><a name="l00943"></a><span class="lineno">  943</span>           <span class="comment">// out-of-scope.</span></div>
+<div class="line"><a name="l00944"></a><span class="lineno">  944</span>           <span class="keywordflow">if</span> (!LeftStartingScope && !Initial-><a class="code" href="classclang_1_1Scope.html#a704908bfa8ade9ea0ff027f1c45b0e12">isDeclScope</a>(*I))</div>
+<div class="line"><a name="l00945"></a><span class="lineno">  945</span>             LeftStartingScope = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l00946"></a><span class="lineno">  946</span> </div>
+<div class="line"><a name="l00947"></a><span class="lineno">  947</span>           <span class="comment">// If we found something outside of our starting scope that</span></div>
+<div class="line"><a name="l00948"></a><span class="lineno">  948</span>           <span class="comment">// does not have linkage, skip it. If it's a template parameter,</span></div>
+<div class="line"><a name="l00949"></a><span class="lineno">  949</span>           <span class="comment">// we still find it, so we can diagnose the invalid redeclaration.</span></div>
+<div class="line"><a name="l00950"></a><span class="lineno">  950</span>           <span class="keywordflow">if</span> (LeftStartingScope && !((*I)->hasLinkage()) &&</div>
+<div class="line"><a name="l00951"></a><span class="lineno">  951</span>               !(*I)->isTemplateParameter()) {</div>
+<div class="line"><a name="l00952"></a><span class="lineno">  952</span>             R.<a class="code" href="classclang_1_1LookupResult.html#a2104cde63433a546cf8a53ffb38cc179" title="Note that we found and ignored a declaration while performing lookup.">setShadowed</a>();</div>
+<div class="line"><a name="l00953"></a><span class="lineno">  953</span>             <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l00954"></a><span class="lineno">  954</span>           }</div>
+<div class="line"><a name="l00955"></a><span class="lineno">  955</span>         }</div>
+<div class="line"><a name="l00956"></a><span class="lineno">  956</span> </div>
+<div class="line"><a name="l00957"></a><span class="lineno">  957</span>         Found = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l00958"></a><span class="lineno">  958</span>         R.<a class="code" href="classclang_1_1LookupResult.html#a62d3dbd6c56a75cad9685c81817253ac" title="Add a declaration to these results with its natural access. Does not test the acceptance criteria...">addDecl</a>(ND);</div>
+<div class="line"><a name="l00959"></a><span class="lineno">  959</span>       }</div>
+<div class="line"><a name="l00960"></a><span class="lineno">  960</span>     }</div>
+<div class="line"><a name="l00961"></a><span class="lineno">  961</span>     <span class="keywordflow">if</span> (Found) {</div>
+<div class="line"><a name="l00962"></a><span class="lineno">  962</span>       R.<a class="code" href="classclang_1_1LookupResult.html#a7bca9f6ca6b6a32dca0ac2dfc8568261" title="Resolves the result kind of the lookup, possibly hiding decls.">resolveKind</a>();</div>
+<div class="line"><a name="l00963"></a><span class="lineno">  963</span>       <span class="keywordflow">if</span> (S-><a class="code" href="classclang_1_1Scope.html#a94ff605b34f12a1f27a6286a3f13149b" title="isClassScope - Return true if this scope is a class/struct/union scope.">isClassScope</a>())</div>
+<div class="line"><a name="l00964"></a><span class="lineno">  964</span>         <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *Record = dyn_cast_or_null<CXXRecordDecl>(Ctx))</div>
+<div class="line"><a name="l00965"></a><span class="lineno">  965</span>           R.<a class="code" href="classclang_1_1LookupResult.html#ad1d4eafe95062716cb844784976df165" title="Sets the 'naming class' for this lookup.">setNamingClass</a>(Record);</div>
+<div class="line"><a name="l00966"></a><span class="lineno">  966</span>       <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
+<div class="line"><a name="l00967"></a><span class="lineno">  967</span>     }</div>
+<div class="line"><a name="l00968"></a><span class="lineno">  968</span> </div>
+<div class="line"><a name="l00969"></a><span class="lineno">  969</span>     <span class="keywordflow">if</span> (NameKind == LookupLocalFriendName && !S-><a class="code" href="classclang_1_1Scope.html#a94ff605b34f12a1f27a6286a3f13149b" title="isClassScope - Return true if this scope is a class/struct/union scope.">isClassScope</a>()) {</div>
+<div class="line"><a name="l00970"></a><span class="lineno">  970</span>       <span class="comment">// C++11 [class.friend]p11:</span></div>
+<div class="line"><a name="l00971"></a><span class="lineno">  971</span>       <span class="comment">//   If a friend declaration appears in a local class and the name</span></div>
+<div class="line"><a name="l00972"></a><span class="lineno">  972</span>       <span class="comment">//   specified is an unqualified name, a prior declaration is</span></div>
+<div class="line"><a name="l00973"></a><span class="lineno">  973</span>       <span class="comment">//   looked up without considering scopes that are outside the</span></div>
+<div class="line"><a name="l00974"></a><span class="lineno">  974</span>       <span class="comment">//   innermost enclosing non-class scope.</span></div>
+<div class="line"><a name="l00975"></a><span class="lineno">  975</span>       <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l00976"></a><span class="lineno">  976</span>     }</div>
+<div class="line"><a name="l00977"></a><span class="lineno">  977</span> </div>
+<div class="line"><a name="l00978"></a><span class="lineno">  978</span>     <span class="keywordflow">if</span> (!Ctx && S-><a class="code" href="classclang_1_1Scope.html#addcf7c6c2b6b49e4c5d25fce5ca94643">isTemplateParamScope</a>() && OutsideOfTemplateParamDC &&</div>
+<div class="line"><a name="l00979"></a><span class="lineno">  979</span>         S-><a class="code" href="classclang_1_1Scope.html#a41a39e012b966ffcb2f05d41f4bdbb4b">getParent</a>() && !S-><a class="code" href="classclang_1_1Scope.html#a41a39e012b966ffcb2f05d41f4bdbb4b">getParent</a>()-><a class="code" href="classclang_1_1Scope.html#addcf7c6c2b6b49e4c5d25fce5ca94643">isTemplateParamScope</a>()) {</div>
+<div class="line"><a name="l00980"></a><span class="lineno">  980</span>       <span class="comment">// We've just searched the last template parameter scope and</span></div>
+<div class="line"><a name="l00981"></a><span class="lineno">  981</span>       <span class="comment">// found nothing, so look into the contexts between the</span></div>
+<div class="line"><a name="l00982"></a><span class="lineno">  982</span>       <span class="comment">// lexical and semantic declaration contexts returned by</span></div>
+<div class="line"><a name="l00983"></a><span class="lineno">  983</span>       <span class="comment">// findOuterContext(). This implements the name lookup behavior</span></div>
+<div class="line"><a name="l00984"></a><span class="lineno">  984</span>       <span class="comment">// of C++ [temp.local]p8.</span></div>
+<div class="line"><a name="l00985"></a><span class="lineno">  985</span>       Ctx = OutsideOfTemplateParamDC;</div>
+<div class="line"><a name="l00986"></a><span class="lineno">  986</span>       OutsideOfTemplateParamDC = 0;</div>
+<div class="line"><a name="l00987"></a><span class="lineno">  987</span>     }</div>
+<div class="line"><a name="l00988"></a><span class="lineno">  988</span> </div>
+<div class="line"><a name="l00989"></a><span class="lineno">  989</span>     <span class="keywordflow">if</span> (Ctx) {</div>
+<div class="line"><a name="l00990"></a><span class="lineno">  990</span>       <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *OuterCtx;</div>
+<div class="line"><a name="l00991"></a><span class="lineno">  991</span>       <span class="keywordtype">bool</span> SearchAfterTemplateScope;</div>
+<div class="line"><a name="l00992"></a><span class="lineno">  992</span>       llvm::tie(OuterCtx, SearchAfterTemplateScope) = <a class="code" href="SemaLookup_8cpp.html#a50e6e1b149e77014c7011c0352501fc8">findOuterContext</a>(S);</div>
+<div class="line"><a name="l00993"></a><span class="lineno">  993</span>       <span class="keywordflow">if</span> (SearchAfterTemplateScope)</div>
+<div class="line"><a name="l00994"></a><span class="lineno">  994</span>         OutsideOfTemplateParamDC = OuterCtx;</div>
+<div class="line"><a name="l00995"></a><span class="lineno">  995</span> </div>
+<div class="line"><a name="l00996"></a><span class="lineno">  996</span>       <span class="keywordflow">for</span> (; Ctx && !Ctx-><a class="code" href="classclang_1_1DeclContext.html#ab26c189165e15c46df7e4c734da0b0b8" title="Determine whether this declaration context is equivalent to the declaration context DC...">Equals</a>(OuterCtx); Ctx = Ctx-><a class="code" href="classclang_1_1DeclContext.html#ad3f371a23f2b8f92275ef63817701e4e" title="Find the parent context of this context that will be used for unqualified name lookup.">getLookupParent</a>()) {</div>
+<div class="line"><a name="l00997"></a><span class="lineno">  997</span>         <span class="comment">// We do not directly look into transparent contexts, since</span></div>
+<div class="line"><a name="l00998"></a><span class="lineno">  998</span>         <span class="comment">// those entities will be found in the nearest enclosing</span></div>
+<div class="line"><a name="l00999"></a><span class="lineno">  999</span>         <span class="comment">// non-transparent context.</span></div>
+<div class="line"><a name="l01000"></a><span class="lineno"> 1000</span>         <span class="keywordflow">if</span> (Ctx-><a class="code" href="classclang_1_1DeclContext.html#abbf5a92a55d4faa4150ee8fd46a60345">isTransparentContext</a>())</div>
+<div class="line"><a name="l01001"></a><span class="lineno"> 1001</span>           <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l01002"></a><span class="lineno"> 1002</span> </div>
+<div class="line"><a name="l01003"></a><span class="lineno"> 1003</span>         <span class="comment">// We do not look directly into function or method contexts,</span></div>
+<div class="line"><a name="l01004"></a><span class="lineno"> 1004</span>         <span class="comment">// since all of the local variables and parameters of the</span></div>
+<div class="line"><a name="l01005"></a><span class="lineno"> 1005</span>         <span class="comment">// function/method are present within the Scope.</span></div>
+<div class="line"><a name="l01006"></a><span class="lineno"> 1006</span>         <span class="keywordflow">if</span> (Ctx-><a class="code" href="classclang_1_1DeclContext.html#a05b966b6459e1d11c317f8abe3e2d66f">isFunctionOrMethod</a>()) {</div>
+<div class="line"><a name="l01007"></a><span class="lineno"> 1007</span>           <span class="comment">// If we have an Objective-C instance method, look for ivars</span></div>
+<div class="line"><a name="l01008"></a><span class="lineno"> 1008</span>           <span class="comment">// in the corresponding interface.</span></div>
+<div class="line"><a name="l01009"></a><span class="lineno"> 1009</span>           <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1ObjCMethodDecl.html">ObjCMethodDecl</a> *Method = dyn_cast<ObjCMethodDecl>(Ctx)) {</div>
+<div class="line"><a name="l01010"></a><span class="lineno"> 1010</span>             <span class="keywordflow">if</span> (Method->isInstanceMethod() && Name.<a class="code" href="classclang_1_1DeclarationName.html#a1ac2d6e470af6bb6313c390760a1e155">getAsIdentifierInfo</a>())</div>
+<div class="line"><a name="l01011"></a><span class="lineno"> 1011</span>               <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1ObjCInterfaceDecl.html" title="Represents an ObjC class declaration.">ObjCInterfaceDecl</a> *Class = Method->getClassInterface()) {</div>
+<div class="line"><a name="l01012"></a><span class="lineno"> 1012</span>                 <a class="code" href="classclang_1_1ObjCInterfaceDecl.html" title="Represents an ObjC class declaration.">ObjCInterfaceDecl</a> *ClassDeclared;</div>
+<div class="line"><a name="l01013"></a><span class="lineno"> 1013</span>                 <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1ObjCIvarDecl.html">ObjCIvarDecl</a> *Ivar = Class->lookupInstanceVariable(</div>
+<div class="line"><a name="l01014"></a><span class="lineno"> 1014</span>                                                  Name.<a class="code" href="classclang_1_1DeclarationName.html#a1ac2d6e470af6bb6313c390760a1e155">getAsIdentifierInfo</a>(),</div>
+<div class="line"><a name="l01015"></a><span class="lineno"> 1015</span>                                                              ClassDeclared)) {</div>
+<div class="line"><a name="l01016"></a><span class="lineno"> 1016</span>                   <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *ND = R.<a class="code" href="classclang_1_1LookupResult.html#aaa70a0b9fc7600f4077789afeee34f63" title="Retrieve the accepted (re)declaration of the given declaration, if there is one.">getAcceptableDecl</a>(Ivar)) {</div>
+<div class="line"><a name="l01017"></a><span class="lineno"> 1017</span>                     R.<a class="code" href="classclang_1_1LookupResult.html#a62d3dbd6c56a75cad9685c81817253ac" title="Add a declaration to these results with its natural access. Does not test the acceptance criteria...">addDecl</a>(ND);</div>
+<div class="line"><a name="l01018"></a><span class="lineno"> 1018</span>                     R.<a class="code" href="classclang_1_1LookupResult.html#a7bca9f6ca6b6a32dca0ac2dfc8568261" title="Resolves the result kind of the lookup, possibly hiding decls.">resolveKind</a>();</div>
+<div class="line"><a name="l01019"></a><span class="lineno"> 1019</span>                     <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
+<div class="line"><a name="l01020"></a><span class="lineno"> 1020</span>                   }</div>
+<div class="line"><a name="l01021"></a><span class="lineno"> 1021</span>                 }</div>
+<div class="line"><a name="l01022"></a><span class="lineno"> 1022</span>               }</div>
+<div class="line"><a name="l01023"></a><span class="lineno"> 1023</span>           }</div>
+<div class="line"><a name="l01024"></a><span class="lineno"> 1024</span> </div>
+<div class="line"><a name="l01025"></a><span class="lineno"> 1025</span>           <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l01026"></a><span class="lineno"> 1026</span>         }</div>
+<div class="line"><a name="l01027"></a><span class="lineno"> 1027</span> </div>
+<div class="line"><a name="l01028"></a><span class="lineno"> 1028</span>         <span class="comment">// If this is a file context, we need to perform unqualified name</span></div>
+<div class="line"><a name="l01029"></a><span class="lineno"> 1029</span>         <span class="comment">// lookup considering using directives.</span></div>
+<div class="line"><a name="l01030"></a><span class="lineno"> 1030</span>         <span class="keywordflow">if</span> (Ctx-><a class="code" href="classclang_1_1DeclContext.html#ac33a346d4e8db5e892aba87393f4e8e4">isFileContext</a>()) {</div>
+<div class="line"><a name="l01031"></a><span class="lineno"> 1031</span>           <span class="comment">// If we haven't handled using directives yet, do so now.</span></div>
+<div class="line"><a name="l01032"></a><span class="lineno"> 1032</span>           <span class="keywordflow">if</span> (!VisitedUsingDirectives) {</div>
+<div class="line"><a name="l01033"></a><span class="lineno"> 1033</span>             <span class="comment">// Add using directives from this context up to the top level.</span></div>
+<div class="line"><a name="l01034"></a><span class="lineno"> 1034</span>             <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *UCtx = Ctx; UCtx; UCtx = UCtx-><a class="code" href="classclang_1_1DeclContext.html#a31c99b38017e8d702fda9c0f1d021186" title="getParent - Returns the containing DeclContext.">getParent</a>()) {</div>
+<div class="line"><a name="l01035"></a><span class="lineno"> 1035</span>               <span class="keywordflow">if</span> (UCtx->isTransparentContext())</div>
+<div class="line"><a name="l01036"></a><span class="lineno"> 1036</span>                 <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l01037"></a><span class="lineno"> 1037</span> </div>
+<div class="line"><a name="l01038"></a><span class="lineno"> 1038</span>               UDirs.visit(UCtx, UCtx);</div>
+<div class="line"><a name="l01039"></a><span class="lineno"> 1039</span>             }</div>
+<div class="line"><a name="l01040"></a><span class="lineno"> 1040</span> </div>
+<div class="line"><a name="l01041"></a><span class="lineno"> 1041</span>             <span class="comment">// Find the innermost file scope, so we can add using directives</span></div>
+<div class="line"><a name="l01042"></a><span class="lineno"> 1042</span>             <span class="comment">// from local scopes.</span></div>
+<div class="line"><a name="l01043"></a><span class="lineno"> 1043</span>             <a class="code" href="classclang_1_1Scope.html">Scope</a> *InnermostFileScope = <a class="code" href="AnalysisBasedWarnings_8cpp.html#a33dc45a03958a0bf07b5da2dec4db648">S</a>;</div>
+<div class="line"><a name="l01044"></a><span class="lineno"> 1044</span>             <span class="keywordflow">while</span> (InnermostFileScope &&</div>
+<div class="line"><a name="l01045"></a><span class="lineno"> 1045</span>                    !<a class="code" href="SemaLookup_8cpp.html#a65d38506c270453f91a02a15477f8f0b">isNamespaceOrTranslationUnitScope</a>(InnermostFileScope))</div>
+<div class="line"><a name="l01046"></a><span class="lineno"> 1046</span>               InnermostFileScope = InnermostFileScope-><a class="code" href="classclang_1_1Scope.html#a41a39e012b966ffcb2f05d41f4bdbb4b">getParent</a>();</div>
+<div class="line"><a name="l01047"></a><span class="lineno"> 1047</span>             UDirs.visitScopeChain(Initial, InnermostFileScope);</div>
+<div class="line"><a name="l01048"></a><span class="lineno"> 1048</span> </div>
+<div class="line"><a name="l01049"></a><span class="lineno"> 1049</span>             UDirs.done();</div>
+<div class="line"><a name="l01050"></a><span class="lineno"> 1050</span> </div>
+<div class="line"><a name="l01051"></a><span class="lineno"> 1051</span>             VisitedUsingDirectives = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l01052"></a><span class="lineno"> 1052</span>           }</div>
+<div class="line"><a name="l01053"></a><span class="lineno"> 1053</span> </div>
+<div class="line"><a name="l01054"></a><span class="lineno"> 1054</span>           <span class="keywordflow">if</span> (<a class="code" href="SemaLookup_8cpp.html#afa8cedec547b628a2e5864a93ed832de">CppNamespaceLookup</a>(*<span class="keyword">this</span>, R, <a class="code" href="ASTMatchFinder_8cpp.html#a779280869b9fac47a9bc391e7709171f">Context</a>, Ctx, UDirs)) {</div>
+<div class="line"><a name="l01055"></a><span class="lineno"> 1055</span>             R.<a class="code" href="classclang_1_1LookupResult.html#a7bca9f6ca6b6a32dca0ac2dfc8568261" title="Resolves the result kind of the lookup, possibly hiding decls.">resolveKind</a>();</div>
+<div class="line"><a name="l01056"></a><span class="lineno"> 1056</span>             <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
+<div class="line"><a name="l01057"></a><span class="lineno"> 1057</span>           }</div>
+<div class="line"><a name="l01058"></a><span class="lineno"> 1058</span> </div>
+<div class="line"><a name="l01059"></a><span class="lineno"> 1059</span>           <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l01060"></a><span class="lineno"> 1060</span>         }</div>
+<div class="line"><a name="l01061"></a><span class="lineno"> 1061</span> </div>
+<div class="line"><a name="l01062"></a><span class="lineno"> 1062</span>         <span class="comment">// Perform qualified name lookup into this context.</span></div>
+<div class="line"><a name="l01063"></a><span class="lineno"> 1063</span>         <span class="comment">// FIXME: In some cases, we know that every name that could be found by</span></div>
+<div class="line"><a name="l01064"></a><span class="lineno"> 1064</span>         <span class="comment">// this qualified name lookup will also be on the identifier chain. For</span></div>
+<div class="line"><a name="l01065"></a><span class="lineno"> 1065</span>         <span class="comment">// example, inside a class without any base classes, we never need to</span></div>
+<div class="line"><a name="l01066"></a><span class="lineno"> 1066</span>         <span class="comment">// perform qualified lookup because all of the members are on top of the</span></div>
+<div class="line"><a name="l01067"></a><span class="lineno"> 1067</span>         <span class="comment">// identifier chain.</span></div>
+<div class="line"><a name="l01068"></a><span class="lineno"> 1068</span>         <span class="keywordflow">if</span> (LookupQualifiedName(R, Ctx, <span class="comment">/*InUnqualifiedLookup=*/</span><span class="keyword">true</span>))</div>
+<div class="line"><a name="l01069"></a><span class="lineno"> 1069</span>           <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
+<div class="line"><a name="l01070"></a><span class="lineno"> 1070</span>       }</div>
+<div class="line"><a name="l01071"></a><span class="lineno"> 1071</span>     }</div>
+<div class="line"><a name="l01072"></a><span class="lineno"> 1072</span>   }</div>
+<div class="line"><a name="l01073"></a><span class="lineno"> 1073</span> </div>
+<div class="line"><a name="l01074"></a><span class="lineno"> 1074</span>   <span class="comment">// Stop if we ran out of scopes.</span></div>
+<div class="line"><a name="l01075"></a><span class="lineno"> 1075</span>   <span class="comment">// FIXME:  This really, really shouldn't be happening.</span></div>
+<div class="line"><a name="l01076"></a><span class="lineno"> 1076</span>   <span class="keywordflow">if</span> (!S) <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l01077"></a><span class="lineno"> 1077</span> </div>
+<div class="line"><a name="l01078"></a><span class="lineno"> 1078</span>   <span class="comment">// If we are looking for members, no need to look into global/namespace scope.</span></div>
+<div class="line"><a name="l01079"></a><span class="lineno"> 1079</span>   <span class="keywordflow">if</span> (NameKind == LookupMemberName)</div>
+<div class="line"><a name="l01080"></a><span class="lineno"> 1080</span>     <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l01081"></a><span class="lineno"> 1081</span> </div>
+<div class="line"><a name="l01082"></a><span class="lineno"> 1082</span>   <span class="comment">// Collect UsingDirectiveDecls in all scopes, and recursively all</span></div>
+<div class="line"><a name="l01083"></a><span class="lineno"> 1083</span>   <span class="comment">// nominated namespaces by those using-directives.</span></div>
+<div class="line"><a name="l01084"></a><span class="lineno"> 1084</span>   <span class="comment">//</span></div>
+<div class="line"><a name="l01085"></a><span class="lineno"> 1085</span>   <span class="comment">// FIXME: Cache this sorted list in Scope structure, and DeclContext, so we</span></div>
+<div class="line"><a name="l01086"></a><span class="lineno"> 1086</span>   <span class="comment">// don't build it for each lookup!</span></div>
+<div class="line"><a name="l01087"></a><span class="lineno"> 1087</span>   <span class="keywordflow">if</span> (!VisitedUsingDirectives) {</div>
+<div class="line"><a name="l01088"></a><span class="lineno"> 1088</span>     UDirs.visitScopeChain(Initial, S);</div>
+<div class="line"><a name="l01089"></a><span class="lineno"> 1089</span>     UDirs.done();</div>
+<div class="line"><a name="l01090"></a><span class="lineno"> 1090</span>   }</div>
+<div class="line"><a name="l01091"></a><span class="lineno"> 1091</span> </div>
+<div class="line"><a name="l01092"></a><span class="lineno"> 1092</span>   <span class="comment">// If we're not performing redeclaration lookup, do not look for local</span></div>
+<div class="line"><a name="l01093"></a><span class="lineno"> 1093</span>   <span class="comment">// extern declarations outside of a function scope.</span></div>
+<div class="line"><a name="l01094"></a><span class="lineno"> 1094</span>   <span class="keywordflow">if</span> (!R.<a class="code" href="classclang_1_1LookupResult.html#a5b06ceea23259bb185a7108679564b15" title="True if this lookup is just looking for an existing declaration.">isForRedeclaration</a>())</div>
+<div class="line"><a name="l01095"></a><span class="lineno"> 1095</span>     FindLocals.restore();</div>
+<div class="line"><a name="l01096"></a><span class="lineno"> 1096</span> </div>
+<div class="line"><a name="l01097"></a><span class="lineno"> 1097</span>   <span class="comment">// Lookup namespace scope, and global scope.</span></div>
+<div class="line"><a name="l01098"></a><span class="lineno"> 1098</span>   <span class="comment">// Unqualified name lookup in C++ requires looking into scopes</span></div>
+<div class="line"><a name="l01099"></a><span class="lineno"> 1099</span>   <span class="comment">// that aren't strictly lexical, and therefore we walk through the</span></div>
+<div class="line"><a name="l01100"></a><span class="lineno"> 1100</span>   <span class="comment">// context as well as walking through the scopes.</span></div>
+<div class="line"><a name="l01101"></a><span class="lineno"> 1101</span>   <span class="keywordflow">for</span> (; <a class="code" href="AnalysisBasedWarnings_8cpp.html#a33dc45a03958a0bf07b5da2dec4db648">S</a>; S = S-><a class="code" href="classclang_1_1Scope.html#a41a39e012b966ffcb2f05d41f4bdbb4b">getParent</a>()) {</div>
+<div class="line"><a name="l01102"></a><span class="lineno"> 1102</span>     <span class="comment">// Check whether the IdResolver has anything in this scope.</span></div>
+<div class="line"><a name="l01103"></a><span class="lineno"> 1103</span>     <span class="keywordtype">bool</span> Found = <span class="keyword">false</span>;</div>
+<div class="line"><a name="l01104"></a><span class="lineno"> 1104</span>     <span class="keywordflow">for</span> (; I != IEnd && S-><a class="code" href="classclang_1_1Scope.html#a704908bfa8ade9ea0ff027f1c45b0e12">isDeclScope</a>(*I); ++I) {</div>
+<div class="line"><a name="l01105"></a><span class="lineno"> 1105</span>       <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *ND = R.<a class="code" href="classclang_1_1LookupResult.html#aaa70a0b9fc7600f4077789afeee34f63" title="Retrieve the accepted (re)declaration of the given declaration, if there is one.">getAcceptableDecl</a>(*I)) {</div>
+<div class="line"><a name="l01106"></a><span class="lineno"> 1106</span>         <span class="comment">// We found something.  Look for anything else in our scope</span></div>
+<div class="line"><a name="l01107"></a><span class="lineno"> 1107</span>         <span class="comment">// with this same name and in an acceptable identifier</span></div>
+<div class="line"><a name="l01108"></a><span class="lineno"> 1108</span>         <span class="comment">// namespace, so that we can construct an overload set if we</span></div>
+<div class="line"><a name="l01109"></a><span class="lineno"> 1109</span>         <span class="comment">// need to.</span></div>
+<div class="line"><a name="l01110"></a><span class="lineno"> 1110</span>         Found = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l01111"></a><span class="lineno"> 1111</span>         R.<a class="code" href="classclang_1_1LookupResult.html#a62d3dbd6c56a75cad9685c81817253ac" title="Add a declaration to these results with its natural access. Does not test the acceptance criteria...">addDecl</a>(ND);</div>
+<div class="line"><a name="l01112"></a><span class="lineno"> 1112</span>       }</div>
+<div class="line"><a name="l01113"></a><span class="lineno"> 1113</span>     }</div>
+<div class="line"><a name="l01114"></a><span class="lineno"> 1114</span> </div>
+<div class="line"><a name="l01115"></a><span class="lineno"> 1115</span>     <span class="keywordflow">if</span> (Found && S-><a class="code" href="classclang_1_1Scope.html#addcf7c6c2b6b49e4c5d25fce5ca94643">isTemplateParamScope</a>()) {</div>
+<div class="line"><a name="l01116"></a><span class="lineno"> 1116</span>       R.<a class="code" href="classclang_1_1LookupResult.html#a7bca9f6ca6b6a32dca0ac2dfc8568261" title="Resolves the result kind of the lookup, possibly hiding decls.">resolveKind</a>();</div>
+<div class="line"><a name="l01117"></a><span class="lineno"> 1117</span>       <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
+<div class="line"><a name="l01118"></a><span class="lineno"> 1118</span>     }</div>
+<div class="line"><a name="l01119"></a><span class="lineno"> 1119</span> </div>
+<div class="line"><a name="l01120"></a><span class="lineno"> 1120</span>     <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *Ctx = S-><a class="code" href="classclang_1_1Scope.html#a0ddcbbc7cb53f7b1f407ef68696b8d37">getEntity</a>();</div>
+<div class="line"><a name="l01121"></a><span class="lineno"> 1121</span>     <span class="keywordflow">if</span> (!Ctx && S-><a class="code" href="classclang_1_1Scope.html#addcf7c6c2b6b49e4c5d25fce5ca94643">isTemplateParamScope</a>() && OutsideOfTemplateParamDC &&</div>
+<div class="line"><a name="l01122"></a><span class="lineno"> 1122</span>         S-><a class="code" href="classclang_1_1Scope.html#a41a39e012b966ffcb2f05d41f4bdbb4b">getParent</a>() && !S-><a class="code" href="classclang_1_1Scope.html#a41a39e012b966ffcb2f05d41f4bdbb4b">getParent</a>()-><a class="code" href="classclang_1_1Scope.html#addcf7c6c2b6b49e4c5d25fce5ca94643">isTemplateParamScope</a>()) {</div>
+<div class="line"><a name="l01123"></a><span class="lineno"> 1123</span>       <span class="comment">// We've just searched the last template parameter scope and</span></div>
+<div class="line"><a name="l01124"></a><span class="lineno"> 1124</span>       <span class="comment">// found nothing, so look into the contexts between the</span></div>
+<div class="line"><a name="l01125"></a><span class="lineno"> 1125</span>       <span class="comment">// lexical and semantic declaration contexts returned by</span></div>
+<div class="line"><a name="l01126"></a><span class="lineno"> 1126</span>       <span class="comment">// findOuterContext(). This implements the name lookup behavior</span></div>
+<div class="line"><a name="l01127"></a><span class="lineno"> 1127</span>       <span class="comment">// of C++ [temp.local]p8.</span></div>
+<div class="line"><a name="l01128"></a><span class="lineno"> 1128</span>       Ctx = OutsideOfTemplateParamDC;</div>
+<div class="line"><a name="l01129"></a><span class="lineno"> 1129</span>       OutsideOfTemplateParamDC = 0;</div>
+<div class="line"><a name="l01130"></a><span class="lineno"> 1130</span>     }</div>
+<div class="line"><a name="l01131"></a><span class="lineno"> 1131</span> </div>
+<div class="line"><a name="l01132"></a><span class="lineno"> 1132</span>     <span class="keywordflow">if</span> (Ctx) {</div>
+<div class="line"><a name="l01133"></a><span class="lineno"> 1133</span>       <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *OuterCtx;</div>
+<div class="line"><a name="l01134"></a><span class="lineno"> 1134</span>       <span class="keywordtype">bool</span> SearchAfterTemplateScope;</div>
+<div class="line"><a name="l01135"></a><span class="lineno"> 1135</span>       llvm::tie(OuterCtx, SearchAfterTemplateScope) = <a class="code" href="SemaLookup_8cpp.html#a50e6e1b149e77014c7011c0352501fc8">findOuterContext</a>(S);</div>
+<div class="line"><a name="l01136"></a><span class="lineno"> 1136</span>       <span class="keywordflow">if</span> (SearchAfterTemplateScope)</div>
+<div class="line"><a name="l01137"></a><span class="lineno"> 1137</span>         OutsideOfTemplateParamDC = OuterCtx;</div>
+<div class="line"><a name="l01138"></a><span class="lineno"> 1138</span> </div>
+<div class="line"><a name="l01139"></a><span class="lineno"> 1139</span>       <span class="keywordflow">for</span> (; Ctx && !Ctx-><a class="code" href="classclang_1_1DeclContext.html#ab26c189165e15c46df7e4c734da0b0b8" title="Determine whether this declaration context is equivalent to the declaration context DC...">Equals</a>(OuterCtx); Ctx = Ctx-><a class="code" href="classclang_1_1DeclContext.html#ad3f371a23f2b8f92275ef63817701e4e" title="Find the parent context of this context that will be used for unqualified name lookup.">getLookupParent</a>()) {</div>
+<div class="line"><a name="l01140"></a><span class="lineno"> 1140</span>         <span class="comment">// We do not directly look into transparent contexts, since</span></div>
+<div class="line"><a name="l01141"></a><span class="lineno"> 1141</span>         <span class="comment">// those entities will be found in the nearest enclosing</span></div>
+<div class="line"><a name="l01142"></a><span class="lineno"> 1142</span>         <span class="comment">// non-transparent context.</span></div>
+<div class="line"><a name="l01143"></a><span class="lineno"> 1143</span>         <span class="keywordflow">if</span> (Ctx-><a class="code" href="classclang_1_1DeclContext.html#abbf5a92a55d4faa4150ee8fd46a60345">isTransparentContext</a>())</div>
+<div class="line"><a name="l01144"></a><span class="lineno"> 1144</span>           <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l01145"></a><span class="lineno"> 1145</span> </div>
+<div class="line"><a name="l01146"></a><span class="lineno"> 1146</span>         <span class="comment">// If we have a context, and it's not a context stashed in the</span></div>
+<div class="line"><a name="l01147"></a><span class="lineno"> 1147</span>         <span class="comment">// template parameter scope for an out-of-line definition, also</span></div>
+<div class="line"><a name="l01148"></a><span class="lineno"> 1148</span>         <span class="comment">// look into that context.</span></div>
+<div class="line"><a name="l01149"></a><span class="lineno"> 1149</span>         <span class="keywordflow">if</span> (!(Found && S && S-><a class="code" href="classclang_1_1Scope.html#addcf7c6c2b6b49e4c5d25fce5ca94643">isTemplateParamScope</a>())) {</div>
+<div class="line"><a name="l01150"></a><span class="lineno"> 1150</span>           assert(Ctx-><a class="code" href="classclang_1_1DeclContext.html#ac33a346d4e8db5e892aba87393f4e8e4">isFileContext</a>() &&</div>
+<div class="line"><a name="l01151"></a><span class="lineno"> 1151</span>               <span class="stringliteral">"We should have been looking only at file context here already."</span>);</div>
+<div class="line"><a name="l01152"></a><span class="lineno"> 1152</span> </div>
+<div class="line"><a name="l01153"></a><span class="lineno"> 1153</span>           <span class="comment">// Look into context considering using-directives.</span></div>
+<div class="line"><a name="l01154"></a><span class="lineno"> 1154</span>           <span class="keywordflow">if</span> (<a class="code" href="SemaLookup_8cpp.html#afa8cedec547b628a2e5864a93ed832de">CppNamespaceLookup</a>(*<span class="keyword">this</span>, R, <a class="code" href="ASTMatchFinder_8cpp.html#a779280869b9fac47a9bc391e7709171f">Context</a>, Ctx, UDirs))</div>
+<div class="line"><a name="l01155"></a><span class="lineno"> 1155</span>             Found = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l01156"></a><span class="lineno"> 1156</span>         }</div>
+<div class="line"><a name="l01157"></a><span class="lineno"> 1157</span> </div>
+<div class="line"><a name="l01158"></a><span class="lineno"> 1158</span>         <span class="keywordflow">if</span> (Found) {</div>
+<div class="line"><a name="l01159"></a><span class="lineno"> 1159</span>           R.<a class="code" href="classclang_1_1LookupResult.html#a7bca9f6ca6b6a32dca0ac2dfc8568261" title="Resolves the result kind of the lookup, possibly hiding decls.">resolveKind</a>();</div>
+<div class="line"><a name="l01160"></a><span class="lineno"> 1160</span>           <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
+<div class="line"><a name="l01161"></a><span class="lineno"> 1161</span>         }</div>
+<div class="line"><a name="l01162"></a><span class="lineno"> 1162</span> </div>
+<div class="line"><a name="l01163"></a><span class="lineno"> 1163</span>         <span class="keywordflow">if</span> (R.<a class="code" href="classclang_1_1LookupResult.html#a5b06ceea23259bb185a7108679564b15" title="True if this lookup is just looking for an existing declaration.">isForRedeclaration</a>() && !Ctx-><a class="code" href="classclang_1_1DeclContext.html#abbf5a92a55d4faa4150ee8fd46a60345">isTransparentContext</a>())</div>
+<div class="line"><a name="l01164"></a><span class="lineno"> 1164</span>           <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l01165"></a><span class="lineno"> 1165</span>       }</div>
+<div class="line"><a name="l01166"></a><span class="lineno"> 1166</span>     }</div>
+<div class="line"><a name="l01167"></a><span class="lineno"> 1167</span> </div>
+<div class="line"><a name="l01168"></a><span class="lineno"> 1168</span>     <span class="keywordflow">if</span> (R.<a class="code" href="classclang_1_1LookupResult.html#a5b06ceea23259bb185a7108679564b15" title="True if this lookup is just looking for an existing declaration.">isForRedeclaration</a>() && Ctx && !Ctx-><a class="code" href="classclang_1_1DeclContext.html#abbf5a92a55d4faa4150ee8fd46a60345">isTransparentContext</a>())</div>
+<div class="line"><a name="l01169"></a><span class="lineno"> 1169</span>       <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l01170"></a><span class="lineno"> 1170</span>   }</div>
+<div class="line"><a name="l01171"></a><span class="lineno"> 1171</span> </div>
+<div class="line"><a name="l01172"></a><span class="lineno"> 1172</span>   <span class="keywordflow">return</span> !R.<a class="code" href="classclang_1_1LookupResult.html#a9f44c1cd9d9c7e84dd0202538dd72cd7" title="Return true if no decls were found.">empty</a>();</div>
+<div class="line"><a name="l01173"></a><span class="lineno"> 1173</span> }</div>
+<div class="line"><a name="l01174"></a><span class="lineno"> 1174</span> <span class="comment"></span></div>
+<div class="line"><a name="l01175"></a><span class="lineno"> 1175</span> <span class="comment">/// \brief Find the declaration that a class temploid member specialization was</span></div>
+<div class="line"><a name="l01176"></a><span class="lineno"> 1176</span> <span class="comment">/// instantiated from, or the member itself if it is an explicit specialization.</span></div>
+<div class="line"><a name="l01177"></a><span class="lineno"><a class="code" href="SemaLookup_8cpp.html#a7952783d574e82cc5963739999d941ab"> 1177</a></span> <span class="comment"></span><span class="keyword">static</span> <a class="code" href="classclang_1_1Decl.html">Decl</a> *<a class="code" href="SemaLookup_8cpp.html#a7952783d574e82cc5963739999d941ab" title="Find the declaration that a class temploid member specialization was instantiated from...">getInstantiatedFrom</a>(<a class="code" href="classclang_1_1Decl.html">Decl</a> *D, <a class="code" href="classclang_1_1MemberSpecializationInfo.html" title="Provides information a specialization of a member of a class template, which may be a member function...">MemberSpecializationInfo</a> *MSInfo) {</div>
+<div class="line"><a name="l01178"></a><span class="lineno"> 1178</span>   <span class="keywordflow">return</span> MSInfo-><a class="code" href="classclang_1_1MemberSpecializationInfo.html#abc08f5b8ca7825d10e0f4f39db64f45b">isExplicitSpecialization</a>() ? D : MSInfo-><a class="code" href="classclang_1_1MemberSpecializationInfo.html#a4784da25b2eac98fdf281a1e61047b49" title="Retrieve the member declaration from which this member was instantiated.">getInstantiatedFrom</a>();</div>
+<div class="line"><a name="l01179"></a><span class="lineno"> 1179</span> }</div>
+<div class="line"><a name="l01180"></a><span class="lineno"> 1180</span> <span class="comment"></span></div>
+<div class="line"><a name="l01181"></a><span class="lineno"> 1181</span> <span class="comment">/// \brief Find the module in which the given declaration was defined.</span></div>
+<div class="line"><a name="l01182"></a><span class="lineno"><a class="code" href="SemaLookup_8cpp.html#aa2b33f3a4b6a498d0214921c71b1a944"> 1182</a></span> <span class="comment"></span><span class="keyword">static</span> <a class="code" href="classclang_1_1Module.html" title="Describes a module or submodule.">Module</a> *<a class="code" href="SemaLookup_8cpp.html#aa2b33f3a4b6a498d0214921c71b1a944" title="Find the module in which the given declaration was defined.">getDefiningModule</a>(<a class="code" href="classclang_1_1Decl.html">Decl</a> *Entity) {</div>
+<div class="line"><a name="l01183"></a><span class="lineno"> 1183</span>   <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1FunctionDecl.html">FunctionDecl</a> *FD = dyn_cast<FunctionDecl>(Entity)) {</div>
+<div class="line"><a name="l01184"></a><span class="lineno"> 1184</span>     <span class="comment">// If this function was instantiated from a template, the defining module is</span></div>
+<div class="line"><a name="l01185"></a><span class="lineno"> 1185</span>     <span class="comment">// the module containing the pattern.</span></div>
+<div class="line"><a name="l01186"></a><span class="lineno"> 1186</span>     <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1FunctionDecl.html">FunctionDecl</a> *Pattern = FD-><a class="code" href="classclang_1_1FunctionDecl.html#a09a34cb98a4932b40c05aa31fc7ee7ea" title="Retrieve the function declaration from which this function could be instantiated, if it is an instant...">getTemplateInstantiationPattern</a>())</div>
+<div class="line"><a name="l01187"></a><span class="lineno"> 1187</span>       Entity = Pattern;</div>
+<div class="line"><a name="l01188"></a><span class="lineno"> 1188</span>   } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *RD = dyn_cast<CXXRecordDecl>(Entity)) {</div>
+<div class="line"><a name="l01189"></a><span class="lineno"> 1189</span>     <span class="comment">// If it's a class template specialization, find the template or partial</span></div>
+<div class="line"><a name="l01190"></a><span class="lineno"> 1190</span>     <span class="comment">// specialization from which it was instantiated.</span></div>
+<div class="line"><a name="l01191"></a><span class="lineno"> 1191</span>     <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1ClassTemplateSpecializationDecl.html" title="Represents a class template specialization, which refers to a class template with a given set of temp...">ClassTemplateSpecializationDecl</a> *SpecRD =</div>
+<div class="line"><a name="l01192"></a><span class="lineno"> 1192</span>             dyn_cast<ClassTemplateSpecializationDecl>(RD)) {</div>
+<div class="line"><a name="l01193"></a><span class="lineno"> 1193</span>       llvm::PointerUnion<<a class="code" href="classclang_1_1ClassTemplateDecl.html" title="Declaration of a class template.">ClassTemplateDecl</a>*,</div>
+<div class="line"><a name="l01194"></a><span class="lineno"> 1194</span>                          <a class="code" href="classclang_1_1ClassTemplatePartialSpecializationDecl.html">ClassTemplatePartialSpecializationDecl</a>*> From =</div>
+<div class="line"><a name="l01195"></a><span class="lineno"> 1195</span>           SpecRD-><a class="code" href="classclang_1_1ClassTemplateSpecializationDecl.html#a8ce4be4b0d981c01b6c7d48d54fb5b16" title="If this class template specialization is an instantiation of a template (rather than an explicit spec...">getInstantiatedFrom</a>();</div>
+<div class="line"><a name="l01196"></a><span class="lineno"> 1196</span>       <span class="keywordflow">if</span> (ClassTemplateDecl *FromTemplate = From.dyn_cast<ClassTemplateDecl*>())</div>
+<div class="line"><a name="l01197"></a><span class="lineno"> 1197</span>         Entity = FromTemplate->getTemplatedDecl();</div>
+<div class="line"><a name="l01198"></a><span class="lineno"> 1198</span>       <span class="keywordflow">else</span> <span class="keywordflow">if</span> (From)</div>
+<div class="line"><a name="l01199"></a><span class="lineno"> 1199</span>         Entity = From.get<<a class="code" href="classclang_1_1ClassTemplatePartialSpecializationDecl.html">ClassTemplatePartialSpecializationDecl</a>*>();</div>
+<div class="line"><a name="l01200"></a><span class="lineno"> 1200</span>       <span class="comment">// Otherwise, it's an explicit specialization.</span></div>
+<div class="line"><a name="l01201"></a><span class="lineno"> 1201</span>     } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1MemberSpecializationInfo.html" title="Provides information a specialization of a member of a class template, which may be a member function...">MemberSpecializationInfo</a> *MSInfo =</div>
+<div class="line"><a name="l01202"></a><span class="lineno"> 1202</span>                    RD->getMemberSpecializationInfo())</div>
+<div class="line"><a name="l01203"></a><span class="lineno"> 1203</span>       Entity = <a class="code" href="SemaLookup_8cpp.html#a7952783d574e82cc5963739999d941ab" title="Find the declaration that a class temploid member specialization was instantiated from...">getInstantiatedFrom</a>(RD, MSInfo);</div>
+<div class="line"><a name="l01204"></a><span class="lineno"> 1204</span>   } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1EnumDecl.html">EnumDecl</a> *ED = dyn_cast<EnumDecl>(Entity)) {</div>
+<div class="line"><a name="l01205"></a><span class="lineno"> 1205</span>     <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1MemberSpecializationInfo.html" title="Provides information a specialization of a member of a class template, which may be a member function...">MemberSpecializationInfo</a> *MSInfo = ED->getMemberSpecializationInfo())</div>
+<div class="line"><a name="l01206"></a><span class="lineno"> 1206</span>       Entity = <a class="code" href="SemaLookup_8cpp.html#a7952783d574e82cc5963739999d941ab" title="Find the declaration that a class temploid member specialization was instantiated from...">getInstantiatedFrom</a>(ED, MSInfo);</div>
+<div class="line"><a name="l01207"></a><span class="lineno"> 1207</span>   } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1VarDecl.html">VarDecl</a> *VD = dyn_cast<VarDecl>(Entity)) {</div>
+<div class="line"><a name="l01208"></a><span class="lineno"> 1208</span>     <span class="comment">// FIXME: Map from variable template specializations back to the template.</span></div>
+<div class="line"><a name="l01209"></a><span class="lineno"> 1209</span>     <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1MemberSpecializationInfo.html" title="Provides information a specialization of a member of a class template, which may be a member function...">MemberSpecializationInfo</a> *MSInfo = VD->getMemberSpecializationInfo())</div>
+<div class="line"><a name="l01210"></a><span class="lineno"> 1210</span>       Entity = <a class="code" href="SemaLookup_8cpp.html#a7952783d574e82cc5963739999d941ab" title="Find the declaration that a class temploid member specialization was instantiated from...">getInstantiatedFrom</a>(VD, MSInfo);</div>
+<div class="line"><a name="l01211"></a><span class="lineno"> 1211</span>   }</div>
+<div class="line"><a name="l01212"></a><span class="lineno"> 1212</span> </div>
+<div class="line"><a name="l01213"></a><span class="lineno"> 1213</span>   <span class="comment">// Walk up to the containing context. That might also have been instantiated</span></div>
+<div class="line"><a name="l01214"></a><span class="lineno"> 1214</span>   <span class="comment">// from a template.</span></div>
+<div class="line"><a name="l01215"></a><span class="lineno"> 1215</span>   <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *<a class="code" href="ASTMatchFinder_8cpp.html#a779280869b9fac47a9bc391e7709171f">Context</a> = Entity-><a class="code" href="classclang_1_1Decl.html#af67e1a1d24dcc51093b95dbcf68d4288">getDeclContext</a>();</div>
+<div class="line"><a name="l01216"></a><span class="lineno"> 1216</span>   <span class="keywordflow">if</span> (Context-><a class="code" href="classclang_1_1DeclContext.html#ac33a346d4e8db5e892aba87393f4e8e4">isFileContext</a>())</div>
+<div class="line"><a name="l01217"></a><span class="lineno"> 1217</span>     <span class="keywordflow">return</span> Entity-><a class="code" href="classclang_1_1Decl.html#aa778bce01bd8fefa4b315217ea7f8727">getOwningModule</a>();</div>
+<div class="line"><a name="l01218"></a><span class="lineno"> 1218</span>   <span class="keywordflow">return</span> <a class="code" href="SemaLookup_8cpp.html#aa2b33f3a4b6a498d0214921c71b1a944" title="Find the module in which the given declaration was defined.">getDefiningModule</a>(cast<Decl>(Context));</div>
+<div class="line"><a name="l01219"></a><span class="lineno"> 1219</span> }</div>
+<div class="line"><a name="l01220"></a><span class="lineno"> 1220</span> </div>
+<div class="line"><a name="l01221"></a><span class="lineno"><a class="code" href="classclang_1_1Sema.html#a0a0534f2191734391229694afce93e26"> 1221</a></span> <a class="code" href="classllvm_1_1DenseSet.html">llvm::DenseSet<Module*></a> &<a class="code" href="classclang_1_1Sema.html#a0a0534f2191734391229694afce93e26" title="Get the set of additional modules that should be checked during name lookup. A module and its imports...">Sema::getLookupModules</a>() {</div>
+<div class="line"><a name="l01222"></a><span class="lineno"> 1222</span>   <span class="keywordtype">unsigned</span> N = ActiveTemplateInstantiations.size();</div>
+<div class="line"><a name="l01223"></a><span class="lineno"> 1223</span>   <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> I = ActiveTemplateInstantiationLookupModules.size();</div>
+<div class="line"><a name="l01224"></a><span class="lineno"> 1224</span>        I != N; ++I) {</div>
+<div class="line"><a name="l01225"></a><span class="lineno"> 1225</span>     <a class="code" href="classclang_1_1Module.html" title="Describes a module or submodule.">Module</a> *M = <a class="code" href="SemaLookup_8cpp.html#aa2b33f3a4b6a498d0214921c71b1a944" title="Find the module in which the given declaration was defined.">getDefiningModule</a>(ActiveTemplateInstantiations[I].Entity);</div>
+<div class="line"><a name="l01226"></a><span class="lineno"> 1226</span>     <span class="keywordflow">if</span> (M && !LookupModulesCache.insert(M).second)</div>
+<div class="line"><a name="l01227"></a><span class="lineno"> 1227</span>       M = 0;</div>
+<div class="line"><a name="l01228"></a><span class="lineno"> 1228</span>     ActiveTemplateInstantiationLookupModules.push_back(M);</div>
+<div class="line"><a name="l01229"></a><span class="lineno"> 1229</span>   }</div>
+<div class="line"><a name="l01230"></a><span class="lineno"> 1230</span>   <span class="keywordflow">return</span> LookupModulesCache;</div>
+<div class="line"><a name="l01231"></a><span class="lineno"> 1231</span> }</div>
+<div class="line"><a name="l01232"></a><span class="lineno"> 1232</span> <span class="comment"></span></div>
+<div class="line"><a name="l01233"></a><span class="lineno"> 1233</span> <span class="comment">/// \brief Determine whether a declaration is visible to name lookup.</span></div>
+<div class="line"><a name="l01234"></a><span class="lineno"> 1234</span> <span class="comment">///</span></div>
+<div class="line"><a name="l01235"></a><span class="lineno"> 1235</span> <span class="comment">/// This routine determines whether the declaration D is visible in the current</span></div>
+<div class="line"><a name="l01236"></a><span class="lineno"> 1236</span> <span class="comment">/// lookup context, taking into account the current template instantiation</span></div>
+<div class="line"><a name="l01237"></a><span class="lineno"> 1237</span> <span class="comment">/// stack. During template instantiation, a declaration is visible if it is</span></div>
+<div class="line"><a name="l01238"></a><span class="lineno"> 1238</span> <span class="comment">/// visible from a module containing any entity on the template instantiation</span></div>
+<div class="line"><a name="l01239"></a><span class="lineno"> 1239</span> <span class="comment">/// path (by instantiating a template, you allow it to see the declarations that</span></div>
+<div class="line"><a name="l01240"></a><span class="lineno"> 1240</span> <span class="comment">/// your module can see, including those later on in your module).</span></div>
+<div class="line"><a name="l01241"></a><span class="lineno"> 1241</span> <span class="comment"></span><span class="keywordtype">bool</span> LookupResult::isVisibleSlow(<a class="code" href="classclang_1_1Sema.html" title="Sema - This implements semantic analysis and AST building for C.">Sema</a> &<a class="code" href="SemaOverload_8cpp.html#a2143ac7d927afc9feb28c9270c7ed86d">SemaRef</a>, <a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *D) {</div>
+<div class="line"><a name="l01242"></a><span class="lineno"> 1242</span>   assert(D-><a class="code" href="classclang_1_1NamedDecl.html#a6725184df2e9d5ca8ba02da12cd1aa08" title="Determine whether this declaration is hidden from name lookup.">isHidden</a>() && !SemaRef.<a class="code" href="classclang_1_1Sema.html#a74cecf16a6f358153d681eb1174213bc" title="List of active template instantiations.">ActiveTemplateInstantiations</a>.empty() &&</div>
+<div class="line"><a name="l01243"></a><span class="lineno"> 1243</span>          <span class="stringliteral">"should not call this: not in slow case"</span>);</div>
+<div class="line"><a name="l01244"></a><span class="lineno"> 1244</span>   <a class="code" href="classclang_1_1Module.html" title="Describes a module or submodule.">Module</a> *DeclModule = D-><a class="code" href="classclang_1_1Decl.html#aa778bce01bd8fefa4b315217ea7f8727">getOwningModule</a>();</div>
+<div class="line"><a name="l01245"></a><span class="lineno"> 1245</span>   assert(DeclModule && <span class="stringliteral">"hidden decl not from a module"</span>);</div>
+<div class="line"><a name="l01246"></a><span class="lineno"> 1246</span> </div>
+<div class="line"><a name="l01247"></a><span class="lineno"> 1247</span>   <span class="comment">// Find the extra places where we need to look.</span></div>
+<div class="line"><a name="l01248"></a><span class="lineno"> 1248</span>   <a class="code" href="classllvm_1_1DenseSet.html">llvm::DenseSet<Module*></a> &LookupModules = SemaRef.<a class="code" href="classclang_1_1Sema.html#a0a0534f2191734391229694afce93e26" title="Get the set of additional modules that should be checked during name lookup. A module and its imports...">getLookupModules</a>();</div>
+<div class="line"><a name="l01249"></a><span class="lineno"> 1249</span>   <span class="keywordflow">if</span> (LookupModules.empty())</div>
+<div class="line"><a name="l01250"></a><span class="lineno"> 1250</span>     <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l01251"></a><span class="lineno"> 1251</span> </div>
+<div class="line"><a name="l01252"></a><span class="lineno"> 1252</span>   <span class="comment">// If our lookup set contains the decl's module, it's visible.</span></div>
+<div class="line"><a name="l01253"></a><span class="lineno"> 1253</span>   <span class="keywordflow">if</span> (LookupModules.count(DeclModule))</div>
+<div class="line"><a name="l01254"></a><span class="lineno"> 1254</span>     <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
+<div class="line"><a name="l01255"></a><span class="lineno"> 1255</span> </div>
+<div class="line"><a name="l01256"></a><span class="lineno"> 1256</span>   <span class="comment">// If the declaration isn't exported, it's not visible in any other module.</span></div>
+<div class="line"><a name="l01257"></a><span class="lineno"> 1257</span>   <span class="keywordflow">if</span> (D-><a class="code" href="classclang_1_1Decl.html#a80d5f9396cdbe4551ad425b030c99df8" title="Whether this declaration was marked as being private to the module in which it was defined...">isModulePrivate</a>())</div>
+<div class="line"><a name="l01258"></a><span class="lineno"> 1258</span>     <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l01259"></a><span class="lineno"> 1259</span> </div>
+<div class="line"><a name="l01260"></a><span class="lineno"> 1260</span>   <span class="comment">// Check whether DeclModule is transitively exported to an import of</span></div>
+<div class="line"><a name="l01261"></a><span class="lineno"> 1261</span>   <span class="comment">// the lookup set.</span></div>
+<div class="line"><a name="l01262"></a><span class="lineno"> 1262</span>   <span class="keywordflow">for</span> (<a class="code" href="classllvm_1_1DenseSet.html">llvm::DenseSet<Module *>::iterator</a> I = LookupModules.begin(),</div>
+<div class="line"><a name="l01263"></a><span class="lineno"> 1263</span>                                           E = LookupModules.end();</div>
+<div class="line"><a name="l01264"></a><span class="lineno"> 1264</span>        I != E; ++I)</div>
+<div class="line"><a name="l01265"></a><span class="lineno"> 1265</span>     <span class="keywordflow">if</span> ((*I)->isModuleVisible(DeclModule))</div>
+<div class="line"><a name="l01266"></a><span class="lineno"> 1266</span>       <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
+<div class="line"><a name="l01267"></a><span class="lineno"> 1267</span>   <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l01268"></a><span class="lineno"> 1268</span> }</div>
+<div class="line"><a name="l01269"></a><span class="lineno"> 1269</span> <span class="comment"></span></div>
+<div class="line"><a name="l01270"></a><span class="lineno"> 1270</span> <span class="comment">/// \brief Retrieve the visible declaration corresponding to D, if any.</span></div>
+<div class="line"><a name="l01271"></a><span class="lineno"> 1271</span> <span class="comment">///</span></div>
+<div class="line"><a name="l01272"></a><span class="lineno"> 1272</span> <span class="comment">/// This routine determines whether the declaration D is visible in the current</span></div>
+<div class="line"><a name="l01273"></a><span class="lineno"> 1273</span> <span class="comment">/// module, with the current imports. If not, it checks whether any</span></div>
+<div class="line"><a name="l01274"></a><span class="lineno"> 1274</span> <span class="comment">/// redeclaration of D is visible, and if so, returns that declaration.</span></div>
+<div class="line"><a name="l01275"></a><span class="lineno"> 1275</span> <span class="comment">///</span></div>
+<div class="line"><a name="l01276"></a><span class="lineno"> 1276</span> <span class="comment">/// \returns D, or a visible previous declaration of D, whichever is more recent</span></div>
+<div class="line"><a name="l01277"></a><span class="lineno"> 1277</span> <span class="comment">/// and visible. If no declaration of D is visible, returns null.</span></div>
+<div class="line"><a name="l01278"></a><span class="lineno"><a class="code" href="SemaLookup_8cpp.html#a5cc0b00b9bc94a9bdf9970d2f7d47d65"> 1278</a></span> <span class="comment"></span><span class="keyword">static</span> <a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *<a class="code" href="SemaLookup_8cpp.html#a5cc0b00b9bc94a9bdf9970d2f7d47d65" title="Retrieve the visible declaration corresponding to D, if any.">findAcceptableDecl</a>(<a class="code" href="classclang_1_1Sema.html" title="Sema - This implements semantic analysis and AST building for C.">Sema</a> &SemaRef, <a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *D) {</div>
+<div class="line"><a name="l01279"></a><span class="lineno"> 1279</span>   assert(!<a class="code" href="classclang_1_1LookupResult.html#ad308736d4d5745319a737e7bb40c7a9a" title="Determine whether the given declaration is visible to the program.">LookupResult::isVisible</a>(SemaRef, D) && <span class="stringliteral">"not in slow case"</span>);</div>
+<div class="line"><a name="l01280"></a><span class="lineno"> 1280</span> </div>
+<div class="line"><a name="l01281"></a><span class="lineno"> 1281</span>   <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1Decl_1_1redecl__iterator.html" title="Iterates through all the redeclarations of the same decl.">Decl::redecl_iterator</a> RD = D-><a class="code" href="classclang_1_1Decl.html#affcf7e1d8ede72bffe8db1885bc75ef6" title="Returns iterator for all the redeclarations of the same decl. It will iterate at least once (when thi...">redecls_begin</a>(), RDEnd = D-><a class="code" href="classclang_1_1Decl.html#ab344977eb918f71339b3aeb605cff3f2">redecls_end</a>();</div>
+<div class="line"><a name="l01282"></a><span class="lineno"> 1282</span>        RD != RDEnd; ++RD) {</div>
+<div class="line"><a name="l01283"></a><span class="lineno"> 1283</span>     <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *ND = dyn_cast<NamedDecl>(*RD)) {</div>
+<div class="line"><a name="l01284"></a><span class="lineno"> 1284</span>       <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1LookupResult.html#ad308736d4d5745319a737e7bb40c7a9a" title="Determine whether the given declaration is visible to the program.">LookupResult::isVisible</a>(SemaRef, ND))</div>
+<div class="line"><a name="l01285"></a><span class="lineno"> 1285</span>         <span class="keywordflow">return</span> ND;</div>
+<div class="line"><a name="l01286"></a><span class="lineno"> 1286</span>     }</div>
+<div class="line"><a name="l01287"></a><span class="lineno"> 1287</span>   }</div>
+<div class="line"><a name="l01288"></a><span class="lineno"> 1288</span> </div>
+<div class="line"><a name="l01289"></a><span class="lineno"> 1289</span>   <span class="keywordflow">return</span> 0;</div>
+<div class="line"><a name="l01290"></a><span class="lineno"> 1290</span> }</div>
+<div class="line"><a name="l01291"></a><span class="lineno"> 1291</span> </div>
+<div class="line"><a name="l01292"></a><span class="lineno"> 1292</span> <a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *LookupResult::getAcceptableDeclSlow(<a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *D)<span class="keyword"> const </span>{</div>
+<div class="line"><a name="l01293"></a><span class="lineno"> 1293</span>   <span class="keywordflow">return</span> <a class="code" href="SemaLookup_8cpp.html#a5cc0b00b9bc94a9bdf9970d2f7d47d65" title="Retrieve the visible declaration corresponding to D, if any.">findAcceptableDecl</a>(SemaRef, D);</div>
+<div class="line"><a name="l01294"></a><span class="lineno"> 1294</span> }</div>
+<div class="line"><a name="l01295"></a><span class="lineno"> 1295</span> <span class="comment"></span></div>
+<div class="line"><a name="l01296"></a><span class="lineno"> 1296</span> <span class="comment">/// @brief Perform unqualified name lookup starting from a given</span></div>
+<div class="line"><a name="l01297"></a><span class="lineno"> 1297</span> <span class="comment">/// scope.</span></div>
+<div class="line"><a name="l01298"></a><span class="lineno"> 1298</span> <span class="comment">///</span></div>
+<div class="line"><a name="l01299"></a><span class="lineno"> 1299</span> <span class="comment">/// Unqualified name lookup (C++ [basic.lookup.unqual], C99 6.2.1) is</span></div>
+<div class="line"><a name="l01300"></a><span class="lineno"> 1300</span> <span class="comment">/// used to find names within the current scope. For example, 'x' in</span></div>
+<div class="line"><a name="l01301"></a><span class="lineno"> 1301</span> <span class="comment">/// @code</span></div>
+<div class="line"><a name="l01302"></a><span class="lineno"> 1302</span> <span class="comment">/// int x;</span></div>
+<div class="line"><a name="l01303"></a><span class="lineno"> 1303</span> <span class="comment">/// int f() {</span></div>
+<div class="line"><a name="l01304"></a><span class="lineno"> 1304</span> <span class="comment">///   return x; // unqualified name look finds 'x' in the global scope</span></div>
+<div class="line"><a name="l01305"></a><span class="lineno"> 1305</span> <span class="comment">/// }</span></div>
+<div class="line"><a name="l01306"></a><span class="lineno"> 1306</span> <span class="comment">/// @endcode</span></div>
+<div class="line"><a name="l01307"></a><span class="lineno"> 1307</span> <span class="comment">///</span></div>
+<div class="line"><a name="l01308"></a><span class="lineno"> 1308</span> <span class="comment">/// Different lookup criteria can find different names. For example, a</span></div>
+<div class="line"><a name="l01309"></a><span class="lineno"> 1309</span> <span class="comment">/// particular scope can have both a struct and a function of the same</span></div>
+<div class="line"><a name="l01310"></a><span class="lineno"> 1310</span> <span class="comment">/// name, and each can be found by certain lookup criteria. For more</span></div>
+<div class="line"><a name="l01311"></a><span class="lineno"> 1311</span> <span class="comment">/// information about lookup criteria, see the documentation for the</span></div>
+<div class="line"><a name="l01312"></a><span class="lineno"> 1312</span> <span class="comment">/// class LookupCriteria.</span></div>
+<div class="line"><a name="l01313"></a><span class="lineno"> 1313</span> <span class="comment">///</span></div>
+<div class="line"><a name="l01314"></a><span class="lineno"> 1314</span> <span class="comment">/// @param S        The scope from which unqualified name lookup will</span></div>
+<div class="line"><a name="l01315"></a><span class="lineno"> 1315</span> <span class="comment">/// begin. If the lookup criteria permits, name lookup may also search</span></div>
+<div class="line"><a name="l01316"></a><span class="lineno"> 1316</span> <span class="comment">/// in the parent scopes.</span></div>
+<div class="line"><a name="l01317"></a><span class="lineno"> 1317</span> <span class="comment">///</span></div>
+<div class="line"><a name="l01318"></a><span class="lineno"> 1318</span> <span class="comment">/// @param [in,out] R Specifies the lookup to perform (e.g., the name to</span></div>
+<div class="line"><a name="l01319"></a><span class="lineno"> 1319</span> <span class="comment">/// look up and the lookup kind), and is updated with the results of lookup</span></div>
+<div class="line"><a name="l01320"></a><span class="lineno"> 1320</span> <span class="comment">/// including zero or more declarations and possibly additional information</span></div>
+<div class="line"><a name="l01321"></a><span class="lineno"> 1321</span> <span class="comment">/// used to diagnose ambiguities.</span></div>
+<div class="line"><a name="l01322"></a><span class="lineno"> 1322</span> <span class="comment">///</span></div>
+<div class="line"><a name="l01323"></a><span class="lineno"> 1323</span> <span class="comment">/// @returns \c true if lookup succeeded and false otherwise.</span></div>
+<div class="line"><a name="l01324"></a><span class="lineno"><a class="code" href="classclang_1_1Sema.html#a2f533c2b73585087aaf5b2ec8e77932b"> 1324</a></span> <span class="comment"></span><span class="keywordtype">bool</span> <a class="code" href="classclang_1_1Sema.html#a2f533c2b73585087aaf5b2ec8e77932b" title="Perform unqualified name lookup starting from a given scope.">Sema::LookupName</a>(<a class="code" href="classclang_1_1LookupResult.html" title="Represents the results of name lookup.">LookupResult</a> &R, <a class="code" href="classclang_1_1Scope.html">Scope</a> *S, <span class="keywordtype">bool</span> AllowBuiltinCreation) {</div>
+<div class="line"><a name="l01325"></a><span class="lineno"> 1325</span>   <a class="code" href="classclang_1_1DeclarationName.html">DeclarationName</a> Name = R.<a class="code" href="classclang_1_1LookupResult.html#a3dd82d154e991b574d70a6a5aba8c61b" title="Gets the name to look up.">getLookupName</a>();</div>
+<div class="line"><a name="l01326"></a><span class="lineno"> 1326</span>   <span class="keywordflow">if</span> (!Name) <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l01327"></a><span class="lineno"> 1327</span> </div>
+<div class="line"><a name="l01328"></a><span class="lineno"> 1328</span>   <a class="code" href="classclang_1_1Sema.html#a0c6e994c44767e74e2892aa0235efb1a" title="Describes the kind of name lookup to perform.">LookupNameKind</a> NameKind = R.<a class="code" href="classclang_1_1LookupResult.html#a915bb2f2bfa4bd99bf3d546e6568003f" title="Gets the kind of lookup to perform.">getLookupKind</a>();</div>
+<div class="line"><a name="l01329"></a><span class="lineno"> 1329</span> </div>
+<div class="line"><a name="l01330"></a><span class="lineno"> 1330</span>   <span class="keywordflow">if</span> (!getLangOpts().<a class="code" href="namespaceclang_1_1frontend.html#a09dfa01c4e997a3794d80922c5e853bbaf89a7ac6211aecefb5f7ecc17d3ebed4">CPlusPlus</a>) {</div>
+<div class="line"><a name="l01331"></a><span class="lineno"> 1331</span>     <span class="comment">// Unqualified name lookup in C/Objective-C is purely lexical, so</span></div>
+<div class="line"><a name="l01332"></a><span class="lineno"> 1332</span>     <span class="comment">// search in the declarations attached to the name.</span></div>
+<div class="line"><a name="l01333"></a><span class="lineno"> 1333</span>     <span class="keywordflow">if</span> (NameKind == <a class="code" href="classclang_1_1Sema.html#a0c6e994c44767e74e2892aa0235efb1aa4735baa4836efba2bb5ae81bc44c0773">Sema::LookupRedeclarationWithLinkage</a>) {</div>
+<div class="line"><a name="l01334"></a><span class="lineno"> 1334</span>       <span class="comment">// Find the nearest non-transparent declaration scope.</span></div>
+<div class="line"><a name="l01335"></a><span class="lineno"> 1335</span>       <span class="keywordflow">while</span> (!(S-><a class="code" href="classclang_1_1Scope.html#a7316fa5306941f8557cc76a5c3997a45">getFlags</a>() & <a class="code" href="classclang_1_1Scope.html#afa7e82b8e23f84d0d73e27953b9afab7af9dd922f0e23495a79fc93698d6775ff" title="This is a scope that can contain a declaration. Some scopes just contain loop constructs but don't co...">Scope::DeclScope</a>) ||</div>
+<div class="line"><a name="l01336"></a><span class="lineno"> 1336</span>              (S-><a class="code" href="classclang_1_1Scope.html#a0ddcbbc7cb53f7b1f407ef68696b8d37">getEntity</a>() && S-><a class="code" href="classclang_1_1Scope.html#a0ddcbbc7cb53f7b1f407ef68696b8d37">getEntity</a>()-><a class="code" href="classclang_1_1DeclContext.html#abbf5a92a55d4faa4150ee8fd46a60345">isTransparentContext</a>()))</div>
+<div class="line"><a name="l01337"></a><span class="lineno"> 1337</span>         S = S-><a class="code" href="classclang_1_1Scope.html#a41a39e012b966ffcb2f05d41f4bdbb4b">getParent</a>();</div>
+<div class="line"><a name="l01338"></a><span class="lineno"> 1338</span>     }</div>
+<div class="line"><a name="l01339"></a><span class="lineno"> 1339</span> </div>
+<div class="line"><a name="l01340"></a><span class="lineno"> 1340</span>     <span class="comment">// When performing a scope lookup, we want to find local extern decls.</span></div>
+<div class="line"><a name="l01341"></a><span class="lineno"> 1341</span>     FindLocalExternScope FindLocals(R);</div>
+<div class="line"><a name="l01342"></a><span class="lineno"> 1342</span> </div>
+<div class="line"><a name="l01343"></a><span class="lineno"> 1343</span>     <span class="comment">// Scan up the scope chain looking for a decl that matches this</span></div>
+<div class="line"><a name="l01344"></a><span class="lineno"> 1344</span>     <span class="comment">// identifier that is in the appropriate namespace.  This search</span></div>
+<div class="line"><a name="l01345"></a><span class="lineno"> 1345</span>     <span class="comment">// should not take long, as shadowing of names is uncommon, and</span></div>
+<div class="line"><a name="l01346"></a><span class="lineno"> 1346</span>     <span class="comment">// deep shadowing is extremely uncommon.</span></div>
+<div class="line"><a name="l01347"></a><span class="lineno"> 1347</span>     <span class="keywordtype">bool</span> LeftStartingScope = <span class="keyword">false</span>;</div>
+<div class="line"><a name="l01348"></a><span class="lineno"> 1348</span> </div>
+<div class="line"><a name="l01349"></a><span class="lineno"> 1349</span>     <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1IdentifierResolver_1_1iterator.html">IdentifierResolver::iterator</a> I = IdResolver.begin(Name),</div>
+<div class="line"><a name="l01350"></a><span class="lineno"> 1350</span>                                    IEnd = IdResolver.end();</div>
+<div class="line"><a name="l01351"></a><span class="lineno"> 1351</span>          I != IEnd; ++I)</div>
+<div class="line"><a name="l01352"></a><span class="lineno"> 1352</span>       <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *D = R.<a class="code" href="classclang_1_1LookupResult.html#aaa70a0b9fc7600f4077789afeee34f63" title="Retrieve the accepted (re)declaration of the given declaration, if there is one.">getAcceptableDecl</a>(*I)) {</div>
+<div class="line"><a name="l01353"></a><span class="lineno"> 1353</span>         <span class="keywordflow">if</span> (NameKind == LookupRedeclarationWithLinkage) {</div>
+<div class="line"><a name="l01354"></a><span class="lineno"> 1354</span>           <span class="comment">// Determine whether this (or a previous) declaration is</span></div>
+<div class="line"><a name="l01355"></a><span class="lineno"> 1355</span>           <span class="comment">// out-of-scope.</span></div>
+<div class="line"><a name="l01356"></a><span class="lineno"> 1356</span>           <span class="keywordflow">if</span> (!LeftStartingScope && !S-><a class="code" href="classclang_1_1Scope.html#a704908bfa8ade9ea0ff027f1c45b0e12">isDeclScope</a>(*I))</div>
+<div class="line"><a name="l01357"></a><span class="lineno"> 1357</span>             LeftStartingScope = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l01358"></a><span class="lineno"> 1358</span> </div>
+<div class="line"><a name="l01359"></a><span class="lineno"> 1359</span>           <span class="comment">// If we found something outside of our starting scope that</span></div>
+<div class="line"><a name="l01360"></a><span class="lineno"> 1360</span>           <span class="comment">// does not have linkage, skip it.</span></div>
+<div class="line"><a name="l01361"></a><span class="lineno"> 1361</span>           <span class="keywordflow">if</span> (LeftStartingScope && !((*I)->hasLinkage())) {</div>
+<div class="line"><a name="l01362"></a><span class="lineno"> 1362</span>             R.<a class="code" href="classclang_1_1LookupResult.html#a2104cde63433a546cf8a53ffb38cc179" title="Note that we found and ignored a declaration while performing lookup.">setShadowed</a>();</div>
+<div class="line"><a name="l01363"></a><span class="lineno"> 1363</span>             <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l01364"></a><span class="lineno"> 1364</span>           }</div>
+<div class="line"><a name="l01365"></a><span class="lineno"> 1365</span>         }</div>
+<div class="line"><a name="l01366"></a><span class="lineno"> 1366</span>         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (NameKind == LookupObjCImplicitSelfParam &&</div>
+<div class="line"><a name="l01367"></a><span class="lineno"> 1367</span>                  !isa<ImplicitParamDecl>(*I))</div>
+<div class="line"><a name="l01368"></a><span class="lineno"> 1368</span>           <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l01369"></a><span class="lineno"> 1369</span> </div>
+<div class="line"><a name="l01370"></a><span class="lineno"> 1370</span>         R.<a class="code" href="classclang_1_1LookupResult.html#a62d3dbd6c56a75cad9685c81817253ac" title="Add a declaration to these results with its natural access. Does not test the acceptance criteria...">addDecl</a>(D);</div>
+<div class="line"><a name="l01371"></a><span class="lineno"> 1371</span> </div>
+<div class="line"><a name="l01372"></a><span class="lineno"> 1372</span>         <span class="comment">// Check whether there are any other declarations with the same name</span></div>
+<div class="line"><a name="l01373"></a><span class="lineno"> 1373</span>         <span class="comment">// and in the same scope.</span></div>
+<div class="line"><a name="l01374"></a><span class="lineno"> 1374</span>         <span class="keywordflow">if</span> (I != IEnd) {</div>
+<div class="line"><a name="l01375"></a><span class="lineno"> 1375</span>           <span class="comment">// Find the scope in which this declaration was declared (if it</span></div>
+<div class="line"><a name="l01376"></a><span class="lineno"> 1376</span>           <span class="comment">// actually exists in a Scope).</span></div>
+<div class="line"><a name="l01377"></a><span class="lineno"> 1377</span>           <span class="keywordflow">while</span> (S && !S-><a class="code" href="classclang_1_1Scope.html#a704908bfa8ade9ea0ff027f1c45b0e12">isDeclScope</a>(D))</div>
+<div class="line"><a name="l01378"></a><span class="lineno"> 1378</span>             S = S-><a class="code" href="classclang_1_1Scope.html#a41a39e012b966ffcb2f05d41f4bdbb4b">getParent</a>();</div>
+<div class="line"><a name="l01379"></a><span class="lineno"> 1379</span>           </div>
+<div class="line"><a name="l01380"></a><span class="lineno"> 1380</span>           <span class="comment">// If the scope containing the declaration is the translation unit,</span></div>
+<div class="line"><a name="l01381"></a><span class="lineno"> 1381</span>           <span class="comment">// then we'll need to perform our checks based on the matching</span></div>
+<div class="line"><a name="l01382"></a><span class="lineno"> 1382</span>           <span class="comment">// DeclContexts rather than matching scopes.</span></div>
+<div class="line"><a name="l01383"></a><span class="lineno"> 1383</span>           <span class="keywordflow">if</span> (S && <a class="code" href="SemaLookup_8cpp.html#a65d38506c270453f91a02a15477f8f0b">isNamespaceOrTranslationUnitScope</a>(S))</div>
+<div class="line"><a name="l01384"></a><span class="lineno"> 1384</span>             S = 0;</div>
+<div class="line"><a name="l01385"></a><span class="lineno"> 1385</span> </div>
+<div class="line"><a name="l01386"></a><span class="lineno"> 1386</span>           <span class="comment">// Compute the DeclContext, if we need it.</span></div>
+<div class="line"><a name="l01387"></a><span class="lineno"> 1387</span>           <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *DC = 0;</div>
+<div class="line"><a name="l01388"></a><span class="lineno"> 1388</span>           <span class="keywordflow">if</span> (!S)</div>
+<div class="line"><a name="l01389"></a><span class="lineno"> 1389</span>             DC = (*I)->getDeclContext()-><a class="code" href="classclang_1_1DeclContext.html#a61743ae6acff989a26641900282e6305">getRedeclContext</a>();</div>
+<div class="line"><a name="l01390"></a><span class="lineno"> 1390</span>             </div>
+<div class="line"><a name="l01391"></a><span class="lineno"> 1391</span>           <a class="code" href="classclang_1_1IdentifierResolver_1_1iterator.html">IdentifierResolver::iterator</a> LastI = I;</div>
+<div class="line"><a name="l01392"></a><span class="lineno"> 1392</span>           <span class="keywordflow">for</span> (++LastI; LastI != IEnd; ++LastI) {</div>
+<div class="line"><a name="l01393"></a><span class="lineno"> 1393</span>             <span class="keywordflow">if</span> (S) {</div>
+<div class="line"><a name="l01394"></a><span class="lineno"> 1394</span>               <span class="comment">// Match based on scope.</span></div>
+<div class="line"><a name="l01395"></a><span class="lineno"> 1395</span>               <span class="keywordflow">if</span> (!S-><a class="code" href="classclang_1_1Scope.html#a704908bfa8ade9ea0ff027f1c45b0e12">isDeclScope</a>(*LastI))</div>
+<div class="line"><a name="l01396"></a><span class="lineno"> 1396</span>                 <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l01397"></a><span class="lineno"> 1397</span>             } <span class="keywordflow">else</span> {</div>
+<div class="line"><a name="l01398"></a><span class="lineno"> 1398</span>               <span class="comment">// Match based on DeclContext.</span></div>
+<div class="line"><a name="l01399"></a><span class="lineno"> 1399</span>               <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *LastDC </div>
+<div class="line"><a name="l01400"></a><span class="lineno"> 1400</span>                 = (*LastI)->getDeclContext()-><a class="code" href="classclang_1_1DeclContext.html#a61743ae6acff989a26641900282e6305">getRedeclContext</a>();</div>
+<div class="line"><a name="l01401"></a><span class="lineno"> 1401</span>               <span class="keywordflow">if</span> (!LastDC-><a class="code" href="classclang_1_1DeclContext.html#ab26c189165e15c46df7e4c734da0b0b8" title="Determine whether this declaration context is equivalent to the declaration context DC...">Equals</a>(DC))</div>
+<div class="line"><a name="l01402"></a><span class="lineno"> 1402</span>                 <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l01403"></a><span class="lineno"> 1403</span>             }</div>
+<div class="line"><a name="l01404"></a><span class="lineno"> 1404</span> </div>
+<div class="line"><a name="l01405"></a><span class="lineno"> 1405</span>             <span class="comment">// If the declaration is in the right namespace and visible, add it.</span></div>
+<div class="line"><a name="l01406"></a><span class="lineno"> 1406</span>             <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *LastD = R.<a class="code" href="classclang_1_1LookupResult.html#aaa70a0b9fc7600f4077789afeee34f63" title="Retrieve the accepted (re)declaration of the given declaration, if there is one.">getAcceptableDecl</a>(*LastI))</div>
+<div class="line"><a name="l01407"></a><span class="lineno"> 1407</span>               R.<a class="code" href="classclang_1_1LookupResult.html#a62d3dbd6c56a75cad9685c81817253ac" title="Add a declaration to these results with its natural access. Does not test the acceptance criteria...">addDecl</a>(LastD);</div>
+<div class="line"><a name="l01408"></a><span class="lineno"> 1408</span>           }</div>
+<div class="line"><a name="l01409"></a><span class="lineno"> 1409</span> </div>
+<div class="line"><a name="l01410"></a><span class="lineno"> 1410</span>           R.<a class="code" href="classclang_1_1LookupResult.html#a7bca9f6ca6b6a32dca0ac2dfc8568261" title="Resolves the result kind of the lookup, possibly hiding decls.">resolveKind</a>();</div>
+<div class="line"><a name="l01411"></a><span class="lineno"> 1411</span>         }</div>
+<div class="line"><a name="l01412"></a><span class="lineno"> 1412</span> </div>
+<div class="line"><a name="l01413"></a><span class="lineno"> 1413</span>         <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
+<div class="line"><a name="l01414"></a><span class="lineno"> 1414</span>       }</div>
+<div class="line"><a name="l01415"></a><span class="lineno"> 1415</span>   } <span class="keywordflow">else</span> {</div>
+<div class="line"><a name="l01416"></a><span class="lineno"> 1416</span>     <span class="comment">// Perform C++ unqualified name lookup.</span></div>
+<div class="line"><a name="l01417"></a><span class="lineno"> 1417</span>     <span class="keywordflow">if</span> (CppLookupName(R, S))</div>
+<div class="line"><a name="l01418"></a><span class="lineno"> 1418</span>       <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
+<div class="line"><a name="l01419"></a><span class="lineno"> 1419</span>   }</div>
+<div class="line"><a name="l01420"></a><span class="lineno"> 1420</span> </div>
+<div class="line"><a name="l01421"></a><span class="lineno"> 1421</span>   <span class="comment">// If we didn't find a use of this identifier, and if the identifier</span></div>
+<div class="line"><a name="l01422"></a><span class="lineno"> 1422</span>   <span class="comment">// corresponds to a compiler builtin, create the decl object for the builtin</span></div>
+<div class="line"><a name="l01423"></a><span class="lineno"> 1423</span>   <span class="comment">// now, injecting it into translation unit scope, and return it.</span></div>
+<div class="line"><a name="l01424"></a><span class="lineno"> 1424</span>   <span class="keywordflow">if</span> (AllowBuiltinCreation && <a class="code" href="SemaLookup_8cpp.html#a1494a9e94162edb9a43261fcc0f61f85" title="Lookup a builtin function, when name lookup would otherwise fail.">LookupBuiltin</a>(*<span class="keyword">this</span>, R))</div>
+<div class="line"><a name="l01425"></a><span class="lineno"> 1425</span>     <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
+<div class="line"><a name="l01426"></a><span class="lineno"> 1426</span> </div>
+<div class="line"><a name="l01427"></a><span class="lineno"> 1427</span>   <span class="comment">// If we didn't find a use of this identifier, the ExternalSource </span></div>
+<div class="line"><a name="l01428"></a><span class="lineno"> 1428</span>   <span class="comment">// may be able to handle the situation. </span></div>
+<div class="line"><a name="l01429"></a><span class="lineno"> 1429</span>   <span class="comment">// Note: some lookup failures are expected!</span></div>
+<div class="line"><a name="l01430"></a><span class="lineno"> 1430</span>   <span class="comment">// See e.g. R.isForRedeclaration().</span></div>
+<div class="line"><a name="l01431"></a><span class="lineno"> 1431</span>   <span class="keywordflow">return</span> (ExternalSource && ExternalSource->LookupUnqualified(R, S));</div>
+<div class="line"><a name="l01432"></a><span class="lineno"> 1432</span> }</div>
+<div class="line"><a name="l01433"></a><span class="lineno"> 1433</span> <span class="comment"></span></div>
+<div class="line"><a name="l01434"></a><span class="lineno"> 1434</span> <span class="comment">/// @brief Perform qualified name lookup in the namespaces nominated by</span></div>
+<div class="line"><a name="l01435"></a><span class="lineno"> 1435</span> <span class="comment">/// using directives by the given context.</span></div>
+<div class="line"><a name="l01436"></a><span class="lineno"> 1436</span> <span class="comment">///</span></div>
+<div class="line"><a name="l01437"></a><span class="lineno"> 1437</span> <span class="comment">/// C++98 [namespace.qual]p2:</span></div>
+<div class="line"><a name="l01438"></a><span class="lineno"> 1438</span> <span class="comment">///   Given X::m (where X is a user-declared namespace), or given \::m</span></div>
+<div class="line"><a name="l01439"></a><span class="lineno"> 1439</span> <span class="comment">///   (where X is the global namespace), let S be the set of all</span></div>
+<div class="line"><a name="l01440"></a><span class="lineno"> 1440</span> <span class="comment">///   declarations of m in X and in the transitive closure of all</span></div>
+<div class="line"><a name="l01441"></a><span class="lineno"> 1441</span> <span class="comment">///   namespaces nominated by using-directives in X and its used</span></div>
+<div class="line"><a name="l01442"></a><span class="lineno"> 1442</span> <span class="comment">///   namespaces, except that using-directives are ignored in any</span></div>
+<div class="line"><a name="l01443"></a><span class="lineno"> 1443</span> <span class="comment">///   namespace, including X, directly containing one or more</span></div>
+<div class="line"><a name="l01444"></a><span class="lineno"> 1444</span> <span class="comment">///   declarations of m. No namespace is searched more than once in</span></div>
+<div class="line"><a name="l01445"></a><span class="lineno"> 1445</span> <span class="comment">///   the lookup of a name. If S is the empty set, the program is</span></div>
+<div class="line"><a name="l01446"></a><span class="lineno"> 1446</span> <span class="comment">///   ill-formed. Otherwise, if S has exactly one member, or if the</span></div>
+<div class="line"><a name="l01447"></a><span class="lineno"> 1447</span> <span class="comment">///   context of the reference is a using-declaration</span></div>
+<div class="line"><a name="l01448"></a><span class="lineno"> 1448</span> <span class="comment">///   (namespace.udecl), S is the required set of declarations of</span></div>
+<div class="line"><a name="l01449"></a><span class="lineno"> 1449</span> <span class="comment">///   m. Otherwise if the use of m is not one that allows a unique</span></div>
+<div class="line"><a name="l01450"></a><span class="lineno"> 1450</span> <span class="comment">///   declaration to be chosen from S, the program is ill-formed.</span></div>
+<div class="line"><a name="l01451"></a><span class="lineno"> 1451</span> <span class="comment">///</span></div>
+<div class="line"><a name="l01452"></a><span class="lineno"> 1452</span> <span class="comment">/// C++98 [namespace.qual]p5:</span></div>
+<div class="line"><a name="l01453"></a><span class="lineno"> 1453</span> <span class="comment">///   During the lookup of a qualified namespace member name, if the</span></div>
+<div class="line"><a name="l01454"></a><span class="lineno"> 1454</span> <span class="comment">///   lookup finds more than one declaration of the member, and if one</span></div>
+<div class="line"><a name="l01455"></a><span class="lineno"> 1455</span> <span class="comment">///   declaration introduces a class name or enumeration name and the</span></div>
+<div class="line"><a name="l01456"></a><span class="lineno"> 1456</span> <span class="comment">///   other declarations either introduce the same object, the same</span></div>
+<div class="line"><a name="l01457"></a><span class="lineno"> 1457</span> <span class="comment">///   enumerator or a set of functions, the non-type name hides the</span></div>
+<div class="line"><a name="l01458"></a><span class="lineno"> 1458</span> <span class="comment">///   class or enumeration name if and only if the declarations are</span></div>
+<div class="line"><a name="l01459"></a><span class="lineno"> 1459</span> <span class="comment">///   from the same namespace; otherwise (the declarations are from</span></div>
+<div class="line"><a name="l01460"></a><span class="lineno"> 1460</span> <span class="comment">///   different namespaces), the program is ill-formed.</span></div>
+<div class="line"><a name="l01461"></a><span class="lineno"><a class="code" href="SemaLookup_8cpp.html#a6d7246bd544e19c5f169ed477bae2a00"> 1461</a></span> <span class="comment"></span><span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="SemaLookup_8cpp.html#a6d7246bd544e19c5f169ed477bae2a00" title="Perform qualified name lookup in the namespaces nominated by using directives by the given context...">LookupQualifiedNameInUsingDirectives</a>(<a class="code" href="classclang_1_1Sema.html" title="Sema - This implements semantic analysis and AST building for C.">Sema</a> &S, <a class="code" href="classclang_1_1LookupResult.html" title="Represents the results of name lookup.">LookupResult</a> &R,</div>
+<div class="line"><a name="l01462"></a><span class="lineno"> 1462</span>                                                  <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *StartDC) {</div>
+<div class="line"><a name="l01463"></a><span class="lineno"> 1463</span>   assert(StartDC-><a class="code" href="classclang_1_1DeclContext.html#ac33a346d4e8db5e892aba87393f4e8e4">isFileContext</a>() && <span class="stringliteral">"start context is not a file context"</span>);</div>
+<div class="line"><a name="l01464"></a><span class="lineno"> 1464</span> </div>
+<div class="line"><a name="l01465"></a><span class="lineno"> 1465</span>   <a class="code" href="classclang_1_1DeclContext.html#a073bdd3d5bbee972cf008ebb15d50bbe">DeclContext::udir_iterator</a> I = StartDC-><a class="code" href="classclang_1_1DeclContext.html#a9cbcfa6df07be3438c915e48778ab157">using_directives_begin</a>();</div>
+<div class="line"><a name="l01466"></a><span class="lineno"> 1466</span>   <a class="code" href="classclang_1_1DeclContext.html#a073bdd3d5bbee972cf008ebb15d50bbe">DeclContext::udir_iterator</a> E = StartDC-><a class="code" href="classclang_1_1DeclContext.html#a84dac0322b02d7451361ca84d9e999b3">using_directives_end</a>();</div>
+<div class="line"><a name="l01467"></a><span class="lineno"> 1467</span> </div>
+<div class="line"><a name="l01468"></a><span class="lineno"> 1468</span>   <span class="keywordflow">if</span> (I == E) <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l01469"></a><span class="lineno"> 1469</span> </div>
+<div class="line"><a name="l01470"></a><span class="lineno"> 1470</span>   <span class="comment">// We have at least added all these contexts to the queue.</span></div>
+<div class="line"><a name="l01471"></a><span class="lineno"> 1471</span>   llvm::SmallPtrSet<DeclContext*, 8> Visited;</div>
+<div class="line"><a name="l01472"></a><span class="lineno"> 1472</span>   Visited.insert(StartDC);</div>
+<div class="line"><a name="l01473"></a><span class="lineno"> 1473</span> </div>
+<div class="line"><a name="l01474"></a><span class="lineno"> 1474</span>   <span class="comment">// We have not yet looked into these namespaces, much less added</span></div>
+<div class="line"><a name="l01475"></a><span class="lineno"> 1475</span>   <span class="comment">// their "using-children" to the queue.</span></div>
+<div class="line"><a name="l01476"></a><span class="lineno"> 1476</span>   <a class="code" href="classllvm_1_1SmallVector.html">SmallVector<NamespaceDecl*, 8></a> Queue;</div>
+<div class="line"><a name="l01477"></a><span class="lineno"> 1477</span> </div>
+<div class="line"><a name="l01478"></a><span class="lineno"> 1478</span>   <span class="comment">// We have already looked into the initial namespace; seed the queue</span></div>
+<div class="line"><a name="l01479"></a><span class="lineno"> 1479</span>   <span class="comment">// with its using-children.</span></div>
+<div class="line"><a name="l01480"></a><span class="lineno"> 1480</span>   <span class="keywordflow">for</span> (; I != E; ++I) {</div>
+<div class="line"><a name="l01481"></a><span class="lineno"> 1481</span>     <a class="code" href="classclang_1_1NamespaceDecl.html" title="NamespaceDecl - Represent a C++ namespace.">NamespaceDecl</a> *ND = (*I)->getNominatedNamespace()-><a class="code" href="classclang_1_1NamespaceDecl.html#ae1a5d3499ed235611ba054da2ca9dd2a" title="Get the original (first) namespace declaration.">getOriginalNamespace</a>();</div>
+<div class="line"><a name="l01482"></a><span class="lineno"> 1482</span>     <span class="keywordflow">if</span> (Visited.insert(ND))</div>
+<div class="line"><a name="l01483"></a><span class="lineno"> 1483</span>       Queue.push_back(ND);</div>
+<div class="line"><a name="l01484"></a><span class="lineno"> 1484</span>   }</div>
+<div class="line"><a name="l01485"></a><span class="lineno"> 1485</span> </div>
+<div class="line"><a name="l01486"></a><span class="lineno"> 1486</span>   <span class="comment">// The easiest way to implement the restriction in [namespace.qual]p5</span></div>
+<div class="line"><a name="l01487"></a><span class="lineno"> 1487</span>   <span class="comment">// is to check whether any of the individual results found a tag</span></div>
+<div class="line"><a name="l01488"></a><span class="lineno"> 1488</span>   <span class="comment">// and, if so, to declare an ambiguity if the final result is not</span></div>
+<div class="line"><a name="l01489"></a><span class="lineno"> 1489</span>   <span class="comment">// a tag.</span></div>
+<div class="line"><a name="l01490"></a><span class="lineno"> 1490</span>   <span class="keywordtype">bool</span> FoundTag = <span class="keyword">false</span>;</div>
+<div class="line"><a name="l01491"></a><span class="lineno"> 1491</span>   <span class="keywordtype">bool</span> FoundNonTag = <span class="keyword">false</span>;</div>
+<div class="line"><a name="l01492"></a><span class="lineno"> 1492</span> </div>
+<div class="line"><a name="l01493"></a><span class="lineno"> 1493</span>   <a class="code" href="classclang_1_1LookupResult.html" title="Represents the results of name lookup.">LookupResult</a> LocalR(<a class="code" href="classclang_1_1LookupResult.html#adf8be6c5a22715b22597dafb15a05358a1ce28b133923c6fdcb97135d96f839a1">LookupResult::Temporary</a>, R);</div>
+<div class="line"><a name="l01494"></a><span class="lineno"> 1494</span> </div>
+<div class="line"><a name="l01495"></a><span class="lineno"> 1495</span>   <span class="keywordtype">bool</span> Found = <span class="keyword">false</span>;</div>
+<div class="line"><a name="l01496"></a><span class="lineno"> 1496</span>   <span class="keywordflow">while</span> (!Queue.empty()) {</div>
+<div class="line"><a name="l01497"></a><span class="lineno"> 1497</span>     <a class="code" href="classclang_1_1NamespaceDecl.html" title="NamespaceDecl - Represent a C++ namespace.">NamespaceDecl</a> *ND = Queue.pop_back_val();</div>
+<div class="line"><a name="l01498"></a><span class="lineno"> 1498</span> </div>
+<div class="line"><a name="l01499"></a><span class="lineno"> 1499</span>     <span class="comment">// We go through some convolutions here to avoid copying results</span></div>
+<div class="line"><a name="l01500"></a><span class="lineno"> 1500</span>     <span class="comment">// between LookupResults.</span></div>
+<div class="line"><a name="l01501"></a><span class="lineno"> 1501</span>     <span class="keywordtype">bool</span> UseLocal = !R.<a class="code" href="classclang_1_1LookupResult.html#a9f44c1cd9d9c7e84dd0202538dd72cd7" title="Return true if no decls were found.">empty</a>();</div>
+<div class="line"><a name="l01502"></a><span class="lineno"> 1502</span>     <a class="code" href="classclang_1_1LookupResult.html" title="Represents the results of name lookup.">LookupResult</a> &DirectR = UseLocal ? LocalR : R;</div>
+<div class="line"><a name="l01503"></a><span class="lineno"> 1503</span>     <span class="keywordtype">bool</span> FoundDirect = <a class="code" href="SemaLookup_8cpp.html#a70b03be68c3669d7d3cbbbe57cce89b7">LookupDirect</a>(S, DirectR, ND);</div>
+<div class="line"><a name="l01504"></a><span class="lineno"> 1504</span> </div>
+<div class="line"><a name="l01505"></a><span class="lineno"> 1505</span>     <span class="keywordflow">if</span> (FoundDirect) {</div>
+<div class="line"><a name="l01506"></a><span class="lineno"> 1506</span>       <span class="comment">// First do any local hiding.</span></div>
+<div class="line"><a name="l01507"></a><span class="lineno"> 1507</span>       DirectR.<a class="code" href="classclang_1_1LookupResult.html#a7bca9f6ca6b6a32dca0ac2dfc8568261" title="Resolves the result kind of the lookup, possibly hiding decls.">resolveKind</a>();</div>
+<div class="line"><a name="l01508"></a><span class="lineno"> 1508</span> </div>
+<div class="line"><a name="l01509"></a><span class="lineno"> 1509</span>       <span class="comment">// If the local result is a tag, remember that.</span></div>
+<div class="line"><a name="l01510"></a><span class="lineno"> 1510</span>       <span class="keywordflow">if</span> (DirectR.<a class="code" href="classclang_1_1LookupResult.html#a5859f12d68771a76457af5b6bd236594" title="Asks if the result is a single tag decl.">isSingleTagDecl</a>())</div>
+<div class="line"><a name="l01511"></a><span class="lineno"> 1511</span>         FoundTag = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l01512"></a><span class="lineno"> 1512</span>       <span class="keywordflow">else</span></div>
+<div class="line"><a name="l01513"></a><span class="lineno"> 1513</span>         FoundNonTag = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l01514"></a><span class="lineno"> 1514</span> </div>
+<div class="line"><a name="l01515"></a><span class="lineno"> 1515</span>       <span class="comment">// Append the local results to the total results if necessary.</span></div>
+<div class="line"><a name="l01516"></a><span class="lineno"> 1516</span>       <span class="keywordflow">if</span> (UseLocal) {</div>
+<div class="line"><a name="l01517"></a><span class="lineno"> 1517</span>         R.<a class="code" href="classclang_1_1LookupResult.html#a14dbb8a7dc5f6b9a4d125c0e46c236da" title="Add all the declarations from another set of lookup results.">addAllDecls</a>(LocalR);</div>
+<div class="line"><a name="l01518"></a><span class="lineno"> 1518</span>         LocalR.<a class="code" href="classclang_1_1LookupResult.html#a66106ede3de224099b3d0bdef5e0094e" title="Clears out any current state.">clear</a>();</div>
+<div class="line"><a name="l01519"></a><span class="lineno"> 1519</span>       }</div>
+<div class="line"><a name="l01520"></a><span class="lineno"> 1520</span>     }</div>
+<div class="line"><a name="l01521"></a><span class="lineno"> 1521</span> </div>
+<div class="line"><a name="l01522"></a><span class="lineno"> 1522</span>     <span class="comment">// If we find names in this namespace, ignore its using directives.</span></div>
+<div class="line"><a name="l01523"></a><span class="lineno"> 1523</span>     <span class="keywordflow">if</span> (FoundDirect) {</div>
+<div class="line"><a name="l01524"></a><span class="lineno"> 1524</span>       Found = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l01525"></a><span class="lineno"> 1525</span>       <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l01526"></a><span class="lineno"> 1526</span>     }</div>
+<div class="line"><a name="l01527"></a><span class="lineno"> 1527</span> </div>
+<div class="line"><a name="l01528"></a><span class="lineno"> 1528</span>     <span class="keywordflow">for</span> (llvm::tie(I,E) = ND-><a class="code" href="classclang_1_1DeclContext.html#a4d67d5fc4d4038c838d14e728250057d">getUsingDirectives</a>(); I != E; ++I) {</div>
+<div class="line"><a name="l01529"></a><span class="lineno"> 1529</span>       <a class="code" href="classclang_1_1NamespaceDecl.html" title="NamespaceDecl - Represent a C++ namespace.">NamespaceDecl</a> *Nom = (*I)->getNominatedNamespace();</div>
+<div class="line"><a name="l01530"></a><span class="lineno"> 1530</span>       <span class="keywordflow">if</span> (Visited.insert(Nom))</div>
+<div class="line"><a name="l01531"></a><span class="lineno"> 1531</span>         Queue.push_back(Nom);</div>
+<div class="line"><a name="l01532"></a><span class="lineno"> 1532</span>     }</div>
+<div class="line"><a name="l01533"></a><span class="lineno"> 1533</span>   }</div>
+<div class="line"><a name="l01534"></a><span class="lineno"> 1534</span> </div>
+<div class="line"><a name="l01535"></a><span class="lineno"> 1535</span>   <span class="keywordflow">if</span> (Found) {</div>
+<div class="line"><a name="l01536"></a><span class="lineno"> 1536</span>     <span class="keywordflow">if</span> (FoundTag && FoundNonTag)</div>
+<div class="line"><a name="l01537"></a><span class="lineno"> 1537</span>       R.<a class="code" href="classclang_1_1LookupResult.html#a5cb7f7010cc6a7c3911106bbc5f9581d" title="Make these results show that the name was found in different contexts and a tag decl was hidden by an...">setAmbiguousQualifiedTagHiding</a>();</div>
+<div class="line"><a name="l01538"></a><span class="lineno"> 1538</span>     <span class="keywordflow">else</span></div>
+<div class="line"><a name="l01539"></a><span class="lineno"> 1539</span>       R.<a class="code" href="classclang_1_1LookupResult.html#a7bca9f6ca6b6a32dca0ac2dfc8568261" title="Resolves the result kind of the lookup, possibly hiding decls.">resolveKind</a>();</div>
+<div class="line"><a name="l01540"></a><span class="lineno"> 1540</span>   }</div>
+<div class="line"><a name="l01541"></a><span class="lineno"> 1541</span> </div>
+<div class="line"><a name="l01542"></a><span class="lineno"> 1542</span>   <span class="keywordflow">return</span> Found;</div>
+<div class="line"><a name="l01543"></a><span class="lineno"> 1543</span> }</div>
+<div class="line"><a name="l01544"></a><span class="lineno"> 1544</span> <span class="comment"></span></div>
+<div class="line"><a name="l01545"></a><span class="lineno"> 1545</span> <span class="comment">/// \brief Callback that looks for any member of a class with the given name.</span></div>
+<div class="line"><a name="l01546"></a><span class="lineno"><a class="code" href="SemaLookup_8cpp.html#ad9b9762984930f366b8bbf50d67a8b18"> 1546</a></span> <span class="comment"></span><span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="SemaLookup_8cpp.html#ad9b9762984930f366b8bbf50d67a8b18" title="Callback that looks for any member of a class with the given name.">LookupAnyMember</a>(<span class="keyword">const</span> <a class="code" href="classclang_1_1CXXBaseSpecifier.html" title="Represents a base class of a C++ class.">CXXBaseSpecifier</a> *Specifier,</div>
+<div class="line"><a name="l01547"></a><span class="lineno"> 1547</span>                             <a class="code" href="classclang_1_1CXXBasePath.html" title="Represents a path from a specific derived class (which is not represented as part of the path) to a p...">CXXBasePath</a> &Path,</div>
+<div class="line"><a name="l01548"></a><span class="lineno"> 1548</span>                             <span class="keywordtype">void</span> *Name) {</div>
+<div class="line"><a name="l01549"></a><span class="lineno"> 1549</span>   <a class="code" href="classclang_1_1RecordDecl.html">RecordDecl</a> *BaseRecord = Specifier-><a class="code" href="classclang_1_1CXXBaseSpecifier.html#a4e9241e65b4b20b372902d0873a9d838" title="Retrieves the type of the base class.">getType</a>()-><a class="code" href="classclang_1_1Type.html#a12103ea8bee9506930287bab68a08569">getAs</a><<a class="code" href="classclang_1_1RecordType.html">RecordType</a>>()->getDecl();</div>
+<div class="line"><a name="l01550"></a><span class="lineno"> 1550</span> </div>
+<div class="line"><a name="l01551"></a><span class="lineno"> 1551</span>   <a class="code" href="classclang_1_1DeclarationName.html">DeclarationName</a> N = <a class="code" href="classclang_1_1DeclarationName.html#a25f11ea089f53218b4bff04f5d426114">DeclarationName::getFromOpaquePtr</a>(Name);</div>
+<div class="line"><a name="l01552"></a><span class="lineno"> 1552</span>   Path.<a class="code" href="classclang_1_1CXXBasePath.html#a4f91fc1d70809e67e659ff4b98e8f8ce" title="The set of declarations found inside this base class subobject.">Decls</a> = BaseRecord-><a class="code" href="classclang_1_1DeclContext.html#a0916b364472e2acc42122885e087222b">lookup</a>(N);</div>
+<div class="line"><a name="l01553"></a><span class="lineno"> 1553</span>   <span class="keywordflow">return</span> !Path.<a class="code" href="classclang_1_1CXXBasePath.html#a4f91fc1d70809e67e659ff4b98e8f8ce" title="The set of declarations found inside this base class subobject.">Decls</a>.empty();</div>
+<div class="line"><a name="l01554"></a><span class="lineno"> 1554</span> }</div>
+<div class="line"><a name="l01555"></a><span class="lineno"> 1555</span> <span class="comment"></span></div>
+<div class="line"><a name="l01556"></a><span class="lineno"> 1556</span> <span class="comment">/// \brief Determine whether the given set of member declarations contains only</span></div>
+<div class="line"><a name="l01557"></a><span class="lineno"> 1557</span> <span class="comment">/// static members, nested types, and enumerators.</span></div>
+<div class="line"><a name="l01558"></a><span class="lineno"> 1558</span> <span class="comment"></span><span class="keyword">template</span><<span class="keyword">typename</span> InputIterator></div>
+<div class="line"><a name="l01559"></a><span class="lineno"><a class="code" href="SemaLookup_8cpp.html#a44cf2f14dbcb0d87081caa387fc05c8d"> 1559</a></span> <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="SemaLookup_8cpp.html#a44cf2f14dbcb0d87081caa387fc05c8d" title="Determine whether the given set of member declarations contains only static members, nested types, and enumerators.">HasOnlyStaticMembers</a>(InputIterator First, InputIterator <a class="code" href="namespaceclang_1_1LangAS.html#a78ee38b55acb7cc806cb61e6d2a9f960a266d73bc4ca20907a5df65ca32193720">Last</a>) {</div>
+<div class="line"><a name="l01560"></a><span class="lineno"> 1560</span>   <a class="code" href="classclang_1_1Decl.html">Decl</a> *D = (*First)-><a class="code" href="classclang_1_1NamedDecl.html#a8fee30304b9ae8b24136a279b678b951" title="Looks through UsingDecls and ObjCCompatibleAliasDecls for the underlying named decl.">getUnderlyingDecl</a>();</div>
+<div class="line"><a name="l01561"></a><span class="lineno"> 1561</span>   <span class="keywordflow">if</span> (isa<VarDecl>(D) || isa<TypeDecl>(D) || isa<EnumConstantDecl>(D))</div>
+<div class="line"><a name="l01562"></a><span class="lineno"> 1562</span>     <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
+<div class="line"><a name="l01563"></a><span class="lineno"> 1563</span> </div>
+<div class="line"><a name="l01564"></a><span class="lineno"> 1564</span>   <span class="keywordflow">if</span> (isa<CXXMethodDecl>(D)) {</div>
+<div class="line"><a name="l01565"></a><span class="lineno"> 1565</span>     <span class="comment">// Determine whether all of the methods are static.</span></div>
+<div class="line"><a name="l01566"></a><span class="lineno"> 1566</span>     <span class="keywordtype">bool</span> AllMethodsAreStatic = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l01567"></a><span class="lineno"> 1567</span>     <span class="keywordflow">for</span>(; First != <a class="code" href="namespaceclang_1_1LangAS.html#a78ee38b55acb7cc806cb61e6d2a9f960a266d73bc4ca20907a5df65ca32193720">Last</a>; ++First) {</div>
+<div class="line"><a name="l01568"></a><span class="lineno"> 1568</span>       D = (*First)->getUnderlyingDecl();</div>
+<div class="line"><a name="l01569"></a><span class="lineno"> 1569</span> </div>
+<div class="line"><a name="l01570"></a><span class="lineno"> 1570</span>       <span class="keywordflow">if</span> (!isa<CXXMethodDecl>(D)) {</div>
+<div class="line"><a name="l01571"></a><span class="lineno"> 1571</span>         assert(isa<TagDecl>(D) && <span class="stringliteral">"Non-function must be a tag decl"</span>);</div>
+<div class="line"><a name="l01572"></a><span class="lineno"> 1572</span>         <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l01573"></a><span class="lineno"> 1573</span>       }</div>
+<div class="line"><a name="l01574"></a><span class="lineno"> 1574</span> </div>
+<div class="line"><a name="l01575"></a><span class="lineno"> 1575</span>       <span class="keywordflow">if</span> (!cast<CXXMethodDecl>(D)->isStatic()) {</div>
+<div class="line"><a name="l01576"></a><span class="lineno"> 1576</span>         AllMethodsAreStatic = <span class="keyword">false</span>;</div>
+<div class="line"><a name="l01577"></a><span class="lineno"> 1577</span>         <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l01578"></a><span class="lineno"> 1578</span>       }</div>
+<div class="line"><a name="l01579"></a><span class="lineno"> 1579</span>     }</div>
+<div class="line"><a name="l01580"></a><span class="lineno"> 1580</span> </div>
+<div class="line"><a name="l01581"></a><span class="lineno"> 1581</span>     <span class="keywordflow">if</span> (AllMethodsAreStatic)</div>
+<div class="line"><a name="l01582"></a><span class="lineno"> 1582</span>       <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
+<div class="line"><a name="l01583"></a><span class="lineno"> 1583</span>   }</div>
+<div class="line"><a name="l01584"></a><span class="lineno"> 1584</span> </div>
+<div class="line"><a name="l01585"></a><span class="lineno"> 1585</span>   <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l01586"></a><span class="lineno"> 1586</span> }</div>
+<div class="line"><a name="l01587"></a><span class="lineno"> 1587</span> <span class="comment"></span></div>
+<div class="line"><a name="l01588"></a><span class="lineno"> 1588</span> <span class="comment">/// \brief Perform qualified name lookup into a given context.</span></div>
+<div class="line"><a name="l01589"></a><span class="lineno"> 1589</span> <span class="comment">///</span></div>
+<div class="line"><a name="l01590"></a><span class="lineno"> 1590</span> <span class="comment">/// Qualified name lookup (C++ [basic.lookup.qual]) is used to find</span></div>
+<div class="line"><a name="l01591"></a><span class="lineno"> 1591</span> <span class="comment">/// names when the context of those names is explicit specified, e.g.,</span></div>
+<div class="line"><a name="l01592"></a><span class="lineno"> 1592</span> <span class="comment">/// "std::vector" or "x->member", or as part of unqualified name lookup.</span></div>
+<div class="line"><a name="l01593"></a><span class="lineno"> 1593</span> <span class="comment">///</span></div>
+<div class="line"><a name="l01594"></a><span class="lineno"> 1594</span> <span class="comment">/// Different lookup criteria can find different names. For example, a</span></div>
+<div class="line"><a name="l01595"></a><span class="lineno"> 1595</span> <span class="comment">/// particular scope can have both a struct and a function of the same</span></div>
+<div class="line"><a name="l01596"></a><span class="lineno"> 1596</span> <span class="comment">/// name, and each can be found by certain lookup criteria. For more</span></div>
+<div class="line"><a name="l01597"></a><span class="lineno"> 1597</span> <span class="comment">/// information about lookup criteria, see the documentation for the</span></div>
+<div class="line"><a name="l01598"></a><span class="lineno"> 1598</span> <span class="comment">/// class LookupCriteria.</span></div>
+<div class="line"><a name="l01599"></a><span class="lineno"> 1599</span> <span class="comment">///</span></div>
+<div class="line"><a name="l01600"></a><span class="lineno"> 1600</span> <span class="comment">/// \param R captures both the lookup criteria and any lookup results found.</span></div>
+<div class="line"><a name="l01601"></a><span class="lineno"> 1601</span> <span class="comment">///</span></div>
+<div class="line"><a name="l01602"></a><span class="lineno"> 1602</span> <span class="comment">/// \param LookupCtx The context in which qualified name lookup will</span></div>
+<div class="line"><a name="l01603"></a><span class="lineno"> 1603</span> <span class="comment">/// search. If the lookup criteria permits, name lookup may also search</span></div>
+<div class="line"><a name="l01604"></a><span class="lineno"> 1604</span> <span class="comment">/// in the parent contexts or (for C++ classes) base classes.</span></div>
+<div class="line"><a name="l01605"></a><span class="lineno"> 1605</span> <span class="comment">///</span></div>
+<div class="line"><a name="l01606"></a><span class="lineno"> 1606</span> <span class="comment">/// \param InUnqualifiedLookup true if this is qualified name lookup that</span></div>
+<div class="line"><a name="l01607"></a><span class="lineno"> 1607</span> <span class="comment">/// occurs as part of unqualified name lookup.</span></div>
+<div class="line"><a name="l01608"></a><span class="lineno"> 1608</span> <span class="comment">///</span></div>
+<div class="line"><a name="l01609"></a><span class="lineno"> 1609</span> <span class="comment">/// \returns true if lookup succeeded, false if it failed.</span></div>
+<div class="line"><a name="l01610"></a><span class="lineno"><a class="code" href="classclang_1_1Sema.html#ac5f5d2a5b4d98cf9d59b45044b83fd53"> 1610</a></span> <span class="comment"></span><span class="keywordtype">bool</span> <a class="code" href="classclang_1_1Sema.html#ac5f5d2a5b4d98cf9d59b45044b83fd53" title="Perform qualified name lookup into a given context.">Sema::LookupQualifiedName</a>(<a class="code" href="classclang_1_1LookupResult.html" title="Represents the results of name lookup.">LookupResult</a> &R, <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *LookupCtx,</div>
+<div class="line"><a name="l01611"></a><span class="lineno"> 1611</span>                                <span class="keywordtype">bool</span> InUnqualifiedLookup) {</div>
+<div class="line"><a name="l01612"></a><span class="lineno"> 1612</span>   assert(LookupCtx && <span class="stringliteral">"Sema::LookupQualifiedName requires a lookup context"</span>);</div>
+<div class="line"><a name="l01613"></a><span class="lineno"> 1613</span> </div>
+<div class="line"><a name="l01614"></a><span class="lineno"> 1614</span>   <span class="keywordflow">if</span> (!R.<a class="code" href="classclang_1_1LookupResult.html#a3dd82d154e991b574d70a6a5aba8c61b" title="Gets the name to look up.">getLookupName</a>())</div>
+<div class="line"><a name="l01615"></a><span class="lineno"> 1615</span>     <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l01616"></a><span class="lineno"> 1616</span> </div>
+<div class="line"><a name="l01617"></a><span class="lineno"> 1617</span>   <span class="comment">// Make sure that the declaration context is complete.</span></div>
+<div class="line"><a name="l01618"></a><span class="lineno"> 1618</span>   assert((!isa<TagDecl>(LookupCtx) ||</div>
+<div class="line"><a name="l01619"></a><span class="lineno"> 1619</span>           LookupCtx-><a class="code" href="classclang_1_1DeclContext.html#a0d06ccd1db1b1f60e91d95d50aeae75d" title="Determines whether this context is dependent on a template parameter.">isDependentContext</a>() ||</div>
+<div class="line"><a name="l01620"></a><span class="lineno"> 1620</span>           cast<TagDecl>(LookupCtx)->isCompleteDefinition() ||</div>
+<div class="line"><a name="l01621"></a><span class="lineno"> 1621</span>           cast<TagDecl>(LookupCtx)->isBeingDefined()) &&</div>
+<div class="line"><a name="l01622"></a><span class="lineno"> 1622</span>          <span class="stringliteral">"Declaration context must already be complete!"</span>);</div>
+<div class="line"><a name="l01623"></a><span class="lineno"> 1623</span> </div>
+<div class="line"><a name="l01624"></a><span class="lineno"> 1624</span>   <span class="comment">// Perform qualified name lookup into the LookupCtx.</span></div>
+<div class="line"><a name="l01625"></a><span class="lineno"> 1625</span>   <span class="keywordflow">if</span> (<a class="code" href="SemaLookup_8cpp.html#a70b03be68c3669d7d3cbbbe57cce89b7">LookupDirect</a>(*<span class="keyword">this</span>, R, LookupCtx)) {</div>
+<div class="line"><a name="l01626"></a><span class="lineno"> 1626</span>     R.<a class="code" href="classclang_1_1LookupResult.html#a7bca9f6ca6b6a32dca0ac2dfc8568261" title="Resolves the result kind of the lookup, possibly hiding decls.">resolveKind</a>();</div>
+<div class="line"><a name="l01627"></a><span class="lineno"> 1627</span>     <span class="keywordflow">if</span> (isa<CXXRecordDecl>(LookupCtx))</div>
+<div class="line"><a name="l01628"></a><span class="lineno"> 1628</span>       R.<a class="code" href="classclang_1_1LookupResult.html#ad1d4eafe95062716cb844784976df165" title="Sets the 'naming class' for this lookup.">setNamingClass</a>(cast<CXXRecordDecl>(LookupCtx));</div>
+<div class="line"><a name="l01629"></a><span class="lineno"> 1629</span>     <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
+<div class="line"><a name="l01630"></a><span class="lineno"> 1630</span>   }</div>
+<div class="line"><a name="l01631"></a><span class="lineno"> 1631</span> </div>
+<div class="line"><a name="l01632"></a><span class="lineno"> 1632</span>   <span class="comment">// Don't descend into implied contexts for redeclarations.</span></div>
+<div class="line"><a name="l01633"></a><span class="lineno"> 1633</span>   <span class="comment">// C++98 [namespace.qual]p6:</span></div>
+<div class="line"><a name="l01634"></a><span class="lineno"> 1634</span>   <span class="comment">//   In a declaration for a namespace member in which the</span></div>
+<div class="line"><a name="l01635"></a><span class="lineno"> 1635</span>   <span class="comment">//   declarator-id is a qualified-id, given that the qualified-id</span></div>
+<div class="line"><a name="l01636"></a><span class="lineno"> 1636</span>   <span class="comment">//   for the namespace member has the form</span></div>
+<div class="line"><a name="l01637"></a><span class="lineno"> 1637</span>   <span class="comment">//     nested-name-specifier unqualified-id</span></div>
+<div class="line"><a name="l01638"></a><span class="lineno"> 1638</span>   <span class="comment">//   the unqualified-id shall name a member of the namespace</span></div>
+<div class="line"><a name="l01639"></a><span class="lineno"> 1639</span>   <span class="comment">//   designated by the nested-name-specifier.</span></div>
+<div class="line"><a name="l01640"></a><span class="lineno"> 1640</span>   <span class="comment">// See also [class.mfct]p5 and [class.static.data]p2.</span></div>
+<div class="line"><a name="l01641"></a><span class="lineno"> 1641</span>   <span class="keywordflow">if</span> (R.<a class="code" href="classclang_1_1LookupResult.html#a5b06ceea23259bb185a7108679564b15" title="True if this lookup is just looking for an existing declaration.">isForRedeclaration</a>())</div>
+<div class="line"><a name="l01642"></a><span class="lineno"> 1642</span>     <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l01643"></a><span class="lineno"> 1643</span> </div>
+<div class="line"><a name="l01644"></a><span class="lineno"> 1644</span>   <span class="comment">// If this is a namespace, look it up in the implied namespaces.</span></div>
+<div class="line"><a name="l01645"></a><span class="lineno"> 1645</span>   <span class="keywordflow">if</span> (LookupCtx-><a class="code" href="classclang_1_1DeclContext.html#ac33a346d4e8db5e892aba87393f4e8e4">isFileContext</a>())</div>
+<div class="line"><a name="l01646"></a><span class="lineno"> 1646</span>     <span class="keywordflow">return</span> <a class="code" href="SemaLookup_8cpp.html#a6d7246bd544e19c5f169ed477bae2a00" title="Perform qualified name lookup in the namespaces nominated by using directives by the given context...">LookupQualifiedNameInUsingDirectives</a>(*<span class="keyword">this</span>, R, LookupCtx);</div>
+<div class="line"><a name="l01647"></a><span class="lineno"> 1647</span> </div>
+<div class="line"><a name="l01648"></a><span class="lineno"> 1648</span>   <span class="comment">// If this isn't a C++ class, we aren't allowed to look into base</span></div>
+<div class="line"><a name="l01649"></a><span class="lineno"> 1649</span>   <span class="comment">// classes, we're done.</span></div>
+<div class="line"><a name="l01650"></a><span class="lineno"> 1650</span>   <a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *LookupRec = dyn_cast<<a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a>>(LookupCtx);</div>
+<div class="line"><a name="l01651"></a><span class="lineno"> 1651</span>   <span class="keywordflow">if</span> (!LookupRec || !LookupRec-><a class="code" href="classclang_1_1CXXRecordDecl.html#a2bd01ec3ffb06b176ced1bfc31abd99f">getDefinition</a>())</div>
+<div class="line"><a name="l01652"></a><span class="lineno"> 1652</span>     <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l01653"></a><span class="lineno"> 1653</span> </div>
+<div class="line"><a name="l01654"></a><span class="lineno"> 1654</span>   <span class="comment">// If we're performing qualified name lookup into a dependent class,</span></div>
+<div class="line"><a name="l01655"></a><span class="lineno"> 1655</span>   <span class="comment">// then we are actually looking into a current instantiation. If we have any</span></div>
+<div class="line"><a name="l01656"></a><span class="lineno"> 1656</span>   <span class="comment">// dependent base classes, then we either have to delay lookup until</span></div>
+<div class="line"><a name="l01657"></a><span class="lineno"> 1657</span>   <span class="comment">// template instantiation time (at which point all bases will be available)</span></div>
+<div class="line"><a name="l01658"></a><span class="lineno"> 1658</span>   <span class="comment">// or we have to fail.</span></div>
+<div class="line"><a name="l01659"></a><span class="lineno"> 1659</span>   <span class="keywordflow">if</span> (!InUnqualifiedLookup && LookupRec-><a class="code" href="classclang_1_1DeclContext.html#a0d06ccd1db1b1f60e91d95d50aeae75d" title="Determines whether this context is dependent on a template parameter.">isDependentContext</a>() &&</div>
+<div class="line"><a name="l01660"></a><span class="lineno"> 1660</span>       LookupRec-><a class="code" href="classclang_1_1CXXRecordDecl.html#a7acabb31e085543547bf00b369b6082f" title="Determine whether this class has any dependent base classes which are not the current instantiation...">hasAnyDependentBases</a>()) {</div>
+<div class="line"><a name="l01661"></a><span class="lineno"> 1661</span>     R.<a class="code" href="classclang_1_1LookupResult.html#aee8f96b1d7abf87e2a7f01f646d51870" title="Note that while no result was found in the current instantiation, there were dependent base classes t...">setNotFoundInCurrentInstantiation</a>();</div>
+<div class="line"><a name="l01662"></a><span class="lineno"> 1662</span>     <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l01663"></a><span class="lineno"> 1663</span>   }</div>
+<div class="line"><a name="l01664"></a><span class="lineno"> 1664</span> </div>
+<div class="line"><a name="l01665"></a><span class="lineno"> 1665</span>   <span class="comment">// Perform lookup into our base classes.</span></div>
+<div class="line"><a name="l01666"></a><span class="lineno"> 1666</span>   <a class="code" href="classclang_1_1CXXBasePaths.html">CXXBasePaths</a> Paths;</div>
+<div class="line"><a name="l01667"></a><span class="lineno"> 1667</span>   Paths.<a class="code" href="classclang_1_1CXXBasePaths.html#a028e86e6cf24e5e28ddacd027089d6bb">setOrigin</a>(LookupRec);</div>
+<div class="line"><a name="l01668"></a><span class="lineno"> 1668</span> </div>
+<div class="line"><a name="l01669"></a><span class="lineno"> 1669</span>   <span class="comment">// Look for this member in our base classes</span></div>
+<div class="line"><a name="l01670"></a><span class="lineno"> 1670</span>   <a class="code" href="classclang_1_1CXXRecordDecl.html#a76d341639010c0b5ffc3283413546825" title="Function type used by lookupInBases() to determine whether a specific base class subobject matches th...">CXXRecordDecl::BaseMatchesCallback</a> *BaseCallback = 0;</div>
+<div class="line"><a name="l01671"></a><span class="lineno"> 1671</span>   <span class="keywordflow">switch</span> (R.<a class="code" href="classclang_1_1LookupResult.html#a915bb2f2bfa4bd99bf3d546e6568003f" title="Gets the kind of lookup to perform.">getLookupKind</a>()) {</div>
+<div class="line"><a name="l01672"></a><span class="lineno"> 1672</span>     <span class="keywordflow">case</span> LookupObjCImplicitSelfParam:</div>
+<div class="line"><a name="l01673"></a><span class="lineno"> 1673</span>     <span class="keywordflow">case</span> LookupOrdinaryName:</div>
+<div class="line"><a name="l01674"></a><span class="lineno"> 1674</span>     <span class="keywordflow">case</span> LookupMemberName:</div>
+<div class="line"><a name="l01675"></a><span class="lineno"> 1675</span>     <span class="keywordflow">case</span> LookupRedeclarationWithLinkage:</div>
+<div class="line"><a name="l01676"></a><span class="lineno"> 1676</span>     <span class="keywordflow">case</span> LookupLocalFriendName:</div>
+<div class="line"><a name="l01677"></a><span class="lineno"> 1677</span>       BaseCallback = &<a class="code" href="classclang_1_1CXXRecordDecl.html#a9929275caf6bc755fadc069a12cc0a07" title="Base-class lookup callback that determines whether there exists a member with the given name...">CXXRecordDecl::FindOrdinaryMember</a>;</div>
+<div class="line"><a name="l01678"></a><span class="lineno"> 1678</span>       <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l01679"></a><span class="lineno"> 1679</span> </div>
+<div class="line"><a name="l01680"></a><span class="lineno"> 1680</span>     <span class="keywordflow">case</span> LookupTagName:</div>
+<div class="line"><a name="l01681"></a><span class="lineno"> 1681</span>       BaseCallback = &<a class="code" href="classclang_1_1CXXRecordDecl.html#ac7627608583abc96cd6af1f13104fb22" title="Base-class lookup callback that determines whether there exists a tag with the given name...">CXXRecordDecl::FindTagMember</a>;</div>
+<div class="line"><a name="l01682"></a><span class="lineno"> 1682</span>       <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l01683"></a><span class="lineno"> 1683</span> </div>
+<div class="line"><a name="l01684"></a><span class="lineno"> 1684</span>     <span class="keywordflow">case</span> LookupAnyName:</div>
+<div class="line"><a name="l01685"></a><span class="lineno"> 1685</span>       BaseCallback = &<a class="code" href="SemaLookup_8cpp.html#ad9b9762984930f366b8bbf50d67a8b18" title="Callback that looks for any member of a class with the given name.">LookupAnyMember</a>;</div>
+<div class="line"><a name="l01686"></a><span class="lineno"> 1686</span>       <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l01687"></a><span class="lineno"> 1687</span> </div>
+<div class="line"><a name="l01688"></a><span class="lineno"> 1688</span>     <span class="keywordflow">case</span> LookupUsingDeclName:</div>
+<div class="line"><a name="l01689"></a><span class="lineno"> 1689</span>       <span class="comment">// This lookup is for redeclarations only.</span></div>
+<div class="line"><a name="l01690"></a><span class="lineno"> 1690</span> </div>
+<div class="line"><a name="l01691"></a><span class="lineno"> 1691</span>     <span class="keywordflow">case</span> LookupOperatorName:</div>
+<div class="line"><a name="l01692"></a><span class="lineno"> 1692</span>     <span class="keywordflow">case</span> LookupNamespaceName:</div>
+<div class="line"><a name="l01693"></a><span class="lineno"> 1693</span>     <span class="keywordflow">case</span> LookupObjCProtocolName:</div>
+<div class="line"><a name="l01694"></a><span class="lineno"> 1694</span>     <span class="keywordflow">case</span> LookupLabel:</div>
+<div class="line"><a name="l01695"></a><span class="lineno"> 1695</span>       <span class="comment">// These lookups will never find a member in a C++ class (or base class).</span></div>
+<div class="line"><a name="l01696"></a><span class="lineno"> 1696</span>       <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l01697"></a><span class="lineno"> 1697</span> </div>
+<div class="line"><a name="l01698"></a><span class="lineno"> 1698</span>     <span class="keywordflow">case</span> LookupNestedNameSpecifierName:</div>
+<div class="line"><a name="l01699"></a><span class="lineno"> 1699</span>       BaseCallback = &<a class="code" href="classclang_1_1CXXRecordDecl.html#ab5843290cdaad42e5af5531e05933f18" title="Base-class lookup callback that determines whether there exists a member with the given name that can...">CXXRecordDecl::FindNestedNameSpecifierMember</a>;</div>
+<div class="line"><a name="l01700"></a><span class="lineno"> 1700</span>       <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l01701"></a><span class="lineno"> 1701</span>   }</div>
+<div class="line"><a name="l01702"></a><span class="lineno"> 1702</span> </div>
+<div class="line"><a name="l01703"></a><span class="lineno"> 1703</span>   <span class="keywordflow">if</span> (!LookupRec-><a class="code" href="classclang_1_1CXXRecordDecl.html#ab53f24164e19973eb9029bb23bedda5b" title="Look for entities within the base classes of this C++ class, transitively searching all base class su...">lookupInBases</a>(BaseCallback,</div>
+<div class="line"><a name="l01704"></a><span class="lineno"> 1704</span>                                 R.<a class="code" href="classclang_1_1LookupResult.html#a3dd82d154e991b574d70a6a5aba8c61b" title="Gets the name to look up.">getLookupName</a>().<a class="code" href="classclang_1_1DeclarationName.html#a7cf4b24b16edba8ad7afaadb721c3b11">getAsOpaquePtr</a>(), Paths))</div>
+<div class="line"><a name="l01705"></a><span class="lineno"> 1705</span>     <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l01706"></a><span class="lineno"> 1706</span> </div>
+<div class="line"><a name="l01707"></a><span class="lineno"> 1707</span>   R.<a class="code" href="classclang_1_1LookupResult.html#ad1d4eafe95062716cb844784976df165" title="Sets the 'naming class' for this lookup.">setNamingClass</a>(LookupRec);</div>
+<div class="line"><a name="l01708"></a><span class="lineno"> 1708</span> </div>
+<div class="line"><a name="l01709"></a><span class="lineno"> 1709</span>   <span class="comment">// C++ [class.member.lookup]p2:</span></div>
+<div class="line"><a name="l01710"></a><span class="lineno"> 1710</span>   <span class="comment">//   [...] If the resulting set of declarations are not all from</span></div>
+<div class="line"><a name="l01711"></a><span class="lineno"> 1711</span>   <span class="comment">//   sub-objects of the same type, or the set has a nonstatic member</span></div>
+<div class="line"><a name="l01712"></a><span class="lineno"> 1712</span>   <span class="comment">//   and includes members from distinct sub-objects, there is an</span></div>
+<div class="line"><a name="l01713"></a><span class="lineno"> 1713</span>   <span class="comment">//   ambiguity and the program is ill-formed. Otherwise that set is</span></div>
+<div class="line"><a name="l01714"></a><span class="lineno"> 1714</span>   <span class="comment">//   the result of the lookup.</span></div>
+<div class="line"><a name="l01715"></a><span class="lineno"> 1715</span>   <a class="code" href="classclang_1_1QualType.html">QualType</a> SubobjectType;</div>
+<div class="line"><a name="l01716"></a><span class="lineno"> 1716</span>   <span class="keywordtype">int</span> SubobjectNumber = 0;</div>
+<div class="line"><a name="l01717"></a><span class="lineno"> 1717</span>   <a class="code" href="namespaceclang.html#afc8aabd1f46cf32e805cd0d970ef988f" title="A C++ access specifier (public, private, protected), plus the special value "none" which means differ...">AccessSpecifier</a> SubobjectAccess = <a class="code" href="namespaceclang.html#afc8aabd1f46cf32e805cd0d970ef988fa24d2c10b569678923a7bff78b68cb02b">AS_none</a>;</div>
+<div class="line"><a name="l01718"></a><span class="lineno"> 1718</span> </div>
+<div class="line"><a name="l01719"></a><span class="lineno"> 1719</span>   <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1CXXBasePaths.html#a715620c290cafe5c5e76e38c291d0367">CXXBasePaths::paths_iterator</a> Path = Paths.<a class="code" href="classclang_1_1CXXBasePaths.html#a2ffc670a3f2252e2348a5685740b1b59">begin</a>(), PathEnd = Paths.<a class="code" href="classclang_1_1CXXBasePaths.html#a3ff4746eb6460f4165d48f2a8d0887e1">end</a>();</div>
+<div class="line"><a name="l01720"></a><span class="lineno"> 1720</span>        Path != PathEnd; ++Path) {</div>
+<div class="line"><a name="l01721"></a><span class="lineno"> 1721</span>     <span class="keyword">const</span> <a class="code" href="structclang_1_1CXXBasePathElement.html" title="Represents an element in a path from a derived class to a base class.">CXXBasePathElement</a> &PathElement = Path->back();</div>
+<div class="line"><a name="l01722"></a><span class="lineno"> 1722</span> </div>
+<div class="line"><a name="l01723"></a><span class="lineno"> 1723</span>     <span class="comment">// Pick the best (i.e. most permissive i.e. numerically lowest) access</span></div>
+<div class="line"><a name="l01724"></a><span class="lineno"> 1724</span>     <span class="comment">// across all paths.</span></div>
+<div class="line"><a name="l01725"></a><span class="lineno"> 1725</span>     SubobjectAccess = std::min(SubobjectAccess, Path->Access);</div>
+<div class="line"><a name="l01726"></a><span class="lineno"> 1726</span> </div>
+<div class="line"><a name="l01727"></a><span class="lineno"> 1727</span>     <span class="comment">// Determine whether we're looking at a distinct sub-object or not.</span></div>
+<div class="line"><a name="l01728"></a><span class="lineno"> 1728</span>     <span class="keywordflow">if</span> (SubobjectType.<a class="code" href="classclang_1_1QualType.html#a8f87f58000490ad01cd09add1f27d7ac" title="isNull - Return true if this QualType doesn't point to a type yet.">isNull</a>()) {</div>
+<div class="line"><a name="l01729"></a><span class="lineno"> 1729</span>       <span class="comment">// This is the first subobject we've looked at. Record its type.</span></div>
+<div class="line"><a name="l01730"></a><span class="lineno"> 1730</span>       SubobjectType = <a class="code" href="ASTMatchFinder_8cpp.html#a779280869b9fac47a9bc391e7709171f">Context</a>.<a class="code" href="classclang_1_1ASTContext.html#a7e70bb7eebf01548a0cab752e390ba37" title="Return the canonical (structural) type corresponding to the specified potentially non-canonical type ...">getCanonicalType</a>(PathElement.<a class="code" href="structclang_1_1CXXBasePathElement.html#ab853852cd749786467e819edfbe04af3" title="The base specifier that states the link from a derived class to a base class, which will be followed ...">Base</a>-><a class="code" href="classclang_1_1CXXBaseSpecifier.html#a4e9241e65b4b20b372902d0873a9d838" title="Retrieves the type of the base class.">getType</a>());</div>
+<div class="line"><a name="l01731"></a><span class="lineno"> 1731</span>       SubobjectNumber = PathElement.<a class="code" href="structclang_1_1CXXBasePathElement.html#a2a24801a5dad108421082b1d77e43a03" title="Identifies which base class subobject (of type Base->getType()) this base path element refers to...">SubobjectNumber</a>;</div>
+<div class="line"><a name="l01732"></a><span class="lineno"> 1732</span>       <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l01733"></a><span class="lineno"> 1733</span>     }</div>
+<div class="line"><a name="l01734"></a><span class="lineno"> 1734</span> </div>
+<div class="line"><a name="l01735"></a><span class="lineno"> 1735</span>     <span class="keywordflow">if</span> (SubobjectType</div>
+<div class="line"><a name="l01736"></a><span class="lineno"> 1736</span>                  != <a class="code" href="ASTMatchFinder_8cpp.html#a779280869b9fac47a9bc391e7709171f">Context</a>.<a class="code" href="classclang_1_1ASTContext.html#a7e70bb7eebf01548a0cab752e390ba37" title="Return the canonical (structural) type corresponding to the specified potentially non-canonical type ...">getCanonicalType</a>(PathElement.<a class="code" href="structclang_1_1CXXBasePathElement.html#ab853852cd749786467e819edfbe04af3" title="The base specifier that states the link from a derived class to a base class, which will be followed ...">Base</a>-><a class="code" href="classclang_1_1CXXBaseSpecifier.html#a4e9241e65b4b20b372902d0873a9d838" title="Retrieves the type of the base class.">getType</a>())) {</div>
+<div class="line"><a name="l01737"></a><span class="lineno"> 1737</span>       <span class="comment">// We found members of the given name in two subobjects of</span></div>
+<div class="line"><a name="l01738"></a><span class="lineno"> 1738</span>       <span class="comment">// different types. If the declaration sets aren't the same, this</span></div>
+<div class="line"><a name="l01739"></a><span class="lineno"> 1739</span>       <span class="comment">// this lookup is ambiguous.</span></div>
+<div class="line"><a name="l01740"></a><span class="lineno"> 1740</span>       <span class="keywordflow">if</span> (<a class="code" href="SemaLookup_8cpp.html#a44cf2f14dbcb0d87081caa387fc05c8d" title="Determine whether the given set of member declarations contains only static members, nested types, and enumerators.">HasOnlyStaticMembers</a>(Path->Decls.begin(), Path->Decls.end())) {</div>
+<div class="line"><a name="l01741"></a><span class="lineno"> 1741</span>         <a class="code" href="classclang_1_1CXXBasePaths.html#a715620c290cafe5c5e76e38c291d0367">CXXBasePaths::paths_iterator</a> FirstPath = Paths.<a class="code" href="classclang_1_1CXXBasePaths.html#a2ffc670a3f2252e2348a5685740b1b59">begin</a>();</div>
+<div class="line"><a name="l01742"></a><span class="lineno"> 1742</span>         <a class="code" href="classclang_1_1NamedDecl.html">DeclContext::lookup_iterator</a> FirstD = FirstPath->Decls.begin();</div>
+<div class="line"><a name="l01743"></a><span class="lineno"> 1743</span>         <a class="code" href="classclang_1_1NamedDecl.html">DeclContext::lookup_iterator</a> CurrentD = Path->Decls.begin();</div>
+<div class="line"><a name="l01744"></a><span class="lineno"> 1744</span> </div>
+<div class="line"><a name="l01745"></a><span class="lineno"> 1745</span>         <span class="keywordflow">while</span> (FirstD != FirstPath->Decls.end() &&</div>
+<div class="line"><a name="l01746"></a><span class="lineno"> 1746</span>                CurrentD != Path->Decls.end()) {</div>
+<div class="line"><a name="l01747"></a><span class="lineno"> 1747</span>          <span class="keywordflow">if</span> ((*FirstD)->getUnderlyingDecl()->getCanonicalDecl() !=</div>
+<div class="line"><a name="l01748"></a><span class="lineno"> 1748</span>              (*CurrentD)->getUnderlyingDecl()->getCanonicalDecl())</div>
+<div class="line"><a name="l01749"></a><span class="lineno"> 1749</span>            <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l01750"></a><span class="lineno"> 1750</span> </div>
+<div class="line"><a name="l01751"></a><span class="lineno"> 1751</span>           ++FirstD;</div>
+<div class="line"><a name="l01752"></a><span class="lineno"> 1752</span>           ++CurrentD;</div>
+<div class="line"><a name="l01753"></a><span class="lineno"> 1753</span>         }</div>
+<div class="line"><a name="l01754"></a><span class="lineno"> 1754</span> </div>
+<div class="line"><a name="l01755"></a><span class="lineno"> 1755</span>         <span class="keywordflow">if</span> (FirstD == FirstPath->Decls.end() &&</div>
+<div class="line"><a name="l01756"></a><span class="lineno"> 1756</span>             CurrentD == Path->Decls.end())</div>
+<div class="line"><a name="l01757"></a><span class="lineno"> 1757</span>           <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l01758"></a><span class="lineno"> 1758</span>       }</div>
+<div class="line"><a name="l01759"></a><span class="lineno"> 1759</span> </div>
+<div class="line"><a name="l01760"></a><span class="lineno"> 1760</span>       R.<a class="code" href="classclang_1_1LookupResult.html#a88cb68e184d4361c5bec97e7b8a51557" title="Make these results show that the name was found in base classes of different types.">setAmbiguousBaseSubobjectTypes</a>(Paths);</div>
+<div class="line"><a name="l01761"></a><span class="lineno"> 1761</span>       <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
+<div class="line"><a name="l01762"></a><span class="lineno"> 1762</span>     }</div>
+<div class="line"><a name="l01763"></a><span class="lineno"> 1763</span> </div>
+<div class="line"><a name="l01764"></a><span class="lineno"> 1764</span>     <span class="keywordflow">if</span> (SubobjectNumber != PathElement.<a class="code" href="structclang_1_1CXXBasePathElement.html#a2a24801a5dad108421082b1d77e43a03" title="Identifies which base class subobject (of type Base->getType()) this base path element refers to...">SubobjectNumber</a>) {</div>
+<div class="line"><a name="l01765"></a><span class="lineno"> 1765</span>       <span class="comment">// We have a different subobject of the same type.</span></div>
+<div class="line"><a name="l01766"></a><span class="lineno"> 1766</span> </div>
+<div class="line"><a name="l01767"></a><span class="lineno"> 1767</span>       <span class="comment">// C++ [class.member.lookup]p5:</span></div>
+<div class="line"><a name="l01768"></a><span class="lineno"> 1768</span>       <span class="comment">//   A static member, a nested type or an enumerator defined in</span></div>
+<div class="line"><a name="l01769"></a><span class="lineno"> 1769</span>       <span class="comment">//   a base class T can unambiguously be found even if an object</span></div>
+<div class="line"><a name="l01770"></a><span class="lineno"> 1770</span>       <span class="comment">//   has more than one base class subobject of type T.</span></div>
+<div class="line"><a name="l01771"></a><span class="lineno"> 1771</span>       <span class="keywordflow">if</span> (<a class="code" href="SemaLookup_8cpp.html#a44cf2f14dbcb0d87081caa387fc05c8d" title="Determine whether the given set of member declarations contains only static members, nested types, and enumerators.">HasOnlyStaticMembers</a>(Path->Decls.begin(), Path->Decls.end()))</div>
+<div class="line"><a name="l01772"></a><span class="lineno"> 1772</span>         <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l01773"></a><span class="lineno"> 1773</span> </div>
+<div class="line"><a name="l01774"></a><span class="lineno"> 1774</span>       <span class="comment">// We have found a nonstatic member name in multiple, distinct</span></div>
+<div class="line"><a name="l01775"></a><span class="lineno"> 1775</span>       <span class="comment">// subobjects. Name lookup is ambiguous.</span></div>
+<div class="line"><a name="l01776"></a><span class="lineno"> 1776</span>       R.<a class="code" href="classclang_1_1LookupResult.html#a6b4c6ea23f29d8f8ff0fd3ab4e5d0e66" title="Make these results show that the name was found in distinct base classes of the same type...">setAmbiguousBaseSubobjects</a>(Paths);</div>
+<div class="line"><a name="l01777"></a><span class="lineno"> 1777</span>       <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
+<div class="line"><a name="l01778"></a><span class="lineno"> 1778</span>     }</div>
+<div class="line"><a name="l01779"></a><span class="lineno"> 1779</span>   }</div>
+<div class="line"><a name="l01780"></a><span class="lineno"> 1780</span> </div>
+<div class="line"><a name="l01781"></a><span class="lineno"> 1781</span>   <span class="comment">// Lookup in a base class succeeded; return these results.</span></div>
+<div class="line"><a name="l01782"></a><span class="lineno"> 1782</span> </div>
+<div class="line"><a name="l01783"></a><span class="lineno"> 1783</span>   <a class="code" href="classclang_1_1DeclContext.html#ac25dc34eabe6c4e035c76dd3329e8530">DeclContext::lookup_result</a> DR = Paths.<a class="code" href="classclang_1_1CXXBasePaths.html#a90154ae88328c06ac330a2d8aeb6b9b9">front</a>().<a class="code" href="classclang_1_1CXXBasePath.html#a4f91fc1d70809e67e659ff4b98e8f8ce" title="The set of declarations found inside this base class subobject.">Decls</a>;</div>
+<div class="line"><a name="l01784"></a><span class="lineno"> 1784</span>   <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1NamedDecl.html">DeclContext::lookup_iterator</a> I = DR.begin(), E = DR.end(); I != E; ++I) {</div>
+<div class="line"><a name="l01785"></a><span class="lineno"> 1785</span>     <a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *D = *I;</div>
+<div class="line"><a name="l01786"></a><span class="lineno"> 1786</span>     <a class="code" href="namespaceclang.html#afc8aabd1f46cf32e805cd0d970ef988f" title="A C++ access specifier (public, private, protected), plus the special value "none" which means differ...">AccessSpecifier</a> AS = <a class="code" href="classclang_1_1CXXRecordDecl.html#a5a3b3b09d1bb359ce8c58e77594091de" title="Calculates the access of a decl that is reached along a path.">CXXRecordDecl::MergeAccess</a>(SubobjectAccess,</div>
+<div class="line"><a name="l01787"></a><span class="lineno"> 1787</span>                                                     D-><a class="code" href="classclang_1_1Decl.html#a81e82461f69e9a50e129ef4bfac42987">getAccess</a>());</div>
+<div class="line"><a name="l01788"></a><span class="lineno"> 1788</span>     R.<a class="code" href="classclang_1_1LookupResult.html#a62d3dbd6c56a75cad9685c81817253ac" title="Add a declaration to these results with its natural access. Does not test the acceptance criteria...">addDecl</a>(D, AS);</div>
+<div class="line"><a name="l01789"></a><span class="lineno"> 1789</span>   }</div>
+<div class="line"><a name="l01790"></a><span class="lineno"> 1790</span>   R.<a class="code" href="classclang_1_1LookupResult.html#a7bca9f6ca6b6a32dca0ac2dfc8568261" title="Resolves the result kind of the lookup, possibly hiding decls.">resolveKind</a>();</div>
+<div class="line"><a name="l01791"></a><span class="lineno"> 1791</span>   <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
+<div class="line"><a name="l01792"></a><span class="lineno"> 1792</span> }</div>
+<div class="line"><a name="l01793"></a><span class="lineno"> 1793</span> <span class="comment"></span></div>
+<div class="line"><a name="l01794"></a><span class="lineno"> 1794</span> <span class="comment">/// @brief Performs name lookup for a name that was parsed in the</span></div>
+<div class="line"><a name="l01795"></a><span class="lineno"> 1795</span> <span class="comment">/// source code, and may contain a C++ scope specifier.</span></div>
+<div class="line"><a name="l01796"></a><span class="lineno"> 1796</span> <span class="comment">///</span></div>
+<div class="line"><a name="l01797"></a><span class="lineno"> 1797</span> <span class="comment">/// This routine is a convenience routine meant to be called from</span></div>
+<div class="line"><a name="l01798"></a><span class="lineno"> 1798</span> <span class="comment">/// contexts that receive a name and an optional C++ scope specifier</span></div>
+<div class="line"><a name="l01799"></a><span class="lineno"> 1799</span> <span class="comment">/// (e.g., "N::M::x"). It will then perform either qualified or</span></div>
+<div class="line"><a name="l01800"></a><span class="lineno"> 1800</span> <span class="comment">/// unqualified name lookup (with LookupQualifiedName or LookupName,</span></div>
+<div class="line"><a name="l01801"></a><span class="lineno"> 1801</span> <span class="comment">/// respectively) on the given name and return those results.</span></div>
+<div class="line"><a name="l01802"></a><span class="lineno"> 1802</span> <span class="comment">///</span></div>
+<div class="line"><a name="l01803"></a><span class="lineno"> 1803</span> <span class="comment">/// @param S        The scope from which unqualified name lookup will</span></div>
+<div class="line"><a name="l01804"></a><span class="lineno"> 1804</span> <span class="comment">/// begin.</span></div>
+<div class="line"><a name="l01805"></a><span class="lineno"> 1805</span> <span class="comment">///</span></div>
+<div class="line"><a name="l01806"></a><span class="lineno"> 1806</span> <span class="comment">/// @param SS       An optional C++ scope-specifier, e.g., "::N::M".</span></div>
+<div class="line"><a name="l01807"></a><span class="lineno"> 1807</span> <span class="comment">///</span></div>
+<div class="line"><a name="l01808"></a><span class="lineno"> 1808</span> <span class="comment">/// @param EnteringContext Indicates whether we are going to enter the</span></div>
+<div class="line"><a name="l01809"></a><span class="lineno"> 1809</span> <span class="comment">/// context of the scope-specifier SS (if present).</span></div>
+<div class="line"><a name="l01810"></a><span class="lineno"> 1810</span> <span class="comment">///</span></div>
+<div class="line"><a name="l01811"></a><span class="lineno"> 1811</span> <span class="comment">/// @returns True if any decls were found (but possibly ambiguous)</span></div>
+<div class="line"><a name="l01812"></a><span class="lineno"><a class="code" href="classclang_1_1Sema.html#a805a91ca2bb0cccaa46c9cf35b36a4bb"> 1812</a></span> <span class="comment"></span><span class="keywordtype">bool</span> <a class="code" href="classclang_1_1Sema.html#a805a91ca2bb0cccaa46c9cf35b36a4bb" title="Performs name lookup for a name that was parsed in the source code, and may contain a C++ scope speci...">Sema::LookupParsedName</a>(<a class="code" href="classclang_1_1LookupResult.html" title="Represents the results of name lookup.">LookupResult</a> &R, <a class="code" href="classclang_1_1Scope.html">Scope</a> *S, <a class="code" href="classclang_1_1CXXScopeSpec.html" title="Represents a C++ nested-name-specifier or a global scope specifier.">CXXScopeSpec</a> *SS,</div>
+<div class="line"><a name="l01813"></a><span class="lineno"> 1813</span>                             <span class="keywordtype">bool</span> AllowBuiltinCreation, <span class="keywordtype">bool</span> EnteringContext) {</div>
+<div class="line"><a name="l01814"></a><span class="lineno"> 1814</span>   <span class="keywordflow">if</span> (SS && SS-><a class="code" href="classclang_1_1CXXScopeSpec.html#a4470b2b22ffe903c05b83ba25d774652" title="An error occurred during parsing of the scope specifier.">isInvalid</a>()) {</div>
+<div class="line"><a name="l01815"></a><span class="lineno"> 1815</span>     <span class="comment">// When the scope specifier is invalid, don't even look for</span></div>
+<div class="line"><a name="l01816"></a><span class="lineno"> 1816</span>     <span class="comment">// anything.</span></div>
+<div class="line"><a name="l01817"></a><span class="lineno"> 1817</span>     <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l01818"></a><span class="lineno"> 1818</span>   }</div>
+<div class="line"><a name="l01819"></a><span class="lineno"> 1819</span> </div>
+<div class="line"><a name="l01820"></a><span class="lineno"> 1820</span>   <span class="keywordflow">if</span> (SS && SS-><a class="code" href="classclang_1_1CXXScopeSpec.html#ae27d587ba7dae0cfdcdfa2f7f5472c3c">isSet</a>()) {</div>
+<div class="line"><a name="l01821"></a><span class="lineno"> 1821</span>     <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *DC = computeDeclContext(*SS, EnteringContext)) {</div>
+<div class="line"><a name="l01822"></a><span class="lineno"> 1822</span>       <span class="comment">// We have resolved the scope specifier to a particular declaration</span></div>
+<div class="line"><a name="l01823"></a><span class="lineno"> 1823</span>       <span class="comment">// contex, and will perform name lookup in that context.</span></div>
+<div class="line"><a name="l01824"></a><span class="lineno"> 1824</span>       <span class="keywordflow">if</span> (!DC-><a class="code" href="classclang_1_1DeclContext.html#a0d06ccd1db1b1f60e91d95d50aeae75d" title="Determines whether this context is dependent on a template parameter.">isDependentContext</a>() && RequireCompleteDeclContext(*SS, DC))</div>
+<div class="line"><a name="l01825"></a><span class="lineno"> 1825</span>         <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l01826"></a><span class="lineno"> 1826</span> </div>
+<div class="line"><a name="l01827"></a><span class="lineno"> 1827</span>       R.<a class="code" href="classclang_1_1LookupResult.html#a56868f465a5042f7a0082d21495d4e84" title="Sets a 'context' source range.">setContextRange</a>(SS-><a class="code" href="classclang_1_1CXXScopeSpec.html#a4cd627def4f36f863b61b77477d137eb">getRange</a>());</div>
+<div class="line"><a name="l01828"></a><span class="lineno"> 1828</span>       <span class="keywordflow">return</span> LookupQualifiedName(R, DC);</div>
+<div class="line"><a name="l01829"></a><span class="lineno"> 1829</span>     }</div>
+<div class="line"><a name="l01830"></a><span class="lineno"> 1830</span> </div>
+<div class="line"><a name="l01831"></a><span class="lineno"> 1831</span>     <span class="comment">// We could not resolve the scope specified to a specific declaration</span></div>
+<div class="line"><a name="l01832"></a><span class="lineno"> 1832</span>     <span class="comment">// context, which means that SS refers to an unknown specialization.</span></div>
+<div class="line"><a name="l01833"></a><span class="lineno"> 1833</span>     <span class="comment">// Name lookup can't find anything in this case.</span></div>
+<div class="line"><a name="l01834"></a><span class="lineno"> 1834</span>     R.<a class="code" href="classclang_1_1LookupResult.html#aee8f96b1d7abf87e2a7f01f646d51870" title="Note that while no result was found in the current instantiation, there were dependent base classes t...">setNotFoundInCurrentInstantiation</a>();</div>
+<div class="line"><a name="l01835"></a><span class="lineno"> 1835</span>     R.<a class="code" href="classclang_1_1LookupResult.html#a56868f465a5042f7a0082d21495d4e84" title="Sets a 'context' source range.">setContextRange</a>(SS-><a class="code" href="classclang_1_1CXXScopeSpec.html#a4cd627def4f36f863b61b77477d137eb">getRange</a>());</div>
+<div class="line"><a name="l01836"></a><span class="lineno"> 1836</span>     <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l01837"></a><span class="lineno"> 1837</span>   }</div>
+<div class="line"><a name="l01838"></a><span class="lineno"> 1838</span> </div>
+<div class="line"><a name="l01839"></a><span class="lineno"> 1839</span>   <span class="comment">// Perform unqualified name lookup starting in the given scope.</span></div>
+<div class="line"><a name="l01840"></a><span class="lineno"> 1840</span>   <span class="keywordflow">return</span> LookupName(R, S, AllowBuiltinCreation);</div>
+<div class="line"><a name="l01841"></a><span class="lineno"> 1841</span> }</div>
+<div class="line"><a name="l01842"></a><span class="lineno"> 1842</span> </div>
+<div class="line"><a name="l01843"></a><span class="lineno"> 1843</span> <span class="comment"></span></div>
+<div class="line"><a name="l01844"></a><span class="lineno"> 1844</span> <span class="comment">/// \brief Produce a diagnostic describing the ambiguity that resulted</span></div>
+<div class="line"><a name="l01845"></a><span class="lineno"> 1845</span> <span class="comment">/// from name lookup.</span></div>
+<div class="line"><a name="l01846"></a><span class="lineno"> 1846</span> <span class="comment">///</span></div>
+<div class="line"><a name="l01847"></a><span class="lineno"> 1847</span> <span class="comment">/// \param Result The result of the ambiguous lookup to be diagnosed.</span></div>
+<div class="line"><a name="l01848"></a><span class="lineno"><a class="code" href="classclang_1_1Sema.html#ac595dc16a79dea2f198092a56f2f0fb7"> 1848</a></span> <span class="comment"></span><span class="keywordtype">void</span> <a class="code" href="classclang_1_1Sema.html#ac595dc16a79dea2f198092a56f2f0fb7" title="Produce a diagnostic describing the ambiguity that resulted from name lookup.">Sema::DiagnoseAmbiguousLookup</a>(<a class="code" href="classclang_1_1LookupResult.html" title="Represents the results of name lookup.">LookupResult</a> &Result) {</div>
+<div class="line"><a name="l01849"></a><span class="lineno"> 1849</span>   assert(Result.<a class="code" href="classclang_1_1LookupResult.html#ad40ced676b01c7ef20a8a3612869bf54">isAmbiguous</a>() && <span class="stringliteral">"Lookup result must be ambiguous"</span>);</div>
+<div class="line"><a name="l01850"></a><span class="lineno"> 1850</span> </div>
+<div class="line"><a name="l01851"></a><span class="lineno"> 1851</span>   <a class="code" href="classclang_1_1DeclarationName.html">DeclarationName</a> Name = Result.<a class="code" href="classclang_1_1LookupResult.html#a3dd82d154e991b574d70a6a5aba8c61b" title="Gets the name to look up.">getLookupName</a>();</div>
+<div class="line"><a name="l01852"></a><span class="lineno"> 1852</span>   <a class="code" href="classclang_1_1SourceLocation.html" title="Encodes a location in the source. The SourceManager can decode this to get at the full include stack...">SourceLocation</a> NameLoc = Result.<a class="code" href="classclang_1_1LookupResult.html#af980e0b636ede7d9e0018dff05b0d269">getNameLoc</a>();</div>
+<div class="line"><a name="l01853"></a><span class="lineno"> 1853</span>   <a class="code" href="classclang_1_1SourceRange.html" title="A trival tuple used to represent a source range.">SourceRange</a> LookupRange = Result.<a class="code" href="classclang_1_1LookupResult.html#a5b7abab31b79aca8df6b9ab63f1dd9a4">getContextRange</a>();</div>
+<div class="line"><a name="l01854"></a><span class="lineno"> 1854</span> </div>
+<div class="line"><a name="l01855"></a><span class="lineno"> 1855</span>   <span class="keywordflow">switch</span> (Result.<a class="code" href="classclang_1_1LookupResult.html#a4651a64a8fdbdef360e45431cbe1205d">getAmbiguityKind</a>()) {</div>
+<div class="line"><a name="l01856"></a><span class="lineno"> 1856</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1LookupResult.html#aebf19a2597e5da2800d1fdf6ce23791cac58666e6fb59934044c2a8d9843624bc">LookupResult::AmbiguousBaseSubobjects</a>: {</div>
+<div class="line"><a name="l01857"></a><span class="lineno"> 1857</span>     <a class="code" href="classclang_1_1CXXBasePaths.html">CXXBasePaths</a> *Paths = Result.<a class="code" href="classclang_1_1LookupResult.html#a6ccfb19e00a036e187bea9214df825e1" title="Return the base paths structure that's associated with these results, or null if none is...">getBasePaths</a>();</div>
+<div class="line"><a name="l01858"></a><span class="lineno"> 1858</span>     <a class="code" href="classclang_1_1QualType.html">QualType</a> SubobjectType = Paths-><a class="code" href="classclang_1_1CXXBasePaths.html#a90154ae88328c06ac330a2d8aeb6b9b9">front</a>().back().Base->getType();</div>
+<div class="line"><a name="l01859"></a><span class="lineno"> 1859</span>     <a class="code" href="LiteralSupport_8cpp.html#a5f4a4a29292c4a1697226abf1d22b9dd" title="Produce a diagnostic highlighting some portion of a literal.">Diag</a>(NameLoc, diag::err_ambiguous_member_multiple_subobjects)</div>
+<div class="line"><a name="l01860"></a><span class="lineno"> 1860</span>       << Name << SubobjectType << getAmbiguousPathsDisplayString(*Paths)</div>
+<div class="line"><a name="l01861"></a><span class="lineno"> 1861</span>       << LookupRange;</div>
+<div class="line"><a name="l01862"></a><span class="lineno"> 1862</span> </div>
+<div class="line"><a name="l01863"></a><span class="lineno"> 1863</span>     <a class="code" href="classclang_1_1NamedDecl.html">DeclContext::lookup_iterator</a> Found = Paths-><a class="code" href="classclang_1_1CXXBasePaths.html#a90154ae88328c06ac330a2d8aeb6b9b9">front</a>().<a class="code" href="classclang_1_1CXXBasePath.html#a4f91fc1d70809e67e659ff4b98e8f8ce" title="The set of declarations found inside this base class subobject.">Decls</a>.begin();</div>
+<div class="line"><a name="l01864"></a><span class="lineno"> 1864</span>     <span class="keywordflow">while</span> (isa<CXXMethodDecl>(*Found) &&</div>
+<div class="line"><a name="l01865"></a><span class="lineno"> 1865</span>            cast<CXXMethodDecl>(*Found)->isStatic())</div>
+<div class="line"><a name="l01866"></a><span class="lineno"> 1866</span>       ++Found;</div>
+<div class="line"><a name="l01867"></a><span class="lineno"> 1867</span> </div>
+<div class="line"><a name="l01868"></a><span class="lineno"> 1868</span>     <a class="code" href="LiteralSupport_8cpp.html#a5f4a4a29292c4a1697226abf1d22b9dd" title="Produce a diagnostic highlighting some portion of a literal.">Diag</a>((*Found)->getLocation(), diag::note_ambiguous_member_found);</div>
+<div class="line"><a name="l01869"></a><span class="lineno"> 1869</span>     <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l01870"></a><span class="lineno"> 1870</span>   }</div>
+<div class="line"><a name="l01871"></a><span class="lineno"> 1871</span> </div>
+<div class="line"><a name="l01872"></a><span class="lineno"> 1872</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1LookupResult.html#aebf19a2597e5da2800d1fdf6ce23791ca52f0d75e34016959d0f41b35389d650a">LookupResult::AmbiguousBaseSubobjectTypes</a>: {</div>
+<div class="line"><a name="l01873"></a><span class="lineno"> 1873</span>     <a class="code" href="LiteralSupport_8cpp.html#a5f4a4a29292c4a1697226abf1d22b9dd" title="Produce a diagnostic highlighting some portion of a literal.">Diag</a>(NameLoc, diag::err_ambiguous_member_multiple_subobject_types)</div>
+<div class="line"><a name="l01874"></a><span class="lineno"> 1874</span>       << Name << LookupRange;</div>
+<div class="line"><a name="l01875"></a><span class="lineno"> 1875</span> </div>
+<div class="line"><a name="l01876"></a><span class="lineno"> 1876</span>     <a class="code" href="classclang_1_1CXXBasePaths.html">CXXBasePaths</a> *Paths = Result.<a class="code" href="classclang_1_1LookupResult.html#a6ccfb19e00a036e187bea9214df825e1" title="Return the base paths structure that's associated with these results, or null if none is...">getBasePaths</a>();</div>
+<div class="line"><a name="l01877"></a><span class="lineno"> 1877</span>     std::set<Decl *> DeclsPrinted;</div>
+<div class="line"><a name="l01878"></a><span class="lineno"> 1878</span>     <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1CXXBasePaths.html#a715620c290cafe5c5e76e38c291d0367">CXXBasePaths::paths_iterator</a> Path = Paths-><a class="code" href="classclang_1_1CXXBasePaths.html#a2ffc670a3f2252e2348a5685740b1b59">begin</a>(),</div>
+<div class="line"><a name="l01879"></a><span class="lineno"> 1879</span>                                       PathEnd = Paths-><a class="code" href="classclang_1_1CXXBasePaths.html#a3ff4746eb6460f4165d48f2a8d0887e1">end</a>();</div>
+<div class="line"><a name="l01880"></a><span class="lineno"> 1880</span>          Path != PathEnd; ++Path) {</div>
+<div class="line"><a name="l01881"></a><span class="lineno"> 1881</span>       <a class="code" href="classclang_1_1Decl.html">Decl</a> *D = Path->Decls.front();</div>
+<div class="line"><a name="l01882"></a><span class="lineno"> 1882</span>       <span class="keywordflow">if</span> (DeclsPrinted.insert(D).second)</div>
+<div class="line"><a name="l01883"></a><span class="lineno"> 1883</span>         <a class="code" href="LiteralSupport_8cpp.html#a5f4a4a29292c4a1697226abf1d22b9dd" title="Produce a diagnostic highlighting some portion of a literal.">Diag</a>(D-><a class="code" href="classclang_1_1Decl.html#a2348196ac4e0b1d5ebb1859c31b99eac">getLocation</a>(), diag::note_ambiguous_member_found);</div>
+<div class="line"><a name="l01884"></a><span class="lineno"> 1884</span>     }</div>
+<div class="line"><a name="l01885"></a><span class="lineno"> 1885</span>     <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l01886"></a><span class="lineno"> 1886</span>   }</div>
+<div class="line"><a name="l01887"></a><span class="lineno"> 1887</span> </div>
+<div class="line"><a name="l01888"></a><span class="lineno"> 1888</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1LookupResult.html#aebf19a2597e5da2800d1fdf6ce23791ca1f2885d1ba42617de9afdcae5bb89763">LookupResult::AmbiguousTagHiding</a>: {</div>
+<div class="line"><a name="l01889"></a><span class="lineno"> 1889</span>     <a class="code" href="LiteralSupport_8cpp.html#a5f4a4a29292c4a1697226abf1d22b9dd" title="Produce a diagnostic highlighting some portion of a literal.">Diag</a>(NameLoc, diag::err_ambiguous_tag_hiding) << Name << LookupRange;</div>
+<div class="line"><a name="l01890"></a><span class="lineno"> 1890</span> </div>
+<div class="line"><a name="l01891"></a><span class="lineno"> 1891</span>     llvm::SmallPtrSet<NamedDecl*,8> TagDecls;</div>
+<div class="line"><a name="l01892"></a><span class="lineno"> 1892</span> </div>
+<div class="line"><a name="l01893"></a><span class="lineno"> 1893</span>     <a class="code" href="classclang_1_1UnresolvedSetIterator.html">LookupResult::iterator</a> DI, DE = Result.<a class="code" href="classclang_1_1LookupResult.html#ae1db847b7820acee0a0371510ccdf1c9">end</a>();</div>
+<div class="line"><a name="l01894"></a><span class="lineno"> 1894</span>     <span class="keywordflow">for</span> (DI = Result.<a class="code" href="classclang_1_1LookupResult.html#a460debe22c59694c326b3c4671726889">begin</a>(); DI != DE; ++DI)</div>
+<div class="line"><a name="l01895"></a><span class="lineno"> 1895</span>       <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1TagDecl.html" title="TagDecl - Represents the declaration of a struct/union/class/enum.">TagDecl</a> *TD = dyn_cast<TagDecl>(*DI)) {</div>
+<div class="line"><a name="l01896"></a><span class="lineno"> 1896</span>         TagDecls.insert(TD);</div>
+<div class="line"><a name="l01897"></a><span class="lineno"> 1897</span>         <a class="code" href="LiteralSupport_8cpp.html#a5f4a4a29292c4a1697226abf1d22b9dd" title="Produce a diagnostic highlighting some portion of a literal.">Diag</a>(TD->getLocation(), diag::note_hidden_tag);</div>
+<div class="line"><a name="l01898"></a><span class="lineno"> 1898</span>       }</div>
+<div class="line"><a name="l01899"></a><span class="lineno"> 1899</span> </div>
+<div class="line"><a name="l01900"></a><span class="lineno"> 1900</span>     <span class="keywordflow">for</span> (DI = Result.<a class="code" href="classclang_1_1LookupResult.html#a460debe22c59694c326b3c4671726889">begin</a>(); DI != DE; ++DI)</div>
+<div class="line"><a name="l01901"></a><span class="lineno"> 1901</span>       <span class="keywordflow">if</span> (!isa<TagDecl>(*DI))</div>
+<div class="line"><a name="l01902"></a><span class="lineno"> 1902</span>         <a class="code" href="LiteralSupport_8cpp.html#a5f4a4a29292c4a1697226abf1d22b9dd" title="Produce a diagnostic highlighting some portion of a literal.">Diag</a>((*DI)->getLocation(), diag::note_hiding_object);</div>
+<div class="line"><a name="l01903"></a><span class="lineno"> 1903</span> </div>
+<div class="line"><a name="l01904"></a><span class="lineno"> 1904</span>     <span class="comment">// For recovery purposes, go ahead and implement the hiding.</span></div>
+<div class="line"><a name="l01905"></a><span class="lineno"> 1905</span>     <a class="code" href="classclang_1_1LookupResult_1_1Filter.html">LookupResult::Filter</a> F = Result.<a class="code" href="classclang_1_1LookupResult.html#a8fcd0c83d80750fb4ecfda2d77dab8f9" title="Create a filter for this result set.">makeFilter</a>();</div>
+<div class="line"><a name="l01906"></a><span class="lineno"> 1906</span>     <span class="keywordflow">while</span> (F.<a class="code" href="classclang_1_1LookupResult_1_1Filter.html#acaeaa48ad3768d5999dff3a7c6961cd3">hasNext</a>()) {</div>
+<div class="line"><a name="l01907"></a><span class="lineno"> 1907</span>       <span class="keywordflow">if</span> (TagDecls.count(F.<a class="code" href="classclang_1_1LookupResult_1_1Filter.html#a6e034ed000d88962b76888a7afffa2da">next</a>()))</div>
+<div class="line"><a name="l01908"></a><span class="lineno"> 1908</span>         F.<a class="code" href="classclang_1_1LookupResult_1_1Filter.html#a6346d546b581546516c0d55151edfa6a" title="Erase the last element returned from this iterator.">erase</a>();</div>
+<div class="line"><a name="l01909"></a><span class="lineno"> 1909</span>     }</div>
+<div class="line"><a name="l01910"></a><span class="lineno"> 1910</span>     F.<a class="code" href="classclang_1_1LookupResult_1_1Filter.html#a4009aa67fb1480681f14100f47df5986">done</a>();</div>
+<div class="line"><a name="l01911"></a><span class="lineno"> 1911</span>     <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l01912"></a><span class="lineno"> 1912</span>   }</div>
+<div class="line"><a name="l01913"></a><span class="lineno"> 1913</span> </div>
+<div class="line"><a name="l01914"></a><span class="lineno"> 1914</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1LookupResult.html#aebf19a2597e5da2800d1fdf6ce23791ca821378a71aaf0c0e149092739ad331e9">LookupResult::AmbiguousReference</a>: {</div>
+<div class="line"><a name="l01915"></a><span class="lineno"> 1915</span>     <a class="code" href="LiteralSupport_8cpp.html#a5f4a4a29292c4a1697226abf1d22b9dd" title="Produce a diagnostic highlighting some portion of a literal.">Diag</a>(NameLoc, diag::err_ambiguous_reference) << Name << LookupRange;</div>
+<div class="line"><a name="l01916"></a><span class="lineno"> 1916</span> </div>
+<div class="line"><a name="l01917"></a><span class="lineno"> 1917</span>     <a class="code" href="classclang_1_1UnresolvedSetIterator.html">LookupResult::iterator</a> DI = Result.<a class="code" href="classclang_1_1LookupResult.html#a460debe22c59694c326b3c4671726889">begin</a>(), DE = Result.<a class="code" href="classclang_1_1LookupResult.html#ae1db847b7820acee0a0371510ccdf1c9">end</a>();</div>
+<div class="line"><a name="l01918"></a><span class="lineno"> 1918</span>     <span class="keywordflow">for</span> (; DI != DE; ++DI)</div>
+<div class="line"><a name="l01919"></a><span class="lineno"> 1919</span>       <a class="code" href="LiteralSupport_8cpp.html#a5f4a4a29292c4a1697226abf1d22b9dd" title="Produce a diagnostic highlighting some portion of a literal.">Diag</a>((*DI)->getLocation(), diag::note_ambiguous_candidate) << *DI;</div>
+<div class="line"><a name="l01920"></a><span class="lineno"> 1920</span>     <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l01921"></a><span class="lineno"> 1921</span>   }</div>
+<div class="line"><a name="l01922"></a><span class="lineno"> 1922</span>   }</div>
+<div class="line"><a name="l01923"></a><span class="lineno"> 1923</span> }</div>
+<div class="line"><a name="l01924"></a><span class="lineno"> 1924</span> </div>
+<div class="line"><a name="l01925"></a><span class="lineno"> 1925</span> <span class="keyword">namespace </span>{</div>
+<div class="line"><a name="l01926"></a><span class="lineno"> 1926</span>   <span class="keyword">struct </span>AssociatedLookup {</div>
+<div class="line"><a name="l01927"></a><span class="lineno"> 1927</span>     AssociatedLookup(<a class="code" href="classclang_1_1Sema.html" title="Sema - This implements semantic analysis and AST building for C.">Sema</a> &S, <a class="code" href="classclang_1_1SourceLocation.html" title="Encodes a location in the source. The SourceManager can decode this to get at the full include stack...">SourceLocation</a> InstantiationLoc,</div>
+<div class="line"><a name="l01928"></a><span class="lineno"> 1928</span>                      <a class="code" href="classclang_1_1Sema.html#a27dbfb91fb72a732f276f392a0f80564">Sema::AssociatedNamespaceSet</a> &Namespaces,</div>
+<div class="line"><a name="l01929"></a><span class="lineno"> 1929</span>                      <a class="code" href="classclang_1_1Sema.html#a676e1612f9cbf42bb41120835e9b4d5a">Sema::AssociatedClassSet</a> &Classes)</div>
+<div class="line"><a name="l01930"></a><span class="lineno"> 1930</span>       : S(S), Namespaces(Namespaces), Classes(Classes),</div>
+<div class="line"><a name="l01931"></a><span class="lineno"> 1931</span>         InstantiationLoc(InstantiationLoc) {</div>
+<div class="line"><a name="l01932"></a><span class="lineno"> 1932</span>     }</div>
+<div class="line"><a name="l01933"></a><span class="lineno"> 1933</span> </div>
+<div class="line"><a name="l01934"></a><span class="lineno"> 1934</span>     <a class="code" href="classclang_1_1Sema.html" title="Sema - This implements semantic analysis and AST building for C.">Sema</a> &<a class="code" href="AnalysisBasedWarnings_8cpp.html#a33dc45a03958a0bf07b5da2dec4db648">S</a>;</div>
+<div class="line"><a name="l01935"></a><span class="lineno"> 1935</span>     <a class="code" href="classclang_1_1Sema.html#a27dbfb91fb72a732f276f392a0f80564">Sema::AssociatedNamespaceSet</a> &Namespaces;</div>
+<div class="line"><a name="l01936"></a><span class="lineno"> 1936</span>     <a class="code" href="classclang_1_1Sema.html#a676e1612f9cbf42bb41120835e9b4d5a">Sema::AssociatedClassSet</a> &Classes;</div>
+<div class="line"><a name="l01937"></a><span class="lineno"> 1937</span>     <a class="code" href="classclang_1_1SourceLocation.html" title="Encodes a location in the source. The SourceManager can decode this to get at the full include stack...">SourceLocation</a> InstantiationLoc;</div>
+<div class="line"><a name="l01938"></a><span class="lineno"> 1938</span>   };</div>
+<div class="line"><a name="l01939"></a><span class="lineno"> 1939</span> }</div>
+<div class="line"><a name="l01940"></a><span class="lineno"> 1940</span> </div>
+<div class="line"><a name="l01941"></a><span class="lineno"> 1941</span> <span class="keyword">static</span> <span class="keywordtype">void</span></div>
+<div class="line"><a name="l01942"></a><span class="lineno"> 1942</span> <a class="code" href="SemaLookup_8cpp.html#a3431ccd46048ca07cc87ae459859782f">addAssociatedClassesAndNamespaces</a>(AssociatedLookup &Result, <a class="code" href="classclang_1_1QualType.html">QualType</a> T);</div>
+<div class="line"><a name="l01943"></a><span class="lineno"> 1943</span> </div>
+<div class="line"><a name="l01944"></a><span class="lineno"><a class="code" href="SemaLookup_8cpp.html#a87737790591e564c676946b8360f8307"> 1944</a></span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="SemaLookup_8cpp.html#a87737790591e564c676946b8360f8307">CollectEnclosingNamespace</a>(<a class="code" href="classclang_1_1Sema.html#a27dbfb91fb72a732f276f392a0f80564">Sema::AssociatedNamespaceSet</a> &Namespaces,</div>
+<div class="line"><a name="l01945"></a><span class="lineno"> 1945</span>                                       <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *Ctx) {</div>
+<div class="line"><a name="l01946"></a><span class="lineno"> 1946</span>   <span class="comment">// Add the associated namespace for this class.</span></div>
+<div class="line"><a name="l01947"></a><span class="lineno"> 1947</span> </div>
+<div class="line"><a name="l01948"></a><span class="lineno"> 1948</span>   <span class="comment">// We don't use DeclContext::getEnclosingNamespaceContext() as this may</span></div>
+<div class="line"><a name="l01949"></a><span class="lineno"> 1949</span>   <span class="comment">// be a locally scoped record.</span></div>
+<div class="line"><a name="l01950"></a><span class="lineno"> 1950</span> </div>
+<div class="line"><a name="l01951"></a><span class="lineno"> 1951</span>   <span class="comment">// We skip out of inline namespaces. The innermost non-inline namespace</span></div>
+<div class="line"><a name="l01952"></a><span class="lineno"> 1952</span>   <span class="comment">// contains all names of all its nested inline namespaces anyway, so we can</span></div>
+<div class="line"><a name="l01953"></a><span class="lineno"> 1953</span>   <span class="comment">// replace the entire inline namespace tree with its root.</span></div>
+<div class="line"><a name="l01954"></a><span class="lineno"> 1954</span>   <span class="keywordflow">while</span> (Ctx-><a class="code" href="classclang_1_1DeclContext.html#a85027c592c0fa8ffa83e2570089217a7">isRecord</a>() || Ctx-><a class="code" href="classclang_1_1DeclContext.html#abbf5a92a55d4faa4150ee8fd46a60345">isTransparentContext</a>() ||</div>
+<div class="line"><a name="l01955"></a><span class="lineno"> 1955</span>          Ctx-><a class="code" href="classclang_1_1DeclContext.html#a54029a957eb43fd8754a3865e1e41f04">isInlineNamespace</a>())</div>
+<div class="line"><a name="l01956"></a><span class="lineno"> 1956</span>     Ctx = Ctx-><a class="code" href="classclang_1_1DeclContext.html#a31c99b38017e8d702fda9c0f1d021186" title="getParent - Returns the containing DeclContext.">getParent</a>();</div>
+<div class="line"><a name="l01957"></a><span class="lineno"> 1957</span> </div>
+<div class="line"><a name="l01958"></a><span class="lineno"> 1958</span>   <span class="keywordflow">if</span> (Ctx-><a class="code" href="classclang_1_1DeclContext.html#ac33a346d4e8db5e892aba87393f4e8e4">isFileContext</a>())</div>
+<div class="line"><a name="l01959"></a><span class="lineno"> 1959</span>     Namespaces.insert(Ctx-><a class="code" href="classclang_1_1DeclContext.html#ac3368ad7389098f8fed5c5d346b77445">getPrimaryContext</a>());</div>
+<div class="line"><a name="l01960"></a><span class="lineno"> 1960</span> }</div>
+<div class="line"><a name="l01961"></a><span class="lineno"> 1961</span> </div>
+<div class="line"><a name="l01962"></a><span class="lineno"> 1962</span> <span class="comment">// \brief Add the associated classes and namespaces for argument-dependent</span></div>
+<div class="line"><a name="l01963"></a><span class="lineno"> 1963</span> <span class="comment">// lookup that involves a template argument (C++ [basic.lookup.koenig]p2).</span></div>
+<div class="line"><a name="l01964"></a><span class="lineno"> 1964</span> <span class="keyword">static</span> <span class="keywordtype">void</span></div>
+<div class="line"><a name="l01965"></a><span class="lineno"><a class="code" href="SemaLookup_8cpp.html#afb3a46c125452a2070be1a43c1361b7e"> 1965</a></span> <a class="code" href="SemaLookup_8cpp.html#a3431ccd46048ca07cc87ae459859782f">addAssociatedClassesAndNamespaces</a>(AssociatedLookup &Result,</div>
+<div class="line"><a name="l01966"></a><span class="lineno"> 1966</span>                                   <span class="keyword">const</span> <a class="code" href="classclang_1_1TemplateArgument.html" title="Represents a template argument within a class template specialization.">TemplateArgument</a> &Arg) {</div>
+<div class="line"><a name="l01967"></a><span class="lineno"> 1967</span>   <span class="comment">// C++ [basic.lookup.koenig]p2, last bullet:</span></div>
+<div class="line"><a name="l01968"></a><span class="lineno"> 1968</span>   <span class="comment">//   -- [...] ;</span></div>
+<div class="line"><a name="l01969"></a><span class="lineno"> 1969</span>   <span class="keywordflow">switch</span> (Arg.<a class="code" href="classclang_1_1TemplateArgument.html#a17d8d61d5172e159f898a9021695bd56" title="Return the kind of stored template argument.">getKind</a>()) {</div>
+<div class="line"><a name="l01970"></a><span class="lineno"> 1970</span>     <span class="keywordflow">case</span> <a class="code" href="classclang_1_1TemplateArgument.html#ad5158465bd96aebe0d9dc44207821220a8ed3fd7360217d0eeb31ca127775764c" title="Represents an empty template argument, e.g., one that has not been deduced.">TemplateArgument::Null</a>:</div>
+<div class="line"><a name="l01971"></a><span class="lineno"> 1971</span>       <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l01972"></a><span class="lineno"> 1972</span> </div>
+<div class="line"><a name="l01973"></a><span class="lineno"> 1973</span>     <span class="keywordflow">case</span> <a class="code" href="classclang_1_1TemplateArgument.html#ad5158465bd96aebe0d9dc44207821220a7441a0aac50df9f775662d7fe21f5568" title="The template argument is a type.">TemplateArgument::Type</a>:</div>
+<div class="line"><a name="l01974"></a><span class="lineno"> 1974</span>       <span class="comment">// [...] the namespaces and classes associated with the types of the</span></div>
+<div class="line"><a name="l01975"></a><span class="lineno"> 1975</span>       <span class="comment">// template arguments provided for template type parameters (excluding</span></div>
+<div class="line"><a name="l01976"></a><span class="lineno"> 1976</span>       <span class="comment">// template template parameters)</span></div>
+<div class="line"><a name="l01977"></a><span class="lineno"> 1977</span>       <a class="code" href="SemaLookup_8cpp.html#a3431ccd46048ca07cc87ae459859782f">addAssociatedClassesAndNamespaces</a>(Result, Arg.<a class="code" href="classclang_1_1TemplateArgument.html#aac7fcb944b5ab1ab3b15eca45b7e9440" title="Retrieve the type for a type template argument.">getAsType</a>());</div>
+<div class="line"><a name="l01978"></a><span class="lineno"> 1978</span>       <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l01979"></a><span class="lineno"> 1979</span> </div>
+<div class="line"><a name="l01980"></a><span class="lineno"> 1980</span>     <span class="keywordflow">case</span> <a class="code" href="classclang_1_1TemplateArgument.html#ad5158465bd96aebe0d9dc44207821220a1a6bbcb379955f5ef1eb8d26b64c9525">TemplateArgument::Template</a>:</div>
+<div class="line"><a name="l01981"></a><span class="lineno"> 1981</span>     <span class="keywordflow">case</span> <a class="code" href="classclang_1_1TemplateArgument.html#ad5158465bd96aebe0d9dc44207821220a4b2338e88673d728203c1927f178cbc1">TemplateArgument::TemplateExpansion</a>: {</div>
+<div class="line"><a name="l01982"></a><span class="lineno"> 1982</span>       <span class="comment">// [...] the namespaces in which any template template arguments are</span></div>
+<div class="line"><a name="l01983"></a><span class="lineno"> 1983</span>       <span class="comment">// defined; and the classes in which any member templates used as</span></div>
+<div class="line"><a name="l01984"></a><span class="lineno"> 1984</span>       <span class="comment">// template template arguments are defined.</span></div>
+<div class="line"><a name="l01985"></a><span class="lineno"> 1985</span>       <a class="code" href="classclang_1_1TemplateName.html" title="Represents a C++ template name within the type system.">TemplateName</a> Template = Arg.<a class="code" href="classclang_1_1TemplateArgument.html#a12ff4e99d5023e6b7e26efe8da41b157" title="Retrieve the template argument as a template name; if the argument is a pack expansion, return the pattern as a template name.">getAsTemplateOrTemplatePattern</a>();</div>
+<div class="line"><a name="l01986"></a><span class="lineno"> 1986</span>       <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1ClassTemplateDecl.html" title="Declaration of a class template.">ClassTemplateDecl</a> *ClassTemplate</div>
+<div class="line"><a name="l01987"></a><span class="lineno"> 1987</span>                  = dyn_cast<ClassTemplateDecl>(Template.<a class="code" href="classclang_1_1TemplateName.html#a12167fecfe7a4ce6342e322246337519" title="Retrieve the underlying template declaration that this template name refers to, if known...">getAsTemplateDecl</a>())) {</div>
+<div class="line"><a name="l01988"></a><span class="lineno"> 1988</span>         <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *Ctx = ClassTemplate->getDeclContext();</div>
+<div class="line"><a name="l01989"></a><span class="lineno"> 1989</span>         <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *EnclosingClass = dyn_cast<CXXRecordDecl>(Ctx))</div>
+<div class="line"><a name="l01990"></a><span class="lineno"> 1990</span>           Result.Classes.insert(EnclosingClass);</div>
+<div class="line"><a name="l01991"></a><span class="lineno"> 1991</span>         <span class="comment">// Add the associated namespace for this class.</span></div>
+<div class="line"><a name="l01992"></a><span class="lineno"> 1992</span>         <a class="code" href="SemaLookup_8cpp.html#a87737790591e564c676946b8360f8307">CollectEnclosingNamespace</a>(Result.Namespaces, Ctx);</div>
+<div class="line"><a name="l01993"></a><span class="lineno"> 1993</span>       }</div>
+<div class="line"><a name="l01994"></a><span class="lineno"> 1994</span>       <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l01995"></a><span class="lineno"> 1995</span>     }</div>
+<div class="line"><a name="l01996"></a><span class="lineno"> 1996</span> </div>
+<div class="line"><a name="l01997"></a><span class="lineno"> 1997</span>     <span class="keywordflow">case</span> <a class="code" href="classclang_1_1TemplateArgument.html#ad5158465bd96aebe0d9dc44207821220a101f7e3f2d1405aa30edbf22ab529d2c">TemplateArgument::Declaration</a>:</div>
+<div class="line"><a name="l01998"></a><span class="lineno"> 1998</span>     <span class="keywordflow">case</span> <a class="code" href="classclang_1_1TemplateArgument.html#ad5158465bd96aebe0d9dc44207821220af2933924d899f7feba90d4cd4dbae3e1">TemplateArgument::Integral</a>:</div>
+<div class="line"><a name="l01999"></a><span class="lineno"> 1999</span>     <span class="keywordflow">case</span> <a class="code" href="classclang_1_1TemplateArgument.html#ad5158465bd96aebe0d9dc44207821220afa0b60d25ea226073129f877594bb8c2">TemplateArgument::Expression</a>:</div>
+<div class="line"><a name="l02000"></a><span class="lineno"> 2000</span>     <span class="keywordflow">case</span> <a class="code" href="classclang_1_1TemplateArgument.html#ad5158465bd96aebe0d9dc44207821220a67e8430f53204425d241bc440142b08f">TemplateArgument::NullPtr</a>:</div>
+<div class="line"><a name="l02001"></a><span class="lineno"> 2001</span>       <span class="comment">// [Note: non-type template arguments do not contribute to the set of</span></div>
+<div class="line"><a name="l02002"></a><span class="lineno"> 2002</span>       <span class="comment">//  associated namespaces. ]</span></div>
+<div class="line"><a name="l02003"></a><span class="lineno"> 2003</span>       <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l02004"></a><span class="lineno"> 2004</span> </div>
+<div class="line"><a name="l02005"></a><span class="lineno"> 2005</span>     <span class="keywordflow">case</span> <a class="code" href="classclang_1_1TemplateArgument.html#ad5158465bd96aebe0d9dc44207821220a2d5a0b8fce2dae0a927c21381da834e1">TemplateArgument::Pack</a>:</div>
+<div class="line"><a name="l02006"></a><span class="lineno"> 2006</span>       <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1TemplateArgument.html" title="Represents a template argument within a class template specialization.">TemplateArgument::pack_iterator</a> P = Arg.<a class="code" href="classclang_1_1TemplateArgument.html#aec590020815d7ba7bc6ab7b6f81d0abb" title="Iterator referencing the first argument of a template argument pack.">pack_begin</a>(),</div>
+<div class="line"><a name="l02007"></a><span class="lineno"> 2007</span>                                         PEnd = Arg.<a class="code" href="classclang_1_1TemplateArgument.html#afa5da5057aa82802b95bb40b1b0585bd" title="Iterator referencing one past the last argument of a template argument pack.">pack_end</a>();</div>
+<div class="line"><a name="l02008"></a><span class="lineno"> 2008</span>            P != PEnd; ++<a class="code" href="TokenAnnotator_8cpp.html#a0bf8bdaf8596b1161b6ce63c4232a1fb">P</a>)</div>
+<div class="line"><a name="l02009"></a><span class="lineno"> 2009</span>         <a class="code" href="SemaLookup_8cpp.html#a3431ccd46048ca07cc87ae459859782f">addAssociatedClassesAndNamespaces</a>(Result, *P);</div>
+<div class="line"><a name="l02010"></a><span class="lineno"> 2010</span>       <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l02011"></a><span class="lineno"> 2011</span>   }</div>
+<div class="line"><a name="l02012"></a><span class="lineno"> 2012</span> }</div>
+<div class="line"><a name="l02013"></a><span class="lineno"> 2013</span> </div>
+<div class="line"><a name="l02014"></a><span class="lineno"> 2014</span> <span class="comment">// \brief Add the associated classes and namespaces for</span></div>
+<div class="line"><a name="l02015"></a><span class="lineno"> 2015</span> <span class="comment">// argument-dependent lookup with an argument of class type</span></div>
+<div class="line"><a name="l02016"></a><span class="lineno"> 2016</span> <span class="comment">// (C++ [basic.lookup.koenig]p2).</span></div>
+<div class="line"><a name="l02017"></a><span class="lineno"> 2017</span> <span class="keyword">static</span> <span class="keywordtype">void</span></div>
+<div class="line"><a name="l02018"></a><span class="lineno"><a class="code" href="SemaLookup_8cpp.html#acf59e7b5c416dbfc74fc1c32226c630d"> 2018</a></span> <a class="code" href="SemaLookup_8cpp.html#a3431ccd46048ca07cc87ae459859782f">addAssociatedClassesAndNamespaces</a>(AssociatedLookup &Result,</div>
+<div class="line"><a name="l02019"></a><span class="lineno"> 2019</span>                                   <a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *Class) {</div>
+<div class="line"><a name="l02020"></a><span class="lineno"> 2020</span> </div>
+<div class="line"><a name="l02021"></a><span class="lineno"> 2021</span>   <span class="comment">// Just silently ignore anything whose name is __va_list_tag.</span></div>
+<div class="line"><a name="l02022"></a><span class="lineno"> 2022</span>   <span class="keywordflow">if</span> (Class-><a class="code" href="classclang_1_1NamedDecl.html#a1e3e90455be89bb5c7c23640cbbd7153">getDeclName</a>() == Result.S.VAListTagName)</div>
+<div class="line"><a name="l02023"></a><span class="lineno"> 2023</span>     <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l02024"></a><span class="lineno"> 2024</span> </div>
+<div class="line"><a name="l02025"></a><span class="lineno"> 2025</span>   <span class="comment">// C++ [basic.lookup.koenig]p2:</span></div>
+<div class="line"><a name="l02026"></a><span class="lineno"> 2026</span>   <span class="comment">//   [...]</span></div>
+<div class="line"><a name="l02027"></a><span class="lineno"> 2027</span>   <span class="comment">//     -- If T is a class type (including unions), its associated</span></div>
+<div class="line"><a name="l02028"></a><span class="lineno"> 2028</span>   <span class="comment">//        classes are: the class itself; the class of which it is a</span></div>
+<div class="line"><a name="l02029"></a><span class="lineno"> 2029</span>   <span class="comment">//        member, if any; and its direct and indirect base</span></div>
+<div class="line"><a name="l02030"></a><span class="lineno"> 2030</span>   <span class="comment">//        classes. Its associated namespaces are the namespaces in</span></div>
+<div class="line"><a name="l02031"></a><span class="lineno"> 2031</span>   <span class="comment">//        which its associated classes are defined.</span></div>
+<div class="line"><a name="l02032"></a><span class="lineno"> 2032</span> </div>
+<div class="line"><a name="l02033"></a><span class="lineno"> 2033</span>   <span class="comment">// Add the class of which it is a member, if any.</span></div>
+<div class="line"><a name="l02034"></a><span class="lineno"> 2034</span>   <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *Ctx = Class-><a class="code" href="classclang_1_1Decl.html#af67e1a1d24dcc51093b95dbcf68d4288">getDeclContext</a>();</div>
+<div class="line"><a name="l02035"></a><span class="lineno"> 2035</span>   <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *EnclosingClass = dyn_cast<CXXRecordDecl>(Ctx))</div>
+<div class="line"><a name="l02036"></a><span class="lineno"> 2036</span>     Result.Classes.insert(EnclosingClass);</div>
+<div class="line"><a name="l02037"></a><span class="lineno"> 2037</span>   <span class="comment">// Add the associated namespace for this class.</span></div>
+<div class="line"><a name="l02038"></a><span class="lineno"> 2038</span>   <a class="code" href="SemaLookup_8cpp.html#a87737790591e564c676946b8360f8307">CollectEnclosingNamespace</a>(Result.Namespaces, Ctx);</div>
+<div class="line"><a name="l02039"></a><span class="lineno"> 2039</span> </div>
+<div class="line"><a name="l02040"></a><span class="lineno"> 2040</span>   <span class="comment">// Add the class itself. If we've already seen this class, we don't</span></div>
+<div class="line"><a name="l02041"></a><span class="lineno"> 2041</span>   <span class="comment">// need to visit base classes.</span></div>
+<div class="line"><a name="l02042"></a><span class="lineno"> 2042</span>   <span class="keywordflow">if</span> (!Result.Classes.insert(Class))</div>
+<div class="line"><a name="l02043"></a><span class="lineno"> 2043</span>     <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l02044"></a><span class="lineno"> 2044</span> </div>
+<div class="line"><a name="l02045"></a><span class="lineno"> 2045</span>   <span class="comment">// -- If T is a template-id, its associated namespaces and classes are</span></div>
+<div class="line"><a name="l02046"></a><span class="lineno"> 2046</span>   <span class="comment">//    the namespace in which the template is defined; for member</span></div>
+<div class="line"><a name="l02047"></a><span class="lineno"> 2047</span>   <span class="comment">//    templates, the member template's class; the namespaces and classes</span></div>
+<div class="line"><a name="l02048"></a><span class="lineno"> 2048</span>   <span class="comment">//    associated with the types of the template arguments provided for</span></div>
+<div class="line"><a name="l02049"></a><span class="lineno"> 2049</span>   <span class="comment">//    template type parameters (excluding template template parameters); the</span></div>
+<div class="line"><a name="l02050"></a><span class="lineno"> 2050</span>   <span class="comment">//    namespaces in which any template template arguments are defined; and</span></div>
+<div class="line"><a name="l02051"></a><span class="lineno"> 2051</span>   <span class="comment">//    the classes in which any member templates used as template template</span></div>
+<div class="line"><a name="l02052"></a><span class="lineno"> 2052</span>   <span class="comment">//    arguments are defined. [Note: non-type template arguments do not</span></div>
+<div class="line"><a name="l02053"></a><span class="lineno"> 2053</span>   <span class="comment">//    contribute to the set of associated namespaces. ]</span></div>
+<div class="line"><a name="l02054"></a><span class="lineno"> 2054</span>   <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1ClassTemplateSpecializationDecl.html" title="Represents a class template specialization, which refers to a class template with a given set of temp...">ClassTemplateSpecializationDecl</a> *Spec</div>
+<div class="line"><a name="l02055"></a><span class="lineno"> 2055</span>         = dyn_cast<ClassTemplateSpecializationDecl>(Class)) {</div>
+<div class="line"><a name="l02056"></a><span class="lineno"> 2056</span>     <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *Ctx = Spec->getSpecializedTemplate()->getDeclContext();</div>
+<div class="line"><a name="l02057"></a><span class="lineno"> 2057</span>     <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *EnclosingClass = dyn_cast<CXXRecordDecl>(Ctx))</div>
+<div class="line"><a name="l02058"></a><span class="lineno"> 2058</span>       Result.Classes.insert(EnclosingClass);</div>
+<div class="line"><a name="l02059"></a><span class="lineno"> 2059</span>     <span class="comment">// Add the associated namespace for this class.</span></div>
+<div class="line"><a name="l02060"></a><span class="lineno"> 2060</span>     <a class="code" href="SemaLookup_8cpp.html#a87737790591e564c676946b8360f8307">CollectEnclosingNamespace</a>(Result.Namespaces, Ctx);</div>
+<div class="line"><a name="l02061"></a><span class="lineno"> 2061</span> </div>
+<div class="line"><a name="l02062"></a><span class="lineno"> 2062</span>     <span class="keyword">const</span> <a class="code" href="classclang_1_1TemplateArgumentList.html" title="A template argument list.">TemplateArgumentList</a> &TemplateArgs = Spec->getTemplateArgs();</div>
+<div class="line"><a name="l02063"></a><span class="lineno"> 2063</span>     <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> I = 0, N = TemplateArgs.<a class="code" href="classclang_1_1TemplateArgumentList.html#a74ca2574daffc53ce30fa549dbf25145" title="Retrieve the number of template arguments in this template argument list.">size</a>(); I != N; ++I)</div>
+<div class="line"><a name="l02064"></a><span class="lineno"> 2064</span>       <a class="code" href="SemaLookup_8cpp.html#a3431ccd46048ca07cc87ae459859782f">addAssociatedClassesAndNamespaces</a>(Result, TemplateArgs[I]);</div>
+<div class="line"><a name="l02065"></a><span class="lineno"> 2065</span>   }</div>
+<div class="line"><a name="l02066"></a><span class="lineno"> 2066</span> </div>
+<div class="line"><a name="l02067"></a><span class="lineno"> 2067</span>   <span class="comment">// Only recurse into base classes for complete types.</span></div>
+<div class="line"><a name="l02068"></a><span class="lineno"> 2068</span>   <span class="keywordflow">if</span> (!Class-><a class="code" href="classclang_1_1CXXRecordDecl.html#a29a073661abb8822828dab8774075563">hasDefinition</a>()) {</div>
+<div class="line"><a name="l02069"></a><span class="lineno"> 2069</span>     <a class="code" href="classclang_1_1QualType.html">QualType</a> <a class="code" href="namespaceclang_1_1ast__matchers.html#a82efb51f28681d561f9ce42fecf09d4b" title="Matches Types in the clang AST.">type</a> = Result.S.Context.getTypeDeclType(Class);</div>
+<div class="line"><a name="l02070"></a><span class="lineno"> 2070</span>     <span class="keywordflow">if</span> (Result.S.RequireCompleteType(Result.InstantiationLoc, type,</div>
+<div class="line"><a name="l02071"></a><span class="lineno"> 2071</span>                                      <span class="comment">/*no diagnostic*/</span> 0))</div>
+<div class="line"><a name="l02072"></a><span class="lineno"> 2072</span>       <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l02073"></a><span class="lineno"> 2073</span>   }</div>
+<div class="line"><a name="l02074"></a><span class="lineno"> 2074</span> </div>
+<div class="line"><a name="l02075"></a><span class="lineno"> 2075</span>   <span class="comment">// Add direct and indirect base classes along with their associated</span></div>
+<div class="line"><a name="l02076"></a><span class="lineno"> 2076</span>   <span class="comment">// namespaces.</span></div>
+<div class="line"><a name="l02077"></a><span class="lineno"> 2077</span>   <a class="code" href="classllvm_1_1SmallVector.html">SmallVector<CXXRecordDecl *, 32></a> Bases;</div>
+<div class="line"><a name="l02078"></a><span class="lineno"> 2078</span>   Bases.push_back(Class);</div>
+<div class="line"><a name="l02079"></a><span class="lineno"> 2079</span>   <span class="keywordflow">while</span> (!Bases.empty()) {</div>
+<div class="line"><a name="l02080"></a><span class="lineno"> 2080</span>     <span class="comment">// Pop this class off the stack.</span></div>
+<div class="line"><a name="l02081"></a><span class="lineno"> 2081</span>     Class = Bases.pop_back_val();</div>
+<div class="line"><a name="l02082"></a><span class="lineno"> 2082</span> </div>
+<div class="line"><a name="l02083"></a><span class="lineno"> 2083</span>     <span class="comment">// Visit the base classes.</span></div>
+<div class="line"><a name="l02084"></a><span class="lineno"> 2084</span>     <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1CXXBaseSpecifier.html" title="Represents a base class of a C++ class.">CXXRecordDecl::base_class_iterator</a> <a class="code" href="classclang_1_1Base.html">Base</a> = Class-><a class="code" href="classclang_1_1CXXRecordDecl.html#a830448d054e3dca2db6851bd4605492c">bases_begin</a>(),</div>
+<div class="line"><a name="l02085"></a><span class="lineno"> 2085</span>                                          BaseEnd = Class-><a class="code" href="classclang_1_1CXXRecordDecl.html#a1e27f3ddd2de050a298094ea732bd321">bases_end</a>();</div>
+<div class="line"><a name="l02086"></a><span class="lineno"> 2086</span>          <a class="code" href="classclang_1_1Base.html">Base</a> != BaseEnd; ++<a class="code" href="classclang_1_1Base.html">Base</a>) {</div>
+<div class="line"><a name="l02087"></a><span class="lineno"> 2087</span>       <span class="keyword">const</span> <a class="code" href="classclang_1_1RecordType.html">RecordType</a> *BaseType = <a class="code" href="classclang_1_1Base.html">Base</a>->getType()->getAs<<a class="code" href="classclang_1_1RecordType.html">RecordType</a>>();</div>
+<div class="line"><a name="l02088"></a><span class="lineno"> 2088</span>       <span class="comment">// In dependent contexts, we do ADL twice, and the first time around,</span></div>
+<div class="line"><a name="l02089"></a><span class="lineno"> 2089</span>       <span class="comment">// the base type might be a dependent TemplateSpecializationType, or a</span></div>
+<div class="line"><a name="l02090"></a><span class="lineno"> 2090</span>       <span class="comment">// TemplateTypeParmType. If that happens, simply ignore it.</span></div>
+<div class="line"><a name="l02091"></a><span class="lineno"> 2091</span>       <span class="comment">// FIXME: If we want to support export, we probably need to add the</span></div>
+<div class="line"><a name="l02092"></a><span class="lineno"> 2092</span>       <span class="comment">// namespace of the template in a TemplateSpecializationType, or even</span></div>
+<div class="line"><a name="l02093"></a><span class="lineno"> 2093</span>       <span class="comment">// the classes and namespaces of known non-dependent arguments.</span></div>
+<div class="line"><a name="l02094"></a><span class="lineno"> 2094</span>       <span class="keywordflow">if</span> (!BaseType)</div>
+<div class="line"><a name="l02095"></a><span class="lineno"> 2095</span>         <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l02096"></a><span class="lineno"> 2096</span>       <a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *BaseDecl = cast<CXXRecordDecl>(BaseType-><a class="code" href="classclang_1_1RecordType.html#a312ab3ebe179cc7d8692c07479c91076">getDecl</a>());</div>
+<div class="line"><a name="l02097"></a><span class="lineno"> 2097</span>       <span class="keywordflow">if</span> (Result.Classes.insert(BaseDecl)) {</div>
+<div class="line"><a name="l02098"></a><span class="lineno"> 2098</span>         <span class="comment">// Find the associated namespace for this base class.</span></div>
+<div class="line"><a name="l02099"></a><span class="lineno"> 2099</span>         <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *BaseCtx = BaseDecl-><a class="code" href="classclang_1_1Decl.html#af67e1a1d24dcc51093b95dbcf68d4288">getDeclContext</a>();</div>
+<div class="line"><a name="l02100"></a><span class="lineno"> 2100</span>         <a class="code" href="SemaLookup_8cpp.html#a87737790591e564c676946b8360f8307">CollectEnclosingNamespace</a>(Result.Namespaces, BaseCtx);</div>
+<div class="line"><a name="l02101"></a><span class="lineno"> 2101</span> </div>
+<div class="line"><a name="l02102"></a><span class="lineno"> 2102</span>         <span class="comment">// Make sure we visit the bases of this base class.</span></div>
+<div class="line"><a name="l02103"></a><span class="lineno"> 2103</span>         <span class="keywordflow">if</span> (BaseDecl-><a class="code" href="classclang_1_1CXXRecordDecl.html#a830448d054e3dca2db6851bd4605492c">bases_begin</a>() != BaseDecl-><a class="code" href="classclang_1_1CXXRecordDecl.html#a1e27f3ddd2de050a298094ea732bd321">bases_end</a>())</div>
+<div class="line"><a name="l02104"></a><span class="lineno"> 2104</span>           Bases.push_back(BaseDecl);</div>
+<div class="line"><a name="l02105"></a><span class="lineno"> 2105</span>       }</div>
+<div class="line"><a name="l02106"></a><span class="lineno"> 2106</span>     }</div>
+<div class="line"><a name="l02107"></a><span class="lineno"> 2107</span>   }</div>
+<div class="line"><a name="l02108"></a><span class="lineno"> 2108</span> }</div>
+<div class="line"><a name="l02109"></a><span class="lineno"> 2109</span> </div>
+<div class="line"><a name="l02110"></a><span class="lineno"> 2110</span> <span class="comment">// \brief Add the associated classes and namespaces for</span></div>
+<div class="line"><a name="l02111"></a><span class="lineno"> 2111</span> <span class="comment">// argument-dependent lookup with an argument of type T</span></div>
+<div class="line"><a name="l02112"></a><span class="lineno"> 2112</span> <span class="comment">// (C++ [basic.lookup.koenig]p2).</span></div>
+<div class="line"><a name="l02113"></a><span class="lineno"> 2113</span> <span class="keyword">static</span> <span class="keywordtype">void</span></div>
+<div class="line"><a name="l02114"></a><span class="lineno"><a class="code" href="SemaLookup_8cpp.html#a3431ccd46048ca07cc87ae459859782f"> 2114</a></span> <a class="code" href="SemaLookup_8cpp.html#a3431ccd46048ca07cc87ae459859782f">addAssociatedClassesAndNamespaces</a>(AssociatedLookup &Result, <a class="code" href="classclang_1_1QualType.html">QualType</a> Ty) {</div>
+<div class="line"><a name="l02115"></a><span class="lineno"> 2115</span>   <span class="comment">// C++ [basic.lookup.koenig]p2:</span></div>
+<div class="line"><a name="l02116"></a><span class="lineno"> 2116</span>   <span class="comment">//</span></div>
+<div class="line"><a name="l02117"></a><span class="lineno"> 2117</span>   <span class="comment">//   For each argument type T in the function call, there is a set</span></div>
+<div class="line"><a name="l02118"></a><span class="lineno"> 2118</span>   <span class="comment">//   of zero or more associated namespaces and a set of zero or more</span></div>
+<div class="line"><a name="l02119"></a><span class="lineno"> 2119</span>   <span class="comment">//   associated classes to be considered. The sets of namespaces and</span></div>
+<div class="line"><a name="l02120"></a><span class="lineno"> 2120</span>   <span class="comment">//   classes is determined entirely by the types of the function</span></div>
+<div class="line"><a name="l02121"></a><span class="lineno"> 2121</span>   <span class="comment">//   arguments (and the namespace of any template template</span></div>
+<div class="line"><a name="l02122"></a><span class="lineno"> 2122</span>   <span class="comment">//   argument). Typedef names and using-declarations used to specify</span></div>
+<div class="line"><a name="l02123"></a><span class="lineno"> 2123</span>   <span class="comment">//   the types do not contribute to this set. The sets of namespaces</span></div>
+<div class="line"><a name="l02124"></a><span class="lineno"> 2124</span>   <span class="comment">//   and classes are determined in the following way:</span></div>
+<div class="line"><a name="l02125"></a><span class="lineno"> 2125</span> </div>
+<div class="line"><a name="l02126"></a><span class="lineno"> 2126</span>   <a class="code" href="classllvm_1_1SmallVector.html">SmallVector<const Type *, 16></a> Queue;</div>
+<div class="line"><a name="l02127"></a><span class="lineno"> 2127</span>   <span class="keyword">const</span> <a class="code" href="classclang_1_1Type.html">Type</a> *T = Ty-><a class="code" href="classclang_1_1Type.html#a6bd50f807f10864ef809b41555e8d47c">getCanonicalTypeInternal</a>().<a class="code" href="classclang_1_1QualType.html#a669d7ba0645cd05d53508e3c1895075a">getTypePtr</a>();</div>
+<div class="line"><a name="l02128"></a><span class="lineno"> 2128</span> </div>
+<div class="line"><a name="l02129"></a><span class="lineno"> 2129</span>   <span class="keywordflow">while</span> (<span class="keyword">true</span>) {</div>
+<div class="line"><a name="l02130"></a><span class="lineno"> 2130</span>     <span class="keywordflow">switch</span> (T-><a class="code" href="classclang_1_1Type.html#a34cea2e4e1895806fbbac92110b66db0">getTypeClass</a>()) {</div>
+<div class="line"><a name="l02131"></a><span class="lineno"> 2131</span> </div>
+<div class="line"><a name="l02132"></a><span class="lineno"> 2132</span> <span class="preprocessor">#define TYPE(Class, Base)</span></div>
+<div class="line"><a name="l02133"></a><span class="lineno"> 2133</span> <span class="preprocessor"></span><span class="preprocessor">#define DEPENDENT_TYPE(Class, Base) case Type::Class:</span></div>
+<div class="line"><a name="l02134"></a><span class="lineno"> 2134</span> <span class="preprocessor"></span><span class="preprocessor">#define NON_CANONICAL_TYPE(Class, Base) case Type::Class:</span></div>
+<div class="line"><a name="l02135"></a><span class="lineno"> 2135</span> <span class="preprocessor"></span><span class="preprocessor">#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Class, Base) case Type::Class:</span></div>
+<div class="line"><a name="l02136"></a><span class="lineno"> 2136</span> <span class="preprocessor"></span><span class="preprocessor">#define ABSTRACT_TYPE(Class, Base)</span></div>
+<div class="line"><a name="l02137"></a><span class="lineno"> 2137</span> <span class="preprocessor"></span><span class="preprocessor">#include "clang/AST/TypeNodes.def"</span></div>
+<div class="line"><a name="l02138"></a><span class="lineno"> 2138</span>       <span class="comment">// T is canonical.  We can also ignore dependent types because</span></div>
+<div class="line"><a name="l02139"></a><span class="lineno"> 2139</span>       <span class="comment">// we don't need to do ADL at the definition point, but if we</span></div>
+<div class="line"><a name="l02140"></a><span class="lineno"> 2140</span>       <span class="comment">// wanted to implement template export (or if we find some other</span></div>
+<div class="line"><a name="l02141"></a><span class="lineno"> 2141</span>       <span class="comment">// use for associated classes and namespaces...) this would be</span></div>
+<div class="line"><a name="l02142"></a><span class="lineno"> 2142</span>       <span class="comment">// wrong.</span></div>
+<div class="line"><a name="l02143"></a><span class="lineno"> 2143</span>       <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l02144"></a><span class="lineno"> 2144</span> </div>
+<div class="line"><a name="l02145"></a><span class="lineno"> 2145</span>     <span class="comment">//    -- If T is a pointer to U or an array of U, its associated</span></div>
+<div class="line"><a name="l02146"></a><span class="lineno"> 2146</span>     <span class="comment">//       namespaces and classes are those associated with U.</span></div>
+<div class="line"><a name="l02147"></a><span class="lineno"> 2147</span>     <span class="keywordflow">case</span> Type::Pointer:</div>
+<div class="line"><a name="l02148"></a><span class="lineno"> 2148</span>       T = cast<PointerType>(T)->getPointeeType().getTypePtr();</div>
+<div class="line"><a name="l02149"></a><span class="lineno"> 2149</span>       <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l02150"></a><span class="lineno"> 2150</span>     <span class="keywordflow">case</span> Type::ConstantArray:</div>
+<div class="line"><a name="l02151"></a><span class="lineno"> 2151</span>     <span class="keywordflow">case</span> Type::IncompleteArray:</div>
+<div class="line"><a name="l02152"></a><span class="lineno"> 2152</span>     <span class="keywordflow">case</span> Type::VariableArray:</div>
+<div class="line"><a name="l02153"></a><span class="lineno"> 2153</span>       T = cast<ArrayType>(T)-><a class="code" href="SemaChecking_8cpp.html#a9f6c9a015ec06db5f86672533b582823">getElementType</a>().getTypePtr();</div>
+<div class="line"><a name="l02154"></a><span class="lineno"> 2154</span>       <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l02155"></a><span class="lineno"> 2155</span> </div>
+<div class="line"><a name="l02156"></a><span class="lineno"> 2156</span>     <span class="comment">//     -- If T is a fundamental type, its associated sets of</span></div>
+<div class="line"><a name="l02157"></a><span class="lineno"> 2157</span>     <span class="comment">//        namespaces and classes are both empty.</span></div>
+<div class="line"><a name="l02158"></a><span class="lineno"> 2158</span>     <span class="keywordflow">case</span> Type::Builtin:</div>
+<div class="line"><a name="l02159"></a><span class="lineno"> 2159</span>       <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l02160"></a><span class="lineno"> 2160</span> </div>
+<div class="line"><a name="l02161"></a><span class="lineno"> 2161</span>     <span class="comment">//     -- If T is a class type (including unions), its associated</span></div>
+<div class="line"><a name="l02162"></a><span class="lineno"> 2162</span>     <span class="comment">//        classes are: the class itself; the class of which it is a</span></div>
+<div class="line"><a name="l02163"></a><span class="lineno"> 2163</span>     <span class="comment">//        member, if any; and its direct and indirect base</span></div>
+<div class="line"><a name="l02164"></a><span class="lineno"> 2164</span>     <span class="comment">//        classes. Its associated namespaces are the namespaces in</span></div>
+<div class="line"><a name="l02165"></a><span class="lineno"> 2165</span>     <span class="comment">//        which its associated classes are defined.</span></div>
+<div class="line"><a name="l02166"></a><span class="lineno"> 2166</span>     <span class="keywordflow">case</span> Type::Record: {</div>
+<div class="line"><a name="l02167"></a><span class="lineno"> 2167</span>       <a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *Class</div>
+<div class="line"><a name="l02168"></a><span class="lineno"> 2168</span>         = cast<CXXRecordDecl>(cast<RecordType>(T)->getDecl());</div>
+<div class="line"><a name="l02169"></a><span class="lineno"> 2169</span>       <a class="code" href="SemaLookup_8cpp.html#a3431ccd46048ca07cc87ae459859782f">addAssociatedClassesAndNamespaces</a>(Result, Class);</div>
+<div class="line"><a name="l02170"></a><span class="lineno"> 2170</span>       <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l02171"></a><span class="lineno"> 2171</span>     }</div>
+<div class="line"><a name="l02172"></a><span class="lineno"> 2172</span> </div>
+<div class="line"><a name="l02173"></a><span class="lineno"> 2173</span>     <span class="comment">//     -- If T is an enumeration type, its associated namespace is</span></div>
+<div class="line"><a name="l02174"></a><span class="lineno"> 2174</span>     <span class="comment">//        the namespace in which it is defined. If it is class</span></div>
+<div class="line"><a name="l02175"></a><span class="lineno"> 2175</span>     <span class="comment">//        member, its associated class is the member's class; else</span></div>
+<div class="line"><a name="l02176"></a><span class="lineno"> 2176</span>     <span class="comment">//        it has no associated class.</span></div>
+<div class="line"><a name="l02177"></a><span class="lineno"> 2177</span>     <span class="keywordflow">case</span> Type::Enum: {</div>
+<div class="line"><a name="l02178"></a><span class="lineno"> 2178</span>       <a class="code" href="classclang_1_1EnumDecl.html">EnumDecl</a> *Enum = cast<EnumType>(T)->getDecl();</div>
+<div class="line"><a name="l02179"></a><span class="lineno"> 2179</span> </div>
+<div class="line"><a name="l02180"></a><span class="lineno"> 2180</span>       <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *Ctx = Enum-><a class="code" href="classclang_1_1Decl.html#af67e1a1d24dcc51093b95dbcf68d4288">getDeclContext</a>();</div>
+<div class="line"><a name="l02181"></a><span class="lineno"> 2181</span>       <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *EnclosingClass = dyn_cast<CXXRecordDecl>(Ctx))</div>
+<div class="line"><a name="l02182"></a><span class="lineno"> 2182</span>         Result.Classes.insert(EnclosingClass);</div>
+<div class="line"><a name="l02183"></a><span class="lineno"> 2183</span> </div>
+<div class="line"><a name="l02184"></a><span class="lineno"> 2184</span>       <span class="comment">// Add the associated namespace for this class.</span></div>
+<div class="line"><a name="l02185"></a><span class="lineno"> 2185</span>       <a class="code" href="SemaLookup_8cpp.html#a87737790591e564c676946b8360f8307">CollectEnclosingNamespace</a>(Result.Namespaces, Ctx);</div>
+<div class="line"><a name="l02186"></a><span class="lineno"> 2186</span> </div>
+<div class="line"><a name="l02187"></a><span class="lineno"> 2187</span>       <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l02188"></a><span class="lineno"> 2188</span>     }</div>
+<div class="line"><a name="l02189"></a><span class="lineno"> 2189</span> </div>
+<div class="line"><a name="l02190"></a><span class="lineno"> 2190</span>     <span class="comment">//     -- If T is a function type, its associated namespaces and</span></div>
+<div class="line"><a name="l02191"></a><span class="lineno"> 2191</span>     <span class="comment">//        classes are those associated with the function parameter</span></div>
+<div class="line"><a name="l02192"></a><span class="lineno"> 2192</span>     <span class="comment">//        types and those associated with the return type.</span></div>
+<div class="line"><a name="l02193"></a><span class="lineno"> 2193</span>     <span class="keywordflow">case</span> Type::FunctionProto: {</div>
+<div class="line"><a name="l02194"></a><span class="lineno"> 2194</span>       <span class="keyword">const</span> <a class="code" href="classclang_1_1FunctionProtoType.html">FunctionProtoType</a> *Proto = cast<FunctionProtoType>(T);</div>
+<div class="line"><a name="l02195"></a><span class="lineno"> 2195</span>       <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1QualType.html">FunctionProtoType::arg_type_iterator</a> Arg = Proto-><a class="code" href="classclang_1_1FunctionProtoType.html#a4d754a59b4408c1e6e20c2edefdfb940">arg_type_begin</a>(),</div>
+<div class="line"><a name="l02196"></a><span class="lineno"> 2196</span>                                              ArgEnd = Proto-><a class="code" href="classclang_1_1FunctionProtoType.html#ab1175d3a5e0ed66ce90da81f665edcb6">arg_type_end</a>();</div>
+<div class="line"><a name="l02197"></a><span class="lineno"> 2197</span>              Arg != ArgEnd; ++Arg)</div>
+<div class="line"><a name="l02198"></a><span class="lineno"> 2198</span>         Queue.push_back(Arg->getTypePtr());</div>
+<div class="line"><a name="l02199"></a><span class="lineno"> 2199</span>       <span class="comment">// fallthrough</span></div>
+<div class="line"><a name="l02200"></a><span class="lineno"> 2200</span>     }</div>
+<div class="line"><a name="l02201"></a><span class="lineno"> 2201</span>     <span class="keywordflow">case</span> Type::FunctionNoProto: {</div>
+<div class="line"><a name="l02202"></a><span class="lineno"> 2202</span>       <span class="keyword">const</span> <a class="code" href="classclang_1_1FunctionType.html">FunctionType</a> *FnType = cast<FunctionType>(T);</div>
+<div class="line"><a name="l02203"></a><span class="lineno"> 2203</span>       T = FnType-><a class="code" href="classclang_1_1FunctionType.html#aafa453cd7e81a7c3d6c61f261e68afe8">getResultType</a>().<a class="code" href="classclang_1_1QualType.html#a669d7ba0645cd05d53508e3c1895075a">getTypePtr</a>();</div>
+<div class="line"><a name="l02204"></a><span class="lineno"> 2204</span>       <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l02205"></a><span class="lineno"> 2205</span>     }</div>
+<div class="line"><a name="l02206"></a><span class="lineno"> 2206</span> </div>
+<div class="line"><a name="l02207"></a><span class="lineno"> 2207</span>     <span class="comment">//     -- If T is a pointer to a member function of a class X, its</span></div>
+<div class="line"><a name="l02208"></a><span class="lineno"> 2208</span>     <span class="comment">//        associated namespaces and classes are those associated</span></div>
+<div class="line"><a name="l02209"></a><span class="lineno"> 2209</span>     <span class="comment">//        with the function parameter types and return type,</span></div>
+<div class="line"><a name="l02210"></a><span class="lineno"> 2210</span>     <span class="comment">//        together with those associated with X.</span></div>
+<div class="line"><a name="l02211"></a><span class="lineno"> 2211</span>     <span class="comment">//</span></div>
+<div class="line"><a name="l02212"></a><span class="lineno"> 2212</span>     <span class="comment">//     -- If T is a pointer to a data member of class X, its</span></div>
+<div class="line"><a name="l02213"></a><span class="lineno"> 2213</span>     <span class="comment">//        associated namespaces and classes are those associated</span></div>
+<div class="line"><a name="l02214"></a><span class="lineno"> 2214</span>     <span class="comment">//        with the member type together with those associated with</span></div>
+<div class="line"><a name="l02215"></a><span class="lineno"> 2215</span>     <span class="comment">//        X.</span></div>
+<div class="line"><a name="l02216"></a><span class="lineno"> 2216</span>     <span class="keywordflow">case</span> Type::MemberPointer: {</div>
+<div class="line"><a name="l02217"></a><span class="lineno"> 2217</span>       <span class="keyword">const</span> <a class="code" href="classclang_1_1MemberPointerType.html">MemberPointerType</a> *MemberPtr = cast<MemberPointerType>(T);</div>
+<div class="line"><a name="l02218"></a><span class="lineno"> 2218</span> </div>
+<div class="line"><a name="l02219"></a><span class="lineno"> 2219</span>       <span class="comment">// Queue up the class type into which this points.</span></div>
+<div class="line"><a name="l02220"></a><span class="lineno"> 2220</span>       Queue.push_back(MemberPtr-><a class="code" href="classclang_1_1MemberPointerType.html#a74f40efdd2bcca293720459931fba7ea">getClass</a>());</div>
+<div class="line"><a name="l02221"></a><span class="lineno"> 2221</span> </div>
+<div class="line"><a name="l02222"></a><span class="lineno"> 2222</span>       <span class="comment">// And directly continue with the pointee type.</span></div>
+<div class="line"><a name="l02223"></a><span class="lineno"> 2223</span>       T = MemberPtr-><a class="code" href="classclang_1_1MemberPointerType.html#a3f0b2f25c4ad91d2e8bd2752d9552199">getPointeeType</a>().<a class="code" href="classclang_1_1QualType.html#a669d7ba0645cd05d53508e3c1895075a">getTypePtr</a>();</div>
+<div class="line"><a name="l02224"></a><span class="lineno"> 2224</span>       <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l02225"></a><span class="lineno"> 2225</span>     }</div>
+<div class="line"><a name="l02226"></a><span class="lineno"> 2226</span> </div>
+<div class="line"><a name="l02227"></a><span class="lineno"> 2227</span>     <span class="comment">// As an extension, treat this like a normal pointer.</span></div>
+<div class="line"><a name="l02228"></a><span class="lineno"> 2228</span>     <span class="keywordflow">case</span> Type::BlockPointer:</div>
+<div class="line"><a name="l02229"></a><span class="lineno"> 2229</span>       T = cast<BlockPointerType>(T)->getPointeeType().getTypePtr();</div>
+<div class="line"><a name="l02230"></a><span class="lineno"> 2230</span>       <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l02231"></a><span class="lineno"> 2231</span> </div>
+<div class="line"><a name="l02232"></a><span class="lineno"> 2232</span>     <span class="comment">// References aren't covered by the standard, but that's such an</span></div>
+<div class="line"><a name="l02233"></a><span class="lineno"> 2233</span>     <span class="comment">// obvious defect that we cover them anyway.</span></div>
+<div class="line"><a name="l02234"></a><span class="lineno"> 2234</span>     <span class="keywordflow">case</span> Type::LValueReference:</div>
+<div class="line"><a name="l02235"></a><span class="lineno"> 2235</span>     <span class="keywordflow">case</span> Type::RValueReference:</div>
+<div class="line"><a name="l02236"></a><span class="lineno"> 2236</span>       T = cast<ReferenceType>(T)->getPointeeType().getTypePtr();</div>
+<div class="line"><a name="l02237"></a><span class="lineno"> 2237</span>       <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l02238"></a><span class="lineno"> 2238</span> </div>
+<div class="line"><a name="l02239"></a><span class="lineno"> 2239</span>     <span class="comment">// These are fundamental types.</span></div>
+<div class="line"><a name="l02240"></a><span class="lineno"> 2240</span>     <span class="keywordflow">case</span> Type::Vector:</div>
+<div class="line"><a name="l02241"></a><span class="lineno"> 2241</span>     <span class="keywordflow">case</span> Type::ExtVector:</div>
+<div class="line"><a name="l02242"></a><span class="lineno"> 2242</span>     <span class="keywordflow">case</span> Type::Complex:</div>
+<div class="line"><a name="l02243"></a><span class="lineno"> 2243</span>       <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l02244"></a><span class="lineno"> 2244</span> </div>
+<div class="line"><a name="l02245"></a><span class="lineno"> 2245</span>     <span class="comment">// Non-deduced auto types only get here for error cases.</span></div>
+<div class="line"><a name="l02246"></a><span class="lineno"> 2246</span>     <span class="keywordflow">case</span> Type::Auto:</div>
+<div class="line"><a name="l02247"></a><span class="lineno"> 2247</span>       <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l02248"></a><span class="lineno"> 2248</span> </div>
+<div class="line"><a name="l02249"></a><span class="lineno"> 2249</span>     <span class="comment">// If T is an Objective-C object or interface type, or a pointer to an </span></div>
+<div class="line"><a name="l02250"></a><span class="lineno"> 2250</span>     <span class="comment">// object or interface type, the associated namespace is the global</span></div>
+<div class="line"><a name="l02251"></a><span class="lineno"> 2251</span>     <span class="comment">// namespace.</span></div>
+<div class="line"><a name="l02252"></a><span class="lineno"> 2252</span>     <span class="keywordflow">case</span> Type::ObjCObject:</div>
+<div class="line"><a name="l02253"></a><span class="lineno"> 2253</span>     <span class="keywordflow">case</span> Type::ObjCInterface:</div>
+<div class="line"><a name="l02254"></a><span class="lineno"> 2254</span>     <span class="keywordflow">case</span> Type::ObjCObjectPointer:</div>
+<div class="line"><a name="l02255"></a><span class="lineno"> 2255</span>       Result.Namespaces.insert(Result.S.Context.getTranslationUnitDecl());</div>
+<div class="line"><a name="l02256"></a><span class="lineno"> 2256</span>       <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l02257"></a><span class="lineno"> 2257</span> </div>
+<div class="line"><a name="l02258"></a><span class="lineno"> 2258</span>     <span class="comment">// Atomic types are just wrappers; use the associations of the</span></div>
+<div class="line"><a name="l02259"></a><span class="lineno"> 2259</span>     <span class="comment">// contained type.</span></div>
+<div class="line"><a name="l02260"></a><span class="lineno"> 2260</span>     <span class="keywordflow">case</span> Type::Atomic:</div>
+<div class="line"><a name="l02261"></a><span class="lineno"> 2261</span>       T = cast<AtomicType>(T)->getValueType().getTypePtr();</div>
+<div class="line"><a name="l02262"></a><span class="lineno"> 2262</span>       <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l02263"></a><span class="lineno"> 2263</span>     }</div>
+<div class="line"><a name="l02264"></a><span class="lineno"> 2264</span> </div>
+<div class="line"><a name="l02265"></a><span class="lineno"> 2265</span>     <span class="keywordflow">if</span> (Queue.empty())</div>
+<div class="line"><a name="l02266"></a><span class="lineno"> 2266</span>       <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l02267"></a><span class="lineno"> 2267</span>     T = Queue.pop_back_val();</div>
+<div class="line"><a name="l02268"></a><span class="lineno"> 2268</span>   }</div>
+<div class="line"><a name="l02269"></a><span class="lineno"> 2269</span> }</div>
+<div class="line"><a name="l02270"></a><span class="lineno"> 2270</span> <span class="comment"></span></div>
+<div class="line"><a name="l02271"></a><span class="lineno"> 2271</span> <span class="comment">/// \brief Find the associated classes and namespaces for</span></div>
+<div class="line"><a name="l02272"></a><span class="lineno"> 2272</span> <span class="comment">/// argument-dependent lookup for a call with the given set of</span></div>
+<div class="line"><a name="l02273"></a><span class="lineno"> 2273</span> <span class="comment">/// arguments.</span></div>
+<div class="line"><a name="l02274"></a><span class="lineno"> 2274</span> <span class="comment">///</span></div>
+<div class="line"><a name="l02275"></a><span class="lineno"> 2275</span> <span class="comment">/// This routine computes the sets of associated classes and associated</span></div>
+<div class="line"><a name="l02276"></a><span class="lineno"> 2276</span> <span class="comment">/// namespaces searched by argument-dependent lookup</span></div>
+<div class="line"><a name="l02277"></a><span class="lineno"> 2277</span> <span class="comment">/// (C++ [basic.lookup.argdep]) for a given set of arguments.</span></div>
+<div class="line"><a name="l02278"></a><span class="lineno"><a class="code" href="classclang_1_1Sema.html#a5877dff234054e1a919e344bad081a81"> 2278</a></span> <span class="comment"></span><span class="keywordtype">void</span> <a class="code" href="classclang_1_1Sema.html#a5877dff234054e1a919e344bad081a81" title="Find the associated classes and namespaces for argument-dependent lookup for a call with the given se...">Sema::FindAssociatedClassesAndNamespaces</a>(</div>
+<div class="line"><a name="l02279"></a><span class="lineno"> 2279</span>     <a class="code" href="classclang_1_1SourceLocation.html" title="Encodes a location in the source. The SourceManager can decode this to get at the full include stack...">SourceLocation</a> InstantiationLoc, <a class="code" href="classllvm_1_1ArrayRef.html">ArrayRef<Expr *></a> <a class="code" href="SemaOverload_8cpp.html#ab0970fce5a85028c7eac6fb99797fea5">Args</a>,</div>
+<div class="line"><a name="l02280"></a><span class="lineno"> 2280</span>     <a class="code" href="classclang_1_1Sema.html#a27dbfb91fb72a732f276f392a0f80564">AssociatedNamespaceSet</a> &AssociatedNamespaces,</div>
+<div class="line"><a name="l02281"></a><span class="lineno"> 2281</span>     <a class="code" href="classclang_1_1Sema.html#a676e1612f9cbf42bb41120835e9b4d5a">AssociatedClassSet</a> &AssociatedClasses) {</div>
+<div class="line"><a name="l02282"></a><span class="lineno"> 2282</span>   AssociatedNamespaces.clear();</div>
+<div class="line"><a name="l02283"></a><span class="lineno"> 2283</span>   AssociatedClasses.clear();</div>
+<div class="line"><a name="l02284"></a><span class="lineno"> 2284</span> </div>
+<div class="line"><a name="l02285"></a><span class="lineno"> 2285</span>   AssociatedLookup Result(*<span class="keyword">this</span>, InstantiationLoc,</div>
+<div class="line"><a name="l02286"></a><span class="lineno"> 2286</span>                           AssociatedNamespaces, AssociatedClasses);</div>
+<div class="line"><a name="l02287"></a><span class="lineno"> 2287</span> </div>
+<div class="line"><a name="l02288"></a><span class="lineno"> 2288</span>   <span class="comment">// C++ [basic.lookup.koenig]p2:</span></div>
+<div class="line"><a name="l02289"></a><span class="lineno"> 2289</span>   <span class="comment">//   For each argument type T in the function call, there is a set</span></div>
+<div class="line"><a name="l02290"></a><span class="lineno"> 2290</span>   <span class="comment">//   of zero or more associated namespaces and a set of zero or more</span></div>
+<div class="line"><a name="l02291"></a><span class="lineno"> 2291</span>   <span class="comment">//   associated classes to be considered. The sets of namespaces and</span></div>
+<div class="line"><a name="l02292"></a><span class="lineno"> 2292</span>   <span class="comment">//   classes is determined entirely by the types of the function</span></div>
+<div class="line"><a name="l02293"></a><span class="lineno"> 2293</span>   <span class="comment">//   arguments (and the namespace of any template template</span></div>
+<div class="line"><a name="l02294"></a><span class="lineno"> 2294</span>   <span class="comment">//   argument).</span></div>
+<div class="line"><a name="l02295"></a><span class="lineno"> 2295</span>   <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> ArgIdx = 0; ArgIdx != Args.size(); ++ArgIdx) {</div>
+<div class="line"><a name="l02296"></a><span class="lineno"> 2296</span>     <a class="code" href="classclang_1_1Expr.html">Expr</a> *Arg = Args[ArgIdx];</div>
+<div class="line"><a name="l02297"></a><span class="lineno"> 2297</span> </div>
+<div class="line"><a name="l02298"></a><span class="lineno"> 2298</span>     <span class="keywordflow">if</span> (Arg-><a class="code" href="classclang_1_1Expr.html#a3dd8850a4ad8a5b5f595dd9e9446187b">getType</a>() != <a class="code" href="ASTMatchFinder_8cpp.html#a779280869b9fac47a9bc391e7709171f">Context</a>.<a class="code" href="classclang_1_1ASTContext.html#a9630077a927001f119e396456dc9e091">OverloadTy</a>) {</div>
+<div class="line"><a name="l02299"></a><span class="lineno"> 2299</span>       <a class="code" href="SemaLookup_8cpp.html#a3431ccd46048ca07cc87ae459859782f">addAssociatedClassesAndNamespaces</a>(Result, Arg-><a class="code" href="classclang_1_1Expr.html#a3dd8850a4ad8a5b5f595dd9e9446187b">getType</a>());</div>
+<div class="line"><a name="l02300"></a><span class="lineno"> 2300</span>       <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l02301"></a><span class="lineno"> 2301</span>     }</div>
+<div class="line"><a name="l02302"></a><span class="lineno"> 2302</span> </div>
+<div class="line"><a name="l02303"></a><span class="lineno"> 2303</span>     <span class="comment">// [...] In addition, if the argument is the name or address of a</span></div>
+<div class="line"><a name="l02304"></a><span class="lineno"> 2304</span>     <span class="comment">// set of overloaded functions and/or function templates, its</span></div>
+<div class="line"><a name="l02305"></a><span class="lineno"> 2305</span>     <span class="comment">// associated classes and namespaces are the union of those</span></div>
+<div class="line"><a name="l02306"></a><span class="lineno"> 2306</span>     <span class="comment">// associated with each of the members of the set: the namespace</span></div>
+<div class="line"><a name="l02307"></a><span class="lineno"> 2307</span>     <span class="comment">// in which the function or function template is defined and the</span></div>
+<div class="line"><a name="l02308"></a><span class="lineno"> 2308</span>     <span class="comment">// classes and namespaces associated with its (non-dependent)</span></div>
+<div class="line"><a name="l02309"></a><span class="lineno"> 2309</span>     <span class="comment">// parameter types and return type.</span></div>
+<div class="line"><a name="l02310"></a><span class="lineno"> 2310</span>     Arg = Arg-><a class="code" href="classclang_1_1Expr.html#a6128786ad6c6ad61b66ad4ddf09b1bd8">IgnoreParens</a>();</div>
+<div class="line"><a name="l02311"></a><span class="lineno"> 2311</span>     <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1UnaryOperator.html">UnaryOperator</a> *unaryOp = dyn_cast<UnaryOperator>(Arg))</div>
+<div class="line"><a name="l02312"></a><span class="lineno"> 2312</span>       <span class="keywordflow">if</span> (unaryOp->getOpcode() == <a class="code" href="namespaceclang.html#a8daaf3ab8b5c55053f6da47944e48fffa74539ddfc7ac7056cfaeeca1deed46be">UO_AddrOf</a>)</div>
+<div class="line"><a name="l02313"></a><span class="lineno"> 2313</span>         Arg = unaryOp->getSubExpr();</div>
+<div class="line"><a name="l02314"></a><span class="lineno"> 2314</span> </div>
+<div class="line"><a name="l02315"></a><span class="lineno"> 2315</span>     <a class="code" href="classclang_1_1UnresolvedLookupExpr.html" title="A reference to a name which we were able to look up during parsing but could not resolve to a specifi...">UnresolvedLookupExpr</a> *ULE = dyn_cast<<a class="code" href="classclang_1_1UnresolvedLookupExpr.html" title="A reference to a name which we were able to look up during parsing but could not resolve to a specifi...">UnresolvedLookupExpr</a>>(Arg);</div>
+<div class="line"><a name="l02316"></a><span class="lineno"> 2316</span>     <span class="keywordflow">if</span> (!ULE) <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l02317"></a><span class="lineno"> 2317</span> </div>
+<div class="line"><a name="l02318"></a><span class="lineno"> 2318</span>     <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1UnresolvedSetIterator.html">UnresolvedSetIterator</a> I = ULE-><a class="code" href="classclang_1_1OverloadExpr.html#a9a12986279b9dff84c986b89cbbf973a">decls_begin</a>(), E = ULE-><a class="code" href="classclang_1_1OverloadExpr.html#a41e78198ffeb61834d71e61e1860fe02">decls_end</a>();</div>
+<div class="line"><a name="l02319"></a><span class="lineno"> 2319</span>            I != E; ++I) {</div>
+<div class="line"><a name="l02320"></a><span class="lineno"> 2320</span>       <span class="comment">// Look through any using declarations to find the underlying function.</span></div>
+<div class="line"><a name="l02321"></a><span class="lineno"> 2321</span>       <a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *Fn = (*I)-><a class="code" href="classclang_1_1NamedDecl.html#a8fee30304b9ae8b24136a279b678b951" title="Looks through UsingDecls and ObjCCompatibleAliasDecls for the underlying named decl.">getUnderlyingDecl</a>();</div>
+<div class="line"><a name="l02322"></a><span class="lineno"> 2322</span> </div>
+<div class="line"><a name="l02323"></a><span class="lineno"> 2323</span>       <a class="code" href="classclang_1_1FunctionDecl.html">FunctionDecl</a> *FDecl = dyn_cast<<a class="code" href="classclang_1_1FunctionDecl.html">FunctionDecl</a>>(Fn);</div>
+<div class="line"><a name="l02324"></a><span class="lineno"> 2324</span>       <span class="keywordflow">if</span> (!FDecl)</div>
+<div class="line"><a name="l02325"></a><span class="lineno"> 2325</span>         FDecl = cast<FunctionTemplateDecl>(Fn)->getTemplatedDecl();</div>
+<div class="line"><a name="l02326"></a><span class="lineno"> 2326</span> </div>
+<div class="line"><a name="l02327"></a><span class="lineno"> 2327</span>       <span class="comment">// Add the classes and namespaces associated with the parameter</span></div>
+<div class="line"><a name="l02328"></a><span class="lineno"> 2328</span>       <span class="comment">// types and return type of this function.</span></div>
+<div class="line"><a name="l02329"></a><span class="lineno"> 2329</span>       <a class="code" href="SemaLookup_8cpp.html#a3431ccd46048ca07cc87ae459859782f">addAssociatedClassesAndNamespaces</a>(Result, FDecl-><a class="code" href="classclang_1_1ValueDecl.html#aefa6d3327144aee23d2935f41d993484">getType</a>());</div>
+<div class="line"><a name="l02330"></a><span class="lineno"> 2330</span>     }</div>
+<div class="line"><a name="l02331"></a><span class="lineno"> 2331</span>   }</div>
+<div class="line"><a name="l02332"></a><span class="lineno"> 2332</span> }</div>
+<div class="line"><a name="l02333"></a><span class="lineno"> 2333</span> <span class="comment"></span></div>
+<div class="line"><a name="l02334"></a><span class="lineno"> 2334</span> <span class="comment">/// IsAcceptableNonMemberOperatorCandidate - Determine whether Fn is</span></div>
+<div class="line"><a name="l02335"></a><span class="lineno"> 2335</span> <span class="comment">/// an acceptable non-member overloaded operator for a call whose</span></div>
+<div class="line"><a name="l02336"></a><span class="lineno"> 2336</span> <span class="comment">/// arguments have types T1 (and, if non-empty, T2). This routine</span></div>
+<div class="line"><a name="l02337"></a><span class="lineno"> 2337</span> <span class="comment">/// implements the check in C++ [over.match.oper]p3b2 concerning</span></div>
+<div class="line"><a name="l02338"></a><span class="lineno"> 2338</span> <span class="comment">/// enumeration types.</span></div>
+<div class="line"><a name="l02339"></a><span class="lineno"> 2339</span> <span class="comment"></span><span class="keyword">static</span> <span class="keywordtype">bool</span></div>
+<div class="line"><a name="l02340"></a><span class="lineno"><a class="code" href="SemaLookup_8cpp.html#a09a3390e17b62472963f07da2acca607"> 2340</a></span> <a class="code" href="SemaLookup_8cpp.html#a09a3390e17b62472963f07da2acca607">IsAcceptableNonMemberOperatorCandidate</a>(<a class="code" href="classclang_1_1FunctionDecl.html">FunctionDecl</a> *Fn,</div>
+<div class="line"><a name="l02341"></a><span class="lineno"> 2341</span>                                        <a class="code" href="classclang_1_1QualType.html">QualType</a> T1, <a class="code" href="classclang_1_1QualType.html">QualType</a> T2,</div>
+<div class="line"><a name="l02342"></a><span class="lineno"> 2342</span>                                        <a class="code" href="classclang_1_1ASTContext.html" title="Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...">ASTContext</a> &<a class="code" href="ASTMatchFinder_8cpp.html#a779280869b9fac47a9bc391e7709171f">Context</a>) {</div>
+<div class="line"><a name="l02343"></a><span class="lineno"> 2343</span>   <span class="keywordflow">if</span> (T1-><a class="code" href="classclang_1_1Type.html#a7e475b7859ae970eb837da95e94ab26c">isDependentType</a>() || (!T2.<a class="code" href="classclang_1_1QualType.html#a8f87f58000490ad01cd09add1f27d7ac" title="isNull - Return true if this QualType doesn't point to a type yet.">isNull</a>() && T2-><a class="code" href="classclang_1_1Type.html#a7e475b7859ae970eb837da95e94ab26c">isDependentType</a>()))</div>
+<div class="line"><a name="l02344"></a><span class="lineno"> 2344</span>     <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
+<div class="line"><a name="l02345"></a><span class="lineno"> 2345</span> </div>
+<div class="line"><a name="l02346"></a><span class="lineno"> 2346</span>   <span class="keywordflow">if</span> (T1-><a class="code" href="classclang_1_1Type.html#a6525adb10d549a7ee372424dcdb6b9bd">isRecordType</a>() || (!T2.<a class="code" href="classclang_1_1QualType.html#a8f87f58000490ad01cd09add1f27d7ac" title="isNull - Return true if this QualType doesn't point to a type yet.">isNull</a>() && T2-><a class="code" href="classclang_1_1Type.html#a6525adb10d549a7ee372424dcdb6b9bd">isRecordType</a>()))</div>
+<div class="line"><a name="l02347"></a><span class="lineno"> 2347</span>     <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
+<div class="line"><a name="l02348"></a><span class="lineno"> 2348</span> </div>
+<div class="line"><a name="l02349"></a><span class="lineno"> 2349</span>   <span class="keyword">const</span> <a class="code" href="classclang_1_1FunctionProtoType.html">FunctionProtoType</a> *Proto = Fn-><a class="code" href="classclang_1_1ValueDecl.html#aefa6d3327144aee23d2935f41d993484">getType</a>()-><a class="code" href="classclang_1_1Type.html#a12103ea8bee9506930287bab68a08569">getAs</a><<a class="code" href="classclang_1_1FunctionProtoType.html">FunctionProtoType</a>>();</div>
+<div class="line"><a name="l02350"></a><span class="lineno"> 2350</span>   <span class="keywordflow">if</span> (Proto-><a class="code" href="classclang_1_1FunctionProtoType.html#a3bf15e11417c0547307698e6b3fc8772">getNumArgs</a>() < 1)</div>
+<div class="line"><a name="l02351"></a><span class="lineno"> 2351</span>     <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l02352"></a><span class="lineno"> 2352</span> </div>
+<div class="line"><a name="l02353"></a><span class="lineno"> 2353</span>   <span class="keywordflow">if</span> (T1-><a class="code" href="classclang_1_1Type.html#a1b8eefccd216afd2ff89e2fa71f9f089">isEnumeralType</a>()) {</div>
+<div class="line"><a name="l02354"></a><span class="lineno"> 2354</span>     <a class="code" href="classclang_1_1QualType.html">QualType</a> ArgType = Proto-><a class="code" href="classclang_1_1FunctionProtoType.html#ab515293e3ef4f959921927dd03dcf085">getArgType</a>(0).<a class="code" href="classclang_1_1QualType.html#ab6a2e89b5fcb1618aaef3a38563b10e4">getNonReferenceType</a>();</div>
+<div class="line"><a name="l02355"></a><span class="lineno"> 2355</span>     <span class="keywordflow">if</span> (Context.<a class="code" href="classclang_1_1ASTContext.html#a40efa7d4fe133c0a709f0df4b6fcc2bf" title="Determine whether the given types are equivalent after cvr-qualifiers have been removed.">hasSameUnqualifiedType</a>(T1, ArgType))</div>
+<div class="line"><a name="l02356"></a><span class="lineno"> 2356</span>       <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
+<div class="line"><a name="l02357"></a><span class="lineno"> 2357</span>   }</div>
+<div class="line"><a name="l02358"></a><span class="lineno"> 2358</span> </div>
+<div class="line"><a name="l02359"></a><span class="lineno"> 2359</span>   <span class="keywordflow">if</span> (Proto-><a class="code" href="classclang_1_1FunctionProtoType.html#a3bf15e11417c0547307698e6b3fc8772">getNumArgs</a>() < 2)</div>
+<div class="line"><a name="l02360"></a><span class="lineno"> 2360</span>     <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l02361"></a><span class="lineno"> 2361</span> </div>
+<div class="line"><a name="l02362"></a><span class="lineno"> 2362</span>   <span class="keywordflow">if</span> (!T2.<a class="code" href="classclang_1_1QualType.html#a8f87f58000490ad01cd09add1f27d7ac" title="isNull - Return true if this QualType doesn't point to a type yet.">isNull</a>() && T2-><a class="code" href="classclang_1_1Type.html#a1b8eefccd216afd2ff89e2fa71f9f089">isEnumeralType</a>()) {</div>
+<div class="line"><a name="l02363"></a><span class="lineno"> 2363</span>     <a class="code" href="classclang_1_1QualType.html">QualType</a> ArgType = Proto-><a class="code" href="classclang_1_1FunctionProtoType.html#ab515293e3ef4f959921927dd03dcf085">getArgType</a>(1).<a class="code" href="classclang_1_1QualType.html#ab6a2e89b5fcb1618aaef3a38563b10e4">getNonReferenceType</a>();</div>
+<div class="line"><a name="l02364"></a><span class="lineno"> 2364</span>     <span class="keywordflow">if</span> (Context.<a class="code" href="classclang_1_1ASTContext.html#a40efa7d4fe133c0a709f0df4b6fcc2bf" title="Determine whether the given types are equivalent after cvr-qualifiers have been removed.">hasSameUnqualifiedType</a>(T2, ArgType))</div>
+<div class="line"><a name="l02365"></a><span class="lineno"> 2365</span>       <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
+<div class="line"><a name="l02366"></a><span class="lineno"> 2366</span>   }</div>
+<div class="line"><a name="l02367"></a><span class="lineno"> 2367</span> </div>
+<div class="line"><a name="l02368"></a><span class="lineno"> 2368</span>   <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
+<div class="line"><a name="l02369"></a><span class="lineno"> 2369</span> }</div>
+<div class="line"><a name="l02370"></a><span class="lineno"> 2370</span> </div>
+<div class="line"><a name="l02371"></a><span class="lineno"><a class="code" href="classclang_1_1Sema.html#a48d86d16f21c7156e76e364727e3beea"> 2371</a></span> <a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *<a class="code" href="classclang_1_1Sema.html#a48d86d16f21c7156e76e364727e3beea" title="Look up a name, looking for a single declaration. Return null if the results were absent...">Sema::LookupSingleName</a>(<a class="code" href="classclang_1_1Scope.html">Scope</a> *S, <a class="code" href="classclang_1_1DeclarationName.html">DeclarationName</a> Name,</div>
+<div class="line"><a name="l02372"></a><span class="lineno"> 2372</span>                                   <a class="code" href="classclang_1_1SourceLocation.html" title="Encodes a location in the source. The SourceManager can decode this to get at the full include stack...">SourceLocation</a> Loc,</div>
+<div class="line"><a name="l02373"></a><span class="lineno"> 2373</span>                                   <a class="code" href="classclang_1_1Sema.html#a0c6e994c44767e74e2892aa0235efb1a" title="Describes the kind of name lookup to perform.">LookupNameKind</a> NameKind,</div>
+<div class="line"><a name="l02374"></a><span class="lineno"> 2374</span>                                   <a class="code" href="classclang_1_1Sema.html#a91abc8920d6bf0e4dc8c7c21aa821a09" title="Specifies whether (or how) name lookup is being performed for a redeclaration (vs. a reference).">RedeclarationKind</a> Redecl) {</div>
+<div class="line"><a name="l02375"></a><span class="lineno"> 2375</span>   <a class="code" href="classclang_1_1LookupResult.html" title="Represents the results of name lookup.">LookupResult</a> R(*<span class="keyword">this</span>, Name, Loc, NameKind, Redecl);</div>
+<div class="line"><a name="l02376"></a><span class="lineno"> 2376</span>   LookupName(R, S);</div>
+<div class="line"><a name="l02377"></a><span class="lineno"> 2377</span>   <span class="keywordflow">return</span> R.<a class="code" href="classclang_1_1LookupResult.html#a94bcf1d27520ce8a3a9603e76dd4acee">getAsSingle</a><<a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a>>();</div>
+<div class="line"><a name="l02378"></a><span class="lineno"> 2378</span> }</div>
+<div class="line"><a name="l02379"></a><span class="lineno"> 2379</span> <span class="comment"></span></div>
+<div class="line"><a name="l02380"></a><span class="lineno"> 2380</span> <span class="comment">/// \brief Find the protocol with the given name, if any.</span></div>
+<div class="line"><a name="l02381"></a><span class="lineno"><a class="code" href="classclang_1_1Sema.html#a99744fb16551075377767439ed06a2d6"> 2381</a></span> <span class="comment"></span><a class="code" href="classclang_1_1ObjCProtocolDecl.html" title="Represents an Objective-C protocol declaration.">ObjCProtocolDecl</a> *<a class="code" href="classclang_1_1Sema.html#a99744fb16551075377767439ed06a2d6" title="Find the protocol with the given name, if any.">Sema::LookupProtocol</a>(<a class="code" href="classclang_1_1IdentifierInfo.html">IdentifierInfo</a> *II,</div>
+<div class="line"><a name="l02382"></a><span class="lineno"> 2382</span>                                        <a class="code" href="classclang_1_1SourceLocation.html" title="Encodes a location in the source. The SourceManager can decode this to get at the full include stack...">SourceLocation</a> IdLoc,</div>
+<div class="line"><a name="l02383"></a><span class="lineno"> 2383</span>                                        <a class="code" href="classclang_1_1Sema.html#a91abc8920d6bf0e4dc8c7c21aa821a09" title="Specifies whether (or how) name lookup is being performed for a redeclaration (vs. a reference).">RedeclarationKind</a> Redecl) {</div>
+<div class="line"><a name="l02384"></a><span class="lineno"> 2384</span>   <a class="code" href="classclang_1_1Decl.html">Decl</a> *D = LookupSingleName(TUScope, II, IdLoc,</div>
+<div class="line"><a name="l02385"></a><span class="lineno"> 2385</span>                              LookupObjCProtocolName, Redecl);</div>
+<div class="line"><a name="l02386"></a><span class="lineno"> 2386</span>   <span class="keywordflow">return</span> cast_or_null<ObjCProtocolDecl>(D);</div>
+<div class="line"><a name="l02387"></a><span class="lineno"> 2387</span> }</div>
+<div class="line"><a name="l02388"></a><span class="lineno"> 2388</span> </div>
+<div class="line"><a name="l02389"></a><span class="lineno"><a class="code" href="classclang_1_1Sema.html#a6a7a57d213e7d5bf8d5cd44cfee83450"> 2389</a></span> <span class="keywordtype">void</span> <a class="code" href="classclang_1_1Sema.html#a6a7a57d213e7d5bf8d5cd44cfee83450">Sema::LookupOverloadedOperatorName</a>(<a class="code" href="namespaceclang.html#ad937c281bb5b868d30a72c9bf137baf6" title="Enumeration specifying the different kinds of C++ overloaded operators.">OverloadedOperatorKind</a> Op, <a class="code" href="classclang_1_1Scope.html">Scope</a> *S,</div>
+<div class="line"><a name="l02390"></a><span class="lineno"> 2390</span>                                         <a class="code" href="classclang_1_1QualType.html">QualType</a> T1, <a class="code" href="classclang_1_1QualType.html">QualType</a> T2,</div>
+<div class="line"><a name="l02391"></a><span class="lineno"> 2391</span>                                         <a class="code" href="classclang_1_1UnresolvedSetImpl.html" title="A set of unresolved declarations.">UnresolvedSetImpl</a> &Functions) {</div>
+<div class="line"><a name="l02392"></a><span class="lineno"> 2392</span>   <span class="comment">// C++ [over.match.oper]p3:</span></div>
+<div class="line"><a name="l02393"></a><span class="lineno"> 2393</span>   <span class="comment">//     -- The set of non-member candidates is the result of the</span></div>
+<div class="line"><a name="l02394"></a><span class="lineno"> 2394</span>   <span class="comment">//        unqualified lookup of operator@ in the context of the</span></div>
+<div class="line"><a name="l02395"></a><span class="lineno"> 2395</span>   <span class="comment">//        expression according to the usual rules for name lookup in</span></div>
+<div class="line"><a name="l02396"></a><span class="lineno"> 2396</span>   <span class="comment">//        unqualified function calls (3.4.2) except that all member</span></div>
+<div class="line"><a name="l02397"></a><span class="lineno"> 2397</span>   <span class="comment">//        functions are ignored. However, if no operand has a class</span></div>
+<div class="line"><a name="l02398"></a><span class="lineno"> 2398</span>   <span class="comment">//        type, only those non-member functions in the lookup set</span></div>
+<div class="line"><a name="l02399"></a><span class="lineno"> 2399</span>   <span class="comment">//        that have a first parameter of type T1 or "reference to</span></div>
+<div class="line"><a name="l02400"></a><span class="lineno"> 2400</span>   <span class="comment">//        (possibly cv-qualified) T1", when T1 is an enumeration</span></div>
+<div class="line"><a name="l02401"></a><span class="lineno"> 2401</span>   <span class="comment">//        type, or (if there is a right operand) a second parameter</span></div>
+<div class="line"><a name="l02402"></a><span class="lineno"> 2402</span>   <span class="comment">//        of type T2 or "reference to (possibly cv-qualified) T2",</span></div>
+<div class="line"><a name="l02403"></a><span class="lineno"> 2403</span>   <span class="comment">//        when T2 is an enumeration type, are candidate functions.</span></div>
+<div class="line"><a name="l02404"></a><span class="lineno"> 2404</span>   <a class="code" href="classclang_1_1DeclarationName.html">DeclarationName</a> OpName = <a class="code" href="ASTMatchFinder_8cpp.html#a779280869b9fac47a9bc391e7709171f">Context</a>.<a class="code" href="classclang_1_1ASTContext.html#a2017d2a1ae842fcf4e5df3097c7b93ba">DeclarationNames</a>.<a class="code" href="classclang_1_1DeclarationNameTable.html#a203b7bc56be9c91386d77227ee67381e">getCXXOperatorName</a>(Op);</div>
+<div class="line"><a name="l02405"></a><span class="lineno"> 2405</span>   <a class="code" href="classclang_1_1LookupResult.html" title="Represents the results of name lookup.">LookupResult</a> Operators(*<span class="keyword">this</span>, OpName, <a class="code" href="classclang_1_1SourceLocation.html" title="Encodes a location in the source. The SourceManager can decode this to get at the full include stack...">SourceLocation</a>(), LookupOperatorName);</div>
+<div class="line"><a name="l02406"></a><span class="lineno"> 2406</span>   LookupName(Operators, S);</div>
+<div class="line"><a name="l02407"></a><span class="lineno"> 2407</span> </div>
+<div class="line"><a name="l02408"></a><span class="lineno"> 2408</span>   assert(!Operators.<a class="code" href="classclang_1_1LookupResult.html#ad40ced676b01c7ef20a8a3612869bf54">isAmbiguous</a>() && <span class="stringliteral">"Operator lookup cannot be ambiguous"</span>);</div>
+<div class="line"><a name="l02409"></a><span class="lineno"> 2409</span> </div>
+<div class="line"><a name="l02410"></a><span class="lineno"> 2410</span>   <span class="keywordflow">if</span> (Operators.<a class="code" href="classclang_1_1LookupResult.html#a9f44c1cd9d9c7e84dd0202538dd72cd7" title="Return true if no decls were found.">empty</a>())</div>
+<div class="line"><a name="l02411"></a><span class="lineno"> 2411</span>     <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l02412"></a><span class="lineno"> 2412</span> </div>
+<div class="line"><a name="l02413"></a><span class="lineno"> 2413</span>   <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1UnresolvedSetIterator.html">LookupResult::iterator</a> Op = Operators.<a class="code" href="classclang_1_1LookupResult.html#a460debe22c59694c326b3c4671726889">begin</a>(), OpEnd = Operators.<a class="code" href="classclang_1_1LookupResult.html#ae1db847b7820acee0a0371510ccdf1c9">end</a>();</div>
+<div class="line"><a name="l02414"></a><span class="lineno"> 2414</span>        Op != OpEnd; ++Op) {</div>
+<div class="line"><a name="l02415"></a><span class="lineno"> 2415</span>     <a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *Found = (*Op)-><a class="code" href="classclang_1_1NamedDecl.html#a8fee30304b9ae8b24136a279b678b951" title="Looks through UsingDecls and ObjCCompatibleAliasDecls for the underlying named decl.">getUnderlyingDecl</a>();</div>
+<div class="line"><a name="l02416"></a><span class="lineno"> 2416</span>     <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1FunctionDecl.html">FunctionDecl</a> *FD = dyn_cast<FunctionDecl>(Found)) {</div>
+<div class="line"><a name="l02417"></a><span class="lineno"> 2417</span>       <span class="keywordflow">if</span> (<a class="code" href="SemaLookup_8cpp.html#a09a3390e17b62472963f07da2acca607">IsAcceptableNonMemberOperatorCandidate</a>(FD, T1, T2, <a class="code" href="ASTMatchFinder_8cpp.html#a779280869b9fac47a9bc391e7709171f">Context</a>))</div>
+<div class="line"><a name="l02418"></a><span class="lineno"> 2418</span>         Functions.<a class="code" href="classclang_1_1UnresolvedSetImpl.html#af9acf1f68b7d1987270853e03df07145">addDecl</a>(*Op, Op.getAccess()); <span class="comment">// FIXME: canonical FD</span></div>
+<div class="line"><a name="l02419"></a><span class="lineno"> 2419</span>     } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1FunctionTemplateDecl.html" title="Declaration of a template function.">FunctionTemplateDecl</a> *FunTmpl</div>
+<div class="line"><a name="l02420"></a><span class="lineno"> 2420</span>                  = dyn_cast<FunctionTemplateDecl>(Found)) {</div>
+<div class="line"><a name="l02421"></a><span class="lineno"> 2421</span>       <span class="comment">// FIXME: friend operators?</span></div>
+<div class="line"><a name="l02422"></a><span class="lineno"> 2422</span>       <span class="comment">// FIXME: do we need to check IsAcceptableNonMemberOperatorCandidate,</span></div>
+<div class="line"><a name="l02423"></a><span class="lineno"> 2423</span>       <span class="comment">// later?</span></div>
+<div class="line"><a name="l02424"></a><span class="lineno"> 2424</span>       <span class="keywordflow">if</span> (!FunTmpl->getDeclContext()->isRecord())</div>
+<div class="line"><a name="l02425"></a><span class="lineno"> 2425</span>         Functions.<a class="code" href="classclang_1_1UnresolvedSetImpl.html#af9acf1f68b7d1987270853e03df07145">addDecl</a>(*Op, Op.getAccess());</div>
+<div class="line"><a name="l02426"></a><span class="lineno"> 2426</span>     }</div>
+<div class="line"><a name="l02427"></a><span class="lineno"> 2427</span>   }</div>
+<div class="line"><a name="l02428"></a><span class="lineno"> 2428</span> }</div>
+<div class="line"><a name="l02429"></a><span class="lineno"> 2429</span> </div>
+<div class="line"><a name="l02430"></a><span class="lineno"><a class="code" href="classclang_1_1Sema.html#a2f299864a071e1a1f8ad42b75bb34d15"> 2430</a></span> <a class="code" href="classclang_1_1Sema_1_1SpecialMemberOverloadResult.html">Sema::SpecialMemberOverloadResult</a> *<a class="code" href="classclang_1_1Sema.html#a2f299864a071e1a1f8ad42b75bb34d15">Sema::LookupSpecialMember</a>(<a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *RD,</div>
+<div class="line"><a name="l02431"></a><span class="lineno"> 2431</span>                                                             <a class="code" href="classclang_1_1Sema.html#aed7416316b936f2dd51e712f3f84120d" title="Kinds of C++ special members.">CXXSpecialMember</a> <a class="code" href="AnalysisBasedWarnings_8cpp.html#afe4356a77609114d8df0bfc9c2b8701f">SM</a>,</div>
+<div class="line"><a name="l02432"></a><span class="lineno"> 2432</span>                                                             <span class="keywordtype">bool</span> ConstArg,</div>
+<div class="line"><a name="l02433"></a><span class="lineno"> 2433</span>                                                             <span class="keywordtype">bool</span> VolatileArg,</div>
+<div class="line"><a name="l02434"></a><span class="lineno"> 2434</span>                                                             <span class="keywordtype">bool</span> RValueThis,</div>
+<div class="line"><a name="l02435"></a><span class="lineno"> 2435</span>                                                             <span class="keywordtype">bool</span> ConstThis,</div>
+<div class="line"><a name="l02436"></a><span class="lineno"> 2436</span>                                                             <span class="keywordtype">bool</span> VolatileThis) {</div>
+<div class="line"><a name="l02437"></a><span class="lineno"> 2437</span>   assert(<a class="code" href="SemaLookup_8cpp.html#a1b34cb2cdb835df7a4e31f38591a8e6a" title="Determine whether we can declare a special member function within the class at this point...">CanDeclareSpecialMemberFunction</a>(RD) &&</div>
+<div class="line"><a name="l02438"></a><span class="lineno"> 2438</span>          <span class="stringliteral">"doing special member lookup into record that isn't fully complete"</span>);</div>
+<div class="line"><a name="l02439"></a><span class="lineno"> 2439</span>   RD = RD-><a class="code" href="classclang_1_1CXXRecordDecl.html#a2bd01ec3ffb06b176ced1bfc31abd99f">getDefinition</a>();</div>
+<div class="line"><a name="l02440"></a><span class="lineno"> 2440</span>   <span class="keywordflow">if</span> (RValueThis || ConstThis || VolatileThis)</div>
+<div class="line"><a name="l02441"></a><span class="lineno"> 2441</span>     assert((SM == CXXCopyAssignment || SM == CXXMoveAssignment) &&</div>
+<div class="line"><a name="l02442"></a><span class="lineno"> 2442</span>            <span class="stringliteral">"constructors and destructors always have unqualified lvalue this"</span>);</div>
+<div class="line"><a name="l02443"></a><span class="lineno"> 2443</span>   <span class="keywordflow">if</span> (ConstArg || VolatileArg)</div>
+<div class="line"><a name="l02444"></a><span class="lineno"> 2444</span>     assert((SM != CXXDefaultConstructor && SM != CXXDestructor) &&</div>
+<div class="line"><a name="l02445"></a><span class="lineno"> 2445</span>            <span class="stringliteral">"parameter-less special members can't have qualified arguments"</span>);</div>
+<div class="line"><a name="l02446"></a><span class="lineno"> 2446</span> </div>
+<div class="line"><a name="l02447"></a><span class="lineno"> 2447</span>   llvm::FoldingSetNodeID <a class="code" href="namespaceclang_1_1LangAS.html#a78ee38b55acb7cc806cb61e6d2a9f960" title="Defines the set of possible language-specific address spaces.">ID</a>;</div>
+<div class="line"><a name="l02448"></a><span class="lineno"> 2448</span>   ID.AddPointer(RD);</div>
+<div class="line"><a name="l02449"></a><span class="lineno"> 2449</span>   ID.AddInteger(SM);</div>
+<div class="line"><a name="l02450"></a><span class="lineno"> 2450</span>   ID.AddInteger(ConstArg);</div>
+<div class="line"><a name="l02451"></a><span class="lineno"> 2451</span>   ID.AddInteger(VolatileArg);</div>
+<div class="line"><a name="l02452"></a><span class="lineno"> 2452</span>   ID.AddInteger(RValueThis);</div>
+<div class="line"><a name="l02453"></a><span class="lineno"> 2453</span>   ID.AddInteger(ConstThis);</div>
+<div class="line"><a name="l02454"></a><span class="lineno"> 2454</span>   ID.AddInteger(VolatileThis);</div>
+<div class="line"><a name="l02455"></a><span class="lineno"> 2455</span> </div>
+<div class="line"><a name="l02456"></a><span class="lineno"> 2456</span>   <span class="keywordtype">void</span> *InsertPoint;</div>
+<div class="line"><a name="l02457"></a><span class="lineno"> 2457</span>   <a class="code" href="classclang_1_1Sema_1_1SpecialMemberOverloadResult.html">SpecialMemberOverloadResult</a> *Result =</div>
+<div class="line"><a name="l02458"></a><span class="lineno"> 2458</span>     SpecialMemberCache.FindNodeOrInsertPos(ID, InsertPoint);</div>
+<div class="line"><a name="l02459"></a><span class="lineno"> 2459</span> </div>
+<div class="line"><a name="l02460"></a><span class="lineno"> 2460</span>   <span class="comment">// This was already cached</span></div>
+<div class="line"><a name="l02461"></a><span class="lineno"> 2461</span>   <span class="keywordflow">if</span> (Result)</div>
+<div class="line"><a name="l02462"></a><span class="lineno"> 2462</span>     <span class="keywordflow">return</span> Result;</div>
+<div class="line"><a name="l02463"></a><span class="lineno"> 2463</span> </div>
+<div class="line"><a name="l02464"></a><span class="lineno"> 2464</span>   Result = BumpAlloc.Allocate<<a class="code" href="classclang_1_1Sema_1_1SpecialMemberOverloadResult.html">SpecialMemberOverloadResult</a>>();</div>
+<div class="line"><a name="l02465"></a><span class="lineno"> 2465</span>   Result = <span class="keyword">new</span> (Result) <a class="code" href="classclang_1_1Sema_1_1SpecialMemberOverloadResult.html">SpecialMemberOverloadResult</a>(ID);</div>
+<div class="line"><a name="l02466"></a><span class="lineno"> 2466</span>   SpecialMemberCache.InsertNode(Result, InsertPoint);</div>
+<div class="line"><a name="l02467"></a><span class="lineno"> 2467</span> </div>
+<div class="line"><a name="l02468"></a><span class="lineno"> 2468</span>   <span class="keywordflow">if</span> (SM == CXXDestructor) {</div>
+<div class="line"><a name="l02469"></a><span class="lineno"> 2469</span>     <span class="keywordflow">if</span> (RD-><a class="code" href="classclang_1_1CXXRecordDecl.html#a2a2bd09612b3bb5c8f59bf8260a180c4" title="Determine whether this class needs an implicit destructor to be lazily declared.">needsImplicitDestructor</a>())</div>
+<div class="line"><a name="l02470"></a><span class="lineno"> 2470</span>       DeclareImplicitDestructor(RD);</div>
+<div class="line"><a name="l02471"></a><span class="lineno"> 2471</span>     <a class="code" href="classclang_1_1CXXDestructorDecl.html" title="Represents a C++ destructor within a class.">CXXDestructorDecl</a> *DD = RD-><a class="code" href="classclang_1_1CXXRecordDecl.html#a69a4522df480ad34e4846b08856a57b4" title="Returns the destructor decl for this class.">getDestructor</a>();</div>
+<div class="line"><a name="l02472"></a><span class="lineno"> 2472</span>     assert(DD && <span class="stringliteral">"record without a destructor"</span>);</div>
+<div class="line"><a name="l02473"></a><span class="lineno"> 2473</span>     Result-><a class="code" href="classclang_1_1Sema_1_1SpecialMemberOverloadResult.html#ac5206b817d0454e62639ff7747ef6f6b">setMethod</a>(DD);</div>
+<div class="line"><a name="l02474"></a><span class="lineno"> 2474</span>     Result-><a class="code" href="classclang_1_1Sema_1_1SpecialMemberOverloadResult.html#ad4902bc1790bda0f407768f24a5b8f7c">setKind</a>(DD-><a class="code" href="classclang_1_1FunctionDecl.html#aa7c712ee63af38d248bd8c9da34695c1" title="Whether this function has been deleted.">isDeleted</a>() ?</div>
+<div class="line"><a name="l02475"></a><span class="lineno"> 2475</span>                     SpecialMemberOverloadResult::NoMemberOrDeleted :</div>
+<div class="line"><a name="l02476"></a><span class="lineno"> 2476</span>                     SpecialMemberOverloadResult::Success);</div>
+<div class="line"><a name="l02477"></a><span class="lineno"> 2477</span>     <span class="keywordflow">return</span> Result;</div>
+<div class="line"><a name="l02478"></a><span class="lineno"> 2478</span>   }</div>
+<div class="line"><a name="l02479"></a><span class="lineno"> 2479</span> </div>
+<div class="line"><a name="l02480"></a><span class="lineno"> 2480</span>   <span class="comment">// Prepare for overload resolution. Here we construct a synthetic argument</span></div>
+<div class="line"><a name="l02481"></a><span class="lineno"> 2481</span>   <span class="comment">// if necessary and make sure that implicit functions are declared.</span></div>
+<div class="line"><a name="l02482"></a><span class="lineno"> 2482</span>   <a class="code" href="classclang_1_1CanQual.html">CanQualType</a> CanTy = <a class="code" href="ASTMatchFinder_8cpp.html#a779280869b9fac47a9bc391e7709171f">Context</a>.<a class="code" href="classclang_1_1ASTContext.html#a7e70bb7eebf01548a0cab752e390ba37" title="Return the canonical (structural) type corresponding to the specified potentially non-canonical type ...">getCanonicalType</a>(<a class="code" href="ASTMatchFinder_8cpp.html#a779280869b9fac47a9bc391e7709171f">Context</a>.<a class="code" href="classclang_1_1ASTContext.html#a92752b8dd75428a63b2e787642db884a" title="Return the unique reference to the type for the specified TagDecl (struct/union/class/enum) decl...">getTagDeclType</a>(RD));</div>
+<div class="line"><a name="l02483"></a><span class="lineno"> 2483</span>   <a class="code" href="classclang_1_1DeclarationName.html">DeclarationName</a> Name;</div>
+<div class="line"><a name="l02484"></a><span class="lineno"> 2484</span>   <a class="code" href="classclang_1_1Expr.html">Expr</a> *Arg = 0;</div>
+<div class="line"><a name="l02485"></a><span class="lineno"> 2485</span>   <span class="keywordtype">unsigned</span> NumArgs;</div>
+<div class="line"><a name="l02486"></a><span class="lineno"> 2486</span> </div>
+<div class="line"><a name="l02487"></a><span class="lineno"> 2487</span>   <a class="code" href="classclang_1_1QualType.html">QualType</a> ArgType = CanTy;</div>
+<div class="line"><a name="l02488"></a><span class="lineno"> 2488</span>   <a class="code" href="namespaceclang.html#ac7b1e4926b152c0385bc7ec72319a340" title="The categorization of expression values, currently following the C++11 scheme.">ExprValueKind</a> VK = <a class="code" href="namespaceclang.html#ac7b1e4926b152c0385bc7ec72319a340ab67545101f6b01efc1ecf6a0cefc7ee7" title="An l-value expression is a reference to an object with independent storage.">VK_LValue</a>;</div>
+<div class="line"><a name="l02489"></a><span class="lineno"> 2489</span> </div>
+<div class="line"><a name="l02490"></a><span class="lineno"> 2490</span>   <span class="keywordflow">if</span> (SM == CXXDefaultConstructor) {</div>
+<div class="line"><a name="l02491"></a><span class="lineno"> 2491</span>     Name = <a class="code" href="ASTMatchFinder_8cpp.html#a779280869b9fac47a9bc391e7709171f">Context</a>.<a class="code" href="classclang_1_1ASTContext.html#a2017d2a1ae842fcf4e5df3097c7b93ba">DeclarationNames</a>.<a class="code" href="classclang_1_1DeclarationNameTable.html#af12b22c4a913093dafb63c71744c9226">getCXXConstructorName</a>(CanTy);</div>
+<div class="line"><a name="l02492"></a><span class="lineno"> 2492</span>     NumArgs = 0;</div>
+<div class="line"><a name="l02493"></a><span class="lineno"> 2493</span>     <span class="keywordflow">if</span> (RD-><a class="code" href="classclang_1_1CXXRecordDecl.html#a94c0049d53c9807b9a92e2e739e6cf4d" title="Determine if we need to declare a default constructor for this class.">needsImplicitDefaultConstructor</a>())</div>
+<div class="line"><a name="l02494"></a><span class="lineno"> 2494</span>       DeclareImplicitDefaultConstructor(RD);</div>
+<div class="line"><a name="l02495"></a><span class="lineno"> 2495</span>   } <span class="keywordflow">else</span> {</div>
+<div class="line"><a name="l02496"></a><span class="lineno"> 2496</span>     <span class="keywordflow">if</span> (SM == CXXCopyConstructor || SM == CXXMoveConstructor) {</div>
+<div class="line"><a name="l02497"></a><span class="lineno"> 2497</span>       Name = <a class="code" href="ASTMatchFinder_8cpp.html#a779280869b9fac47a9bc391e7709171f">Context</a>.<a class="code" href="classclang_1_1ASTContext.html#a2017d2a1ae842fcf4e5df3097c7b93ba">DeclarationNames</a>.<a class="code" href="classclang_1_1DeclarationNameTable.html#af12b22c4a913093dafb63c71744c9226">getCXXConstructorName</a>(CanTy);</div>
+<div class="line"><a name="l02498"></a><span class="lineno"> 2498</span>       <span class="keywordflow">if</span> (RD-><a class="code" href="classclang_1_1CXXRecordDecl.html#ad2e8da39d768392004ee0d22aa68bd55" title="Determine whether this class needs an implicit copy constructor to be lazily declared.">needsImplicitCopyConstructor</a>())</div>
+<div class="line"><a name="l02499"></a><span class="lineno"> 2499</span>         DeclareImplicitCopyConstructor(RD);</div>
+<div class="line"><a name="l02500"></a><span class="lineno"> 2500</span>       <span class="keywordflow">if</span> (getLangOpts().CPlusPlus11 && RD-><a class="code" href="classclang_1_1CXXRecordDecl.html#a1f4cf820298b5b08a2095af4e882aa8d" title="Determine whether this class should get an implicit move constructor or if any existing special membe...">needsImplicitMoveConstructor</a>())</div>
+<div class="line"><a name="l02501"></a><span class="lineno"> 2501</span>         DeclareImplicitMoveConstructor(RD);</div>
+<div class="line"><a name="l02502"></a><span class="lineno"> 2502</span>     } <span class="keywordflow">else</span> {</div>
+<div class="line"><a name="l02503"></a><span class="lineno"> 2503</span>       Name = <a class="code" href="ASTMatchFinder_8cpp.html#a779280869b9fac47a9bc391e7709171f">Context</a>.<a class="code" href="classclang_1_1ASTContext.html#a2017d2a1ae842fcf4e5df3097c7b93ba">DeclarationNames</a>.<a class="code" href="classclang_1_1DeclarationNameTable.html#a203b7bc56be9c91386d77227ee67381e">getCXXOperatorName</a>(OO_Equal);</div>
+<div class="line"><a name="l02504"></a><span class="lineno"> 2504</span>       <span class="keywordflow">if</span> (RD-><a class="code" href="classclang_1_1CXXRecordDecl.html#aaf068cf695909682bc02503ff1dad038" title="Determine whether this class needs an implicit copy assignment operator to be lazily declared...">needsImplicitCopyAssignment</a>())</div>
+<div class="line"><a name="l02505"></a><span class="lineno"> 2505</span>         DeclareImplicitCopyAssignment(RD);</div>
+<div class="line"><a name="l02506"></a><span class="lineno"> 2506</span>       <span class="keywordflow">if</span> (getLangOpts().CPlusPlus11 && RD-><a class="code" href="classclang_1_1CXXRecordDecl.html#a663c46f736eda04ddbbf599816341db9" title="Determine whether this class should get an implicit move assignment operator or if any existing speci...">needsImplicitMoveAssignment</a>())</div>
+<div class="line"><a name="l02507"></a><span class="lineno"> 2507</span>         DeclareImplicitMoveAssignment(RD);</div>
+<div class="line"><a name="l02508"></a><span class="lineno"> 2508</span>     }</div>
+<div class="line"><a name="l02509"></a><span class="lineno"> 2509</span> </div>
+<div class="line"><a name="l02510"></a><span class="lineno"> 2510</span>     <span class="keywordflow">if</span> (ConstArg)</div>
+<div class="line"><a name="l02511"></a><span class="lineno"> 2511</span>       ArgType.<a class="code" href="classclang_1_1QualType.html#a43a8b5d4a9d63c319ad978252426379a" title="addConst - add the specified type qualifier to this QualType.">addConst</a>();</div>
+<div class="line"><a name="l02512"></a><span class="lineno"> 2512</span>     <span class="keywordflow">if</span> (VolatileArg)</div>
+<div class="line"><a name="l02513"></a><span class="lineno"> 2513</span>       ArgType.<a class="code" href="classclang_1_1QualType.html#aaf775d6f852752b51f38a82985c9cbbe" title="addVolatile - add the specified type qualifier to this QualType.">addVolatile</a>();</div>
+<div class="line"><a name="l02514"></a><span class="lineno"> 2514</span> </div>
+<div class="line"><a name="l02515"></a><span class="lineno"> 2515</span>     <span class="comment">// This isn't /really/ specified by the standard, but it's implied</span></div>
+<div class="line"><a name="l02516"></a><span class="lineno"> 2516</span>     <span class="comment">// we should be working from an RValue in the case of move to ensure</span></div>
+<div class="line"><a name="l02517"></a><span class="lineno"> 2517</span>     <span class="comment">// that we prefer to bind to rvalue references, and an LValue in the</span></div>
+<div class="line"><a name="l02518"></a><span class="lineno"> 2518</span>     <span class="comment">// case of copy to ensure we don't bind to rvalue references.</span></div>
+<div class="line"><a name="l02519"></a><span class="lineno"> 2519</span>     <span class="comment">// Possibly an XValue is actually correct in the case of move, but</span></div>
+<div class="line"><a name="l02520"></a><span class="lineno"> 2520</span>     <span class="comment">// there is no semantic difference for class types in this restricted</span></div>
+<div class="line"><a name="l02521"></a><span class="lineno"> 2521</span>     <span class="comment">// case.</span></div>
+<div class="line"><a name="l02522"></a><span class="lineno"> 2522</span>     <span class="keywordflow">if</span> (SM == CXXCopyConstructor || SM == CXXCopyAssignment)</div>
+<div class="line"><a name="l02523"></a><span class="lineno"> 2523</span>       VK = <a class="code" href="namespaceclang.html#ac7b1e4926b152c0385bc7ec72319a340ab67545101f6b01efc1ecf6a0cefc7ee7" title="An l-value expression is a reference to an object with independent storage.">VK_LValue</a>;</div>
+<div class="line"><a name="l02524"></a><span class="lineno"> 2524</span>     <span class="keywordflow">else</span></div>
+<div class="line"><a name="l02525"></a><span class="lineno"> 2525</span>       VK = <a class="code" href="namespaceclang.html#ac7b1e4926b152c0385bc7ec72319a340a7486248bcb086a1f969a9e138208dcd7" title="An r-value expression (a pr-value in the C++11 taxonomy) produces a temporary value.">VK_RValue</a>;</div>
+<div class="line"><a name="l02526"></a><span class="lineno"> 2526</span>   }</div>
+<div class="line"><a name="l02527"></a><span class="lineno"> 2527</span> </div>
+<div class="line"><a name="l02528"></a><span class="lineno"> 2528</span>   <a class="code" href="classclang_1_1OpaqueValueExpr.html">OpaqueValueExpr</a> FakeArg(<a class="code" href="classclang_1_1SourceLocation.html" title="Encodes a location in the source. The SourceManager can decode this to get at the full include stack...">SourceLocation</a>(), ArgType, VK);</div>
+<div class="line"><a name="l02529"></a><span class="lineno"> 2529</span> </div>
+<div class="line"><a name="l02530"></a><span class="lineno"> 2530</span>   <span class="keywordflow">if</span> (SM != CXXDefaultConstructor) {</div>
+<div class="line"><a name="l02531"></a><span class="lineno"> 2531</span>     NumArgs = 1;</div>
+<div class="line"><a name="l02532"></a><span class="lineno"> 2532</span>     Arg = &FakeArg;</div>
+<div class="line"><a name="l02533"></a><span class="lineno"> 2533</span>   }</div>
+<div class="line"><a name="l02534"></a><span class="lineno"> 2534</span> </div>
+<div class="line"><a name="l02535"></a><span class="lineno"> 2535</span>   <span class="comment">// Create the object argument</span></div>
+<div class="line"><a name="l02536"></a><span class="lineno"> 2536</span>   <a class="code" href="classclang_1_1QualType.html">QualType</a> ThisTy = CanTy;</div>
+<div class="line"><a name="l02537"></a><span class="lineno"> 2537</span>   <span class="keywordflow">if</span> (ConstThis)</div>
+<div class="line"><a name="l02538"></a><span class="lineno"> 2538</span>     ThisTy.<a class="code" href="classclang_1_1QualType.html#a43a8b5d4a9d63c319ad978252426379a" title="addConst - add the specified type qualifier to this QualType.">addConst</a>();</div>
+<div class="line"><a name="l02539"></a><span class="lineno"> 2539</span>   <span class="keywordflow">if</span> (VolatileThis)</div>
+<div class="line"><a name="l02540"></a><span class="lineno"> 2540</span>     ThisTy.<a class="code" href="classclang_1_1QualType.html#aaf775d6f852752b51f38a82985c9cbbe" title="addVolatile - add the specified type qualifier to this QualType.">addVolatile</a>();</div>
+<div class="line"><a name="l02541"></a><span class="lineno"> 2541</span>   <a class="code" href="classclang_1_1Expr_1_1Classification.html" title="The return type of classify(). Represents the C++11 expression taxonomy.">Expr::Classification</a> Classification =</div>
+<div class="line"><a name="l02542"></a><span class="lineno"> 2542</span>     <a class="code" href="classclang_1_1OpaqueValueExpr.html">OpaqueValueExpr</a>(<a class="code" href="classclang_1_1SourceLocation.html" title="Encodes a location in the source. The SourceManager can decode this to get at the full include stack...">SourceLocation</a>(), ThisTy,</div>
+<div class="line"><a name="l02543"></a><span class="lineno"> 2543</span>                     RValueThis ? <a class="code" href="namespaceclang.html#ac7b1e4926b152c0385bc7ec72319a340a7486248bcb086a1f969a9e138208dcd7" title="An r-value expression (a pr-value in the C++11 taxonomy) produces a temporary value.">VK_RValue</a> : <a class="code" href="namespaceclang.html#ac7b1e4926b152c0385bc7ec72319a340ab67545101f6b01efc1ecf6a0cefc7ee7" title="An l-value expression is a reference to an object with independent storage.">VK_LValue</a>).<a class="code" href="classclang_1_1Expr.html#a69226c1509feed27879120d7da683eff" title="Classify - Classify this expression according to the C++11 expression taxonomy.">Classify</a>(<a class="code" href="ASTMatchFinder_8cpp.html#a779280869b9fac47a9bc391e7709171f">Context</a>);</div>
+<div class="line"><a name="l02544"></a><span class="lineno"> 2544</span> </div>
+<div class="line"><a name="l02545"></a><span class="lineno"> 2545</span>   <span class="comment">// Now we perform lookup on the name we computed earlier and do overload</span></div>
+<div class="line"><a name="l02546"></a><span class="lineno"> 2546</span>   <span class="comment">// resolution. Lookup is only performed directly into the class since there</span></div>
+<div class="line"><a name="l02547"></a><span class="lineno"> 2547</span>   <span class="comment">// will always be a (possibly implicit) declaration to shadow any others.</span></div>
+<div class="line"><a name="l02548"></a><span class="lineno"> 2548</span>   <a class="code" href="classclang_1_1OverloadCandidateSet.html">OverloadCandidateSet</a> OCS((<a class="code" href="classclang_1_1SourceLocation.html" title="Encodes a location in the source. The SourceManager can decode this to get at the full include stack...">SourceLocation</a>()));</div>
+<div class="line"><a name="l02549"></a><span class="lineno"> 2549</span>   <a class="code" href="classclang_1_1DeclContext.html#ac25dc34eabe6c4e035c76dd3329e8530">DeclContext::lookup_result</a> R = RD-><a class="code" href="classclang_1_1DeclContext.html#a0916b364472e2acc42122885e087222b">lookup</a>(Name);</div>
+<div class="line"><a name="l02550"></a><span class="lineno"> 2550</span>   assert(!R.empty() &&</div>
+<div class="line"><a name="l02551"></a><span class="lineno"> 2551</span>          <span class="stringliteral">"lookup for a constructor or assignment operator was empty"</span>);</div>
+<div class="line"><a name="l02552"></a><span class="lineno"> 2552</span> </div>
+<div class="line"><a name="l02553"></a><span class="lineno"> 2553</span>   <span class="comment">// Copy the candidates as our processing of them may load new declarations</span></div>
+<div class="line"><a name="l02554"></a><span class="lineno"> 2554</span>   <span class="comment">// from an external source and invalidate lookup_result.</span></div>
+<div class="line"><a name="l02555"></a><span class="lineno"> 2555</span>   <a class="code" href="classllvm_1_1SmallVector.html">SmallVector<NamedDecl *, 8></a> Candidates(R.begin(), R.end());</div>
+<div class="line"><a name="l02556"></a><span class="lineno"> 2556</span> </div>
+<div class="line"><a name="l02557"></a><span class="lineno"> 2557</span>   <span class="keywordflow">for</span> (<a class="code" href="classllvm_1_1SmallVectorImpl.html">SmallVectorImpl<NamedDecl *>::iterator</a> I = Candidates.begin(),</div>
+<div class="line"><a name="l02558"></a><span class="lineno"> 2558</span>                                               E = Candidates.end();</div>
+<div class="line"><a name="l02559"></a><span class="lineno"> 2559</span>        I != E; ++I) {</div>
+<div class="line"><a name="l02560"></a><span class="lineno"> 2560</span>     <a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *Cand = *I;</div>
+<div class="line"><a name="l02561"></a><span class="lineno"> 2561</span> </div>
+<div class="line"><a name="l02562"></a><span class="lineno"> 2562</span>     <span class="keywordflow">if</span> (Cand-><a class="code" href="classclang_1_1Decl.html#a17ec912fd67469eea51741d45eb0c800">isInvalidDecl</a>())</div>
+<div class="line"><a name="l02563"></a><span class="lineno"> 2563</span>       <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l02564"></a><span class="lineno"> 2564</span> </div>
+<div class="line"><a name="l02565"></a><span class="lineno"> 2565</span>     <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1UsingShadowDecl.html" title="Represents a shadow declaration introduced into a scope by a (resolved) using declaration.">UsingShadowDecl</a> *U = dyn_cast<UsingShadowDecl>(Cand)) {</div>
+<div class="line"><a name="l02566"></a><span class="lineno"> 2566</span>       <span class="comment">// FIXME: [namespace.udecl]p15 says that we should only consider a</span></div>
+<div class="line"><a name="l02567"></a><span class="lineno"> 2567</span>       <span class="comment">// using declaration here if it does not match a declaration in the</span></div>
+<div class="line"><a name="l02568"></a><span class="lineno"> 2568</span>       <span class="comment">// derived class. We do not implement this correctly in other cases</span></div>
+<div class="line"><a name="l02569"></a><span class="lineno"> 2569</span>       <span class="comment">// either.</span></div>
+<div class="line"><a name="l02570"></a><span class="lineno"> 2570</span>       Cand = U->getTargetDecl();</div>
+<div class="line"><a name="l02571"></a><span class="lineno"> 2571</span> </div>
+<div class="line"><a name="l02572"></a><span class="lineno"> 2572</span>       <span class="keywordflow">if</span> (Cand-><a class="code" href="classclang_1_1Decl.html#a17ec912fd67469eea51741d45eb0c800">isInvalidDecl</a>())</div>
+<div class="line"><a name="l02573"></a><span class="lineno"> 2573</span>         <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l02574"></a><span class="lineno"> 2574</span>     }</div>
+<div class="line"><a name="l02575"></a><span class="lineno"> 2575</span> </div>
+<div class="line"><a name="l02576"></a><span class="lineno"> 2576</span>     <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1CXXMethodDecl.html" title="Represents a static or instance method of a struct/union/class.">CXXMethodDecl</a> *M = dyn_cast<CXXMethodDecl>(Cand)) {</div>
+<div class="line"><a name="l02577"></a><span class="lineno"> 2577</span>       <span class="keywordflow">if</span> (SM == CXXCopyAssignment || SM == CXXMoveAssignment)</div>
+<div class="line"><a name="l02578"></a><span class="lineno"> 2578</span>         AddMethodCandidate(M, <a class="code" href="classclang_1_1DeclAccessPair.html#a40bf16940069615f789f599664048241">DeclAccessPair::make</a>(M, <a class="code" href="namespaceclang.html#afc8aabd1f46cf32e805cd0d970ef988fa163ae3a419460301961bc458f8f01fd3">AS_public</a>), RD, ThisTy,</div>
+<div class="line"><a name="l02579"></a><span class="lineno"> 2579</span>                            Classification, llvm::makeArrayRef(&Arg, NumArgs),</div>
+<div class="line"><a name="l02580"></a><span class="lineno"> 2580</span>                            OCS, <span class="keyword">true</span>);</div>
+<div class="line"><a name="l02581"></a><span class="lineno"> 2581</span>       <span class="keywordflow">else</span></div>
+<div class="line"><a name="l02582"></a><span class="lineno"> 2582</span>         AddOverloadCandidate(M, <a class="code" href="classclang_1_1DeclAccessPair.html#a40bf16940069615f789f599664048241">DeclAccessPair::make</a>(M, <a class="code" href="namespaceclang.html#afc8aabd1f46cf32e805cd0d970ef988fa163ae3a419460301961bc458f8f01fd3">AS_public</a>),</div>
+<div class="line"><a name="l02583"></a><span class="lineno"> 2583</span>                              llvm::makeArrayRef(&Arg, NumArgs), OCS, <span class="keyword">true</span>);</div>
+<div class="line"><a name="l02584"></a><span class="lineno"> 2584</span>     } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1FunctionTemplateDecl.html" title="Declaration of a template function.">FunctionTemplateDecl</a> *Tmpl =</div>
+<div class="line"><a name="l02585"></a><span class="lineno"> 2585</span>                  dyn_cast<FunctionTemplateDecl>(Cand)) {</div>
+<div class="line"><a name="l02586"></a><span class="lineno"> 2586</span>       <span class="keywordflow">if</span> (SM == CXXCopyAssignment || SM == CXXMoveAssignment)</div>
+<div class="line"><a name="l02587"></a><span class="lineno"> 2587</span>         AddMethodTemplateCandidate(Tmpl, <a class="code" href="classclang_1_1DeclAccessPair.html#a40bf16940069615f789f599664048241">DeclAccessPair::make</a>(Tmpl, <a class="code" href="namespaceclang.html#afc8aabd1f46cf32e805cd0d970ef988fa163ae3a419460301961bc458f8f01fd3">AS_public</a>),</div>
+<div class="line"><a name="l02588"></a><span class="lineno"> 2588</span>                                    RD, 0, ThisTy, Classification,</div>
+<div class="line"><a name="l02589"></a><span class="lineno"> 2589</span>                                    llvm::makeArrayRef(&Arg, NumArgs),</div>
+<div class="line"><a name="l02590"></a><span class="lineno"> 2590</span>                                    OCS, <span class="keyword">true</span>);</div>
+<div class="line"><a name="l02591"></a><span class="lineno"> 2591</span>       <span class="keywordflow">else</span></div>
+<div class="line"><a name="l02592"></a><span class="lineno"> 2592</span>         AddTemplateOverloadCandidate(Tmpl, <a class="code" href="classclang_1_1DeclAccessPair.html#a40bf16940069615f789f599664048241">DeclAccessPair::make</a>(Tmpl, <a class="code" href="namespaceclang.html#afc8aabd1f46cf32e805cd0d970ef988fa163ae3a419460301961bc458f8f01fd3">AS_public</a>),</div>
+<div class="line"><a name="l02593"></a><span class="lineno"> 2593</span>                                      0, llvm::makeArrayRef(&Arg, NumArgs),</div>
+<div class="line"><a name="l02594"></a><span class="lineno"> 2594</span>                                      OCS, <span class="keyword">true</span>);</div>
+<div class="line"><a name="l02595"></a><span class="lineno"> 2595</span>     } <span class="keywordflow">else</span> {</div>
+<div class="line"><a name="l02596"></a><span class="lineno"> 2596</span>       assert(isa<UsingDecl>(Cand) && <span class="stringliteral">"illegal Kind of operator = Decl"</span>);</div>
+<div class="line"><a name="l02597"></a><span class="lineno"> 2597</span>     }</div>
+<div class="line"><a name="l02598"></a><span class="lineno"> 2598</span>   }</div>
+<div class="line"><a name="l02599"></a><span class="lineno"> 2599</span> </div>
+<div class="line"><a name="l02600"></a><span class="lineno"> 2600</span>   <a class="code" href="classclang_1_1OverloadCandidateSet.html#abe5a94cc940d49a8f336131a22c41600">OverloadCandidateSet::iterator</a> Best;</div>
+<div class="line"><a name="l02601"></a><span class="lineno"> 2601</span>   <span class="keywordflow">switch</span> (OCS.<a class="code" href="classclang_1_1OverloadCandidateSet.html#a163568829049a9d0a0ed4596049b8360" title="Find the best viable function on this overload set, if it exists.">BestViableFunction</a>(*<span class="keyword">this</span>, <a class="code" href="classclang_1_1SourceLocation.html" title="Encodes a location in the source. The SourceManager can decode this to get at the full include stack...">SourceLocation</a>(), Best)) {</div>
+<div class="line"><a name="l02602"></a><span class="lineno"> 2602</span>     <span class="keywordflow">case</span> <a class="code" href="namespaceclang.html#a19ab53643ad18c4a87afb5c88fb625b2aa70d45cfee2580edd6c2364b4e8d3d0d" title="Overload resolution succeeded.">OR_Success</a>:</div>
+<div class="line"><a name="l02603"></a><span class="lineno"> 2603</span>       Result-><a class="code" href="classclang_1_1Sema_1_1SpecialMemberOverloadResult.html#ac5206b817d0454e62639ff7747ef6f6b">setMethod</a>(cast<CXXMethodDecl>(Best->Function));</div>
+<div class="line"><a name="l02604"></a><span class="lineno"> 2604</span>       Result-><a class="code" href="classclang_1_1Sema_1_1SpecialMemberOverloadResult.html#ad4902bc1790bda0f407768f24a5b8f7c">setKind</a>(SpecialMemberOverloadResult::Success);</div>
+<div class="line"><a name="l02605"></a><span class="lineno"> 2605</span>       <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l02606"></a><span class="lineno"> 2606</span> </div>
+<div class="line"><a name="l02607"></a><span class="lineno"> 2607</span>     <span class="keywordflow">case</span> <a class="code" href="namespaceclang.html#a19ab53643ad18c4a87afb5c88fb625b2a41320c6307d0bb5acf7f61a30455e412" title="Succeeded, but refers to a deleted function.">OR_Deleted</a>:</div>
+<div class="line"><a name="l02608"></a><span class="lineno"> 2608</span>       Result-><a class="code" href="classclang_1_1Sema_1_1SpecialMemberOverloadResult.html#ac5206b817d0454e62639ff7747ef6f6b">setMethod</a>(cast<CXXMethodDecl>(Best->Function));</div>
+<div class="line"><a name="l02609"></a><span class="lineno"> 2609</span>       Result-><a class="code" href="classclang_1_1Sema_1_1SpecialMemberOverloadResult.html#ad4902bc1790bda0f407768f24a5b8f7c">setKind</a>(SpecialMemberOverloadResult::NoMemberOrDeleted);</div>
+<div class="line"><a name="l02610"></a><span class="lineno"> 2610</span>       <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l02611"></a><span class="lineno"> 2611</span> </div>
+<div class="line"><a name="l02612"></a><span class="lineno"> 2612</span>     <span class="keywordflow">case</span> <a class="code" href="namespaceclang.html#a19ab53643ad18c4a87afb5c88fb625b2adc45c9f7d9f53e4224a57a3a5006be58" title="Ambiguous candidates found.">OR_Ambiguous</a>:</div>
+<div class="line"><a name="l02613"></a><span class="lineno"> 2613</span>       Result-><a class="code" href="classclang_1_1Sema_1_1SpecialMemberOverloadResult.html#ac5206b817d0454e62639ff7747ef6f6b">setMethod</a>(0);</div>
+<div class="line"><a name="l02614"></a><span class="lineno"> 2614</span>       Result-><a class="code" href="classclang_1_1Sema_1_1SpecialMemberOverloadResult.html#ad4902bc1790bda0f407768f24a5b8f7c">setKind</a>(SpecialMemberOverloadResult::Ambiguous);</div>
+<div class="line"><a name="l02615"></a><span class="lineno"> 2615</span>       <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l02616"></a><span class="lineno"> 2616</span> </div>
+<div class="line"><a name="l02617"></a><span class="lineno"> 2617</span>     <span class="keywordflow">case</span> <a class="code" href="namespaceclang.html#a19ab53643ad18c4a87afb5c88fb625b2aec527dfc3dfd4f09e60bec8a2de45b14" title="No viable function found.">OR_No_Viable_Function</a>:</div>
+<div class="line"><a name="l02618"></a><span class="lineno"> 2618</span>       Result-><a class="code" href="classclang_1_1Sema_1_1SpecialMemberOverloadResult.html#ac5206b817d0454e62639ff7747ef6f6b">setMethod</a>(0);</div>
+<div class="line"><a name="l02619"></a><span class="lineno"> 2619</span>       Result-><a class="code" href="classclang_1_1Sema_1_1SpecialMemberOverloadResult.html#ad4902bc1790bda0f407768f24a5b8f7c">setKind</a>(SpecialMemberOverloadResult::NoMemberOrDeleted);</div>
+<div class="line"><a name="l02620"></a><span class="lineno"> 2620</span>       <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l02621"></a><span class="lineno"> 2621</span>   }</div>
+<div class="line"><a name="l02622"></a><span class="lineno"> 2622</span> </div>
+<div class="line"><a name="l02623"></a><span class="lineno"> 2623</span>   <span class="keywordflow">return</span> Result;</div>
+<div class="line"><a name="l02624"></a><span class="lineno"> 2624</span> }</div>
+<div class="line"><a name="l02625"></a><span class="lineno"> 2625</span> <span class="comment"></span></div>
+<div class="line"><a name="l02626"></a><span class="lineno"> 2626</span> <span class="comment">/// \brief Look up the default constructor for the given class.</span></div>
+<div class="line"><a name="l02627"></a><span class="lineno"><a class="code" href="classclang_1_1Sema.html#a605da90716726f38b65837d15633e526"> 2627</a></span> <span class="comment"></span><a class="code" href="classclang_1_1CXXConstructorDecl.html" title="Represents a C++ constructor within a class.">CXXConstructorDecl</a> *<a class="code" href="classclang_1_1Sema.html#a605da90716726f38b65837d15633e526" title="Look up the default constructor for the given class.">Sema::LookupDefaultConstructor</a>(<a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *Class) {</div>
+<div class="line"><a name="l02628"></a><span class="lineno"> 2628</span>   <a class="code" href="classclang_1_1Sema_1_1SpecialMemberOverloadResult.html">SpecialMemberOverloadResult</a> *Result =</div>
+<div class="line"><a name="l02629"></a><span class="lineno"> 2629</span>     LookupSpecialMember(Class, CXXDefaultConstructor, <span class="keyword">false</span>, <span class="keyword">false</span>, <span class="keyword">false</span>,</div>
+<div class="line"><a name="l02630"></a><span class="lineno"> 2630</span>                         <span class="keyword">false</span>, <span class="keyword">false</span>);</div>
+<div class="line"><a name="l02631"></a><span class="lineno"> 2631</span> </div>
+<div class="line"><a name="l02632"></a><span class="lineno"> 2632</span>   <span class="keywordflow">return</span> cast_or_null<CXXConstructorDecl>(Result-><a class="code" href="classclang_1_1Sema_1_1SpecialMemberOverloadResult.html#ae173bc4eb79200859cd1b621e3b5ec58">getMethod</a>());</div>
+<div class="line"><a name="l02633"></a><span class="lineno"> 2633</span> }</div>
+<div class="line"><a name="l02634"></a><span class="lineno"> 2634</span> <span class="comment"></span></div>
+<div class="line"><a name="l02635"></a><span class="lineno"> 2635</span> <span class="comment">/// \brief Look up the copying constructor for the given class.</span></div>
+<div class="line"><a name="l02636"></a><span class="lineno"><a class="code" href="classclang_1_1Sema.html#ab84f42ffa6429615fdca6fd5b4151327"> 2636</a></span> <span class="comment"></span><a class="code" href="classclang_1_1CXXConstructorDecl.html" title="Represents a C++ constructor within a class.">CXXConstructorDecl</a> *<a class="code" href="classclang_1_1Sema.html#ab84f42ffa6429615fdca6fd5b4151327" title="Look up the copying constructor for the given class.">Sema::LookupCopyingConstructor</a>(<a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *Class,</div>
+<div class="line"><a name="l02637"></a><span class="lineno"> 2637</span>                                                    <span class="keywordtype">unsigned</span> Quals) {</div>
+<div class="line"><a name="l02638"></a><span class="lineno"> 2638</span>   assert(!(Quals & ~(<a class="code" href="classclang_1_1Qualifiers.html#a2754b754fd8a09705c060dc7b48badfea453669a6a4ff7ce22ec7b1024079aaf9">Qualifiers::Const</a> | <a class="code" href="classclang_1_1Qualifiers.html#a2754b754fd8a09705c060dc7b48badfea112191d3a4ad9cbd57f138a0c95e9f6f">Qualifiers::Volatile</a>)) &&</div>
+<div class="line"><a name="l02639"></a><span class="lineno"> 2639</span>          <span class="stringliteral">"non-const, non-volatile qualifiers for copy ctor arg"</span>);</div>
+<div class="line"><a name="l02640"></a><span class="lineno"> 2640</span>   <a class="code" href="classclang_1_1Sema_1_1SpecialMemberOverloadResult.html">SpecialMemberOverloadResult</a> *Result =</div>
+<div class="line"><a name="l02641"></a><span class="lineno"> 2641</span>     LookupSpecialMember(Class, CXXCopyConstructor, Quals & <a class="code" href="classclang_1_1Qualifiers.html#a2754b754fd8a09705c060dc7b48badfea453669a6a4ff7ce22ec7b1024079aaf9">Qualifiers::Const</a>,</div>
+<div class="line"><a name="l02642"></a><span class="lineno"> 2642</span>                         Quals & <a class="code" href="classclang_1_1Qualifiers.html#a2754b754fd8a09705c060dc7b48badfea112191d3a4ad9cbd57f138a0c95e9f6f">Qualifiers::Volatile</a>, <span class="keyword">false</span>, <span class="keyword">false</span>, <span class="keyword">false</span>);</div>
+<div class="line"><a name="l02643"></a><span class="lineno"> 2643</span> </div>
+<div class="line"><a name="l02644"></a><span class="lineno"> 2644</span>   <span class="keywordflow">return</span> cast_or_null<CXXConstructorDecl>(Result-><a class="code" href="classclang_1_1Sema_1_1SpecialMemberOverloadResult.html#ae173bc4eb79200859cd1b621e3b5ec58">getMethod</a>());</div>
+<div class="line"><a name="l02645"></a><span class="lineno"> 2645</span> }</div>
+<div class="line"><a name="l02646"></a><span class="lineno"> 2646</span> <span class="comment"></span></div>
+<div class="line"><a name="l02647"></a><span class="lineno"> 2647</span> <span class="comment">/// \brief Look up the moving constructor for the given class.</span></div>
+<div class="line"><a name="l02648"></a><span class="lineno"><a class="code" href="classclang_1_1Sema.html#a98dc327528ee7a5d817c01623e452be7"> 2648</a></span> <span class="comment"></span><a class="code" href="classclang_1_1CXXConstructorDecl.html" title="Represents a C++ constructor within a class.">CXXConstructorDecl</a> *<a class="code" href="classclang_1_1Sema.html#a98dc327528ee7a5d817c01623e452be7" title="Look up the moving constructor for the given class.">Sema::LookupMovingConstructor</a>(<a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *Class,</div>
+<div class="line"><a name="l02649"></a><span class="lineno"> 2649</span>                                                   <span class="keywordtype">unsigned</span> Quals) {</div>
+<div class="line"><a name="l02650"></a><span class="lineno"> 2650</span>   <a class="code" href="classclang_1_1Sema_1_1SpecialMemberOverloadResult.html">SpecialMemberOverloadResult</a> *Result =</div>
+<div class="line"><a name="l02651"></a><span class="lineno"> 2651</span>     LookupSpecialMember(Class, CXXMoveConstructor, Quals & <a class="code" href="classclang_1_1Qualifiers.html#a2754b754fd8a09705c060dc7b48badfea453669a6a4ff7ce22ec7b1024079aaf9">Qualifiers::Const</a>,</div>
+<div class="line"><a name="l02652"></a><span class="lineno"> 2652</span>                         Quals & <a class="code" href="classclang_1_1Qualifiers.html#a2754b754fd8a09705c060dc7b48badfea112191d3a4ad9cbd57f138a0c95e9f6f">Qualifiers::Volatile</a>, <span class="keyword">false</span>, <span class="keyword">false</span>, <span class="keyword">false</span>);</div>
+<div class="line"><a name="l02653"></a><span class="lineno"> 2653</span> </div>
+<div class="line"><a name="l02654"></a><span class="lineno"> 2654</span>   <span class="keywordflow">return</span> cast_or_null<CXXConstructorDecl>(Result-><a class="code" href="classclang_1_1Sema_1_1SpecialMemberOverloadResult.html#ae173bc4eb79200859cd1b621e3b5ec58">getMethod</a>());</div>
+<div class="line"><a name="l02655"></a><span class="lineno"> 2655</span> }</div>
+<div class="line"><a name="l02656"></a><span class="lineno"> 2656</span> <span class="comment"></span></div>
+<div class="line"><a name="l02657"></a><span class="lineno"> 2657</span> <span class="comment">/// \brief Look up the constructors for the given class.</span></div>
+<div class="line"><a name="l02658"></a><span class="lineno"><a class="code" href="classclang_1_1Sema.html#af6ed9855dadff52cd89e04be53ea94a3"> 2658</a></span> <span class="comment"></span><a class="code" href="classclang_1_1DeclContext.html#ac25dc34eabe6c4e035c76dd3329e8530">DeclContext::lookup_result</a> <a class="code" href="classclang_1_1Sema.html#af6ed9855dadff52cd89e04be53ea94a3" title="Look up the constructors for the given class.">Sema::LookupConstructors</a>(<a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *Class) {</div>
+<div class="line"><a name="l02659"></a><span class="lineno"> 2659</span>   <span class="comment">// If the implicit constructors have not yet been declared, do so now.</span></div>
+<div class="line"><a name="l02660"></a><span class="lineno"> 2660</span>   <span class="keywordflow">if</span> (<a class="code" href="SemaLookup_8cpp.html#a1b34cb2cdb835df7a4e31f38591a8e6a" title="Determine whether we can declare a special member function within the class at this point...">CanDeclareSpecialMemberFunction</a>(Class)) {</div>
+<div class="line"><a name="l02661"></a><span class="lineno"> 2661</span>     <span class="keywordflow">if</span> (Class-><a class="code" href="classclang_1_1CXXRecordDecl.html#a94c0049d53c9807b9a92e2e739e6cf4d" title="Determine if we need to declare a default constructor for this class.">needsImplicitDefaultConstructor</a>())</div>
+<div class="line"><a name="l02662"></a><span class="lineno"> 2662</span>       DeclareImplicitDefaultConstructor(Class);</div>
+<div class="line"><a name="l02663"></a><span class="lineno"> 2663</span>     <span class="keywordflow">if</span> (Class-><a class="code" href="classclang_1_1CXXRecordDecl.html#ad2e8da39d768392004ee0d22aa68bd55" title="Determine whether this class needs an implicit copy constructor to be lazily declared.">needsImplicitCopyConstructor</a>())</div>
+<div class="line"><a name="l02664"></a><span class="lineno"> 2664</span>       DeclareImplicitCopyConstructor(Class);</div>
+<div class="line"><a name="l02665"></a><span class="lineno"> 2665</span>     <span class="keywordflow">if</span> (getLangOpts().CPlusPlus11 && Class-><a class="code" href="classclang_1_1CXXRecordDecl.html#a1f4cf820298b5b08a2095af4e882aa8d" title="Determine whether this class should get an implicit move constructor or if any existing special membe...">needsImplicitMoveConstructor</a>())</div>
+<div class="line"><a name="l02666"></a><span class="lineno"> 2666</span>       DeclareImplicitMoveConstructor(Class);</div>
+<div class="line"><a name="l02667"></a><span class="lineno"> 2667</span>   }</div>
+<div class="line"><a name="l02668"></a><span class="lineno"> 2668</span> </div>
+<div class="line"><a name="l02669"></a><span class="lineno"> 2669</span>   <a class="code" href="classclang_1_1CanQual.html">CanQualType</a> T = <a class="code" href="ASTMatchFinder_8cpp.html#a779280869b9fac47a9bc391e7709171f">Context</a>.<a class="code" href="classclang_1_1ASTContext.html#a7e70bb7eebf01548a0cab752e390ba37" title="Return the canonical (structural) type corresponding to the specified potentially non-canonical type ...">getCanonicalType</a>(<a class="code" href="ASTMatchFinder_8cpp.html#a779280869b9fac47a9bc391e7709171f">Context</a>.<a class="code" href="classclang_1_1ASTContext.html#a028b11acbffc8c91facbab289df57771" title="Return the unique reference to the type for the specified type declaration.">getTypeDeclType</a>(Class));</div>
+<div class="line"><a name="l02670"></a><span class="lineno"> 2670</span>   <a class="code" href="classclang_1_1DeclarationName.html">DeclarationName</a> Name = <a class="code" href="ASTMatchFinder_8cpp.html#a779280869b9fac47a9bc391e7709171f">Context</a>.<a class="code" href="classclang_1_1ASTContext.html#a2017d2a1ae842fcf4e5df3097c7b93ba">DeclarationNames</a>.<a class="code" href="classclang_1_1DeclarationNameTable.html#af12b22c4a913093dafb63c71744c9226">getCXXConstructorName</a>(T);</div>
+<div class="line"><a name="l02671"></a><span class="lineno"> 2671</span>   <span class="keywordflow">return</span> Class-><a class="code" href="classclang_1_1DeclContext.html#a0916b364472e2acc42122885e087222b">lookup</a>(Name);</div>
+<div class="line"><a name="l02672"></a><span class="lineno"> 2672</span> }</div>
+<div class="line"><a name="l02673"></a><span class="lineno"> 2673</span> <span class="comment"></span></div>
+<div class="line"><a name="l02674"></a><span class="lineno"> 2674</span> <span class="comment">/// \brief Look up the copying assignment operator for the given class.</span></div>
+<div class="line"><a name="l02675"></a><span class="lineno"><a class="code" href="classclang_1_1Sema.html#a9b7e70892b0ea105ad5d83afcd7af2b7"> 2675</a></span> <span class="comment"></span><a class="code" href="classclang_1_1CXXMethodDecl.html" title="Represents a static or instance method of a struct/union/class.">CXXMethodDecl</a> *<a class="code" href="classclang_1_1Sema.html#a9b7e70892b0ea105ad5d83afcd7af2b7" title="Look up the copying assignment operator for the given class.">Sema::LookupCopyingAssignment</a>(<a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *Class,</div>
+<div class="line"><a name="l02676"></a><span class="lineno"> 2676</span>                                              <span class="keywordtype">unsigned</span> Quals, <span class="keywordtype">bool</span> RValueThis,</div>
+<div class="line"><a name="l02677"></a><span class="lineno"> 2677</span>                                              <span class="keywordtype">unsigned</span> ThisQuals) {</div>
+<div class="line"><a name="l02678"></a><span class="lineno"> 2678</span>   assert(!(Quals & ~(<a class="code" href="classclang_1_1Qualifiers.html#a2754b754fd8a09705c060dc7b48badfea453669a6a4ff7ce22ec7b1024079aaf9">Qualifiers::Const</a> | <a class="code" href="classclang_1_1Qualifiers.html#a2754b754fd8a09705c060dc7b48badfea112191d3a4ad9cbd57f138a0c95e9f6f">Qualifiers::Volatile</a>)) &&</div>
+<div class="line"><a name="l02679"></a><span class="lineno"> 2679</span>          <span class="stringliteral">"non-const, non-volatile qualifiers for copy assignment arg"</span>);</div>
+<div class="line"><a name="l02680"></a><span class="lineno"> 2680</span>   assert(!(ThisQuals & ~(<a class="code" href="classclang_1_1Qualifiers.html#a2754b754fd8a09705c060dc7b48badfea453669a6a4ff7ce22ec7b1024079aaf9">Qualifiers::Const</a> | <a class="code" href="classclang_1_1Qualifiers.html#a2754b754fd8a09705c060dc7b48badfea112191d3a4ad9cbd57f138a0c95e9f6f">Qualifiers::Volatile</a>)) &&</div>
+<div class="line"><a name="l02681"></a><span class="lineno"> 2681</span>          <span class="stringliteral">"non-const, non-volatile qualifiers for copy assignment this"</span>);</div>
+<div class="line"><a name="l02682"></a><span class="lineno"> 2682</span>   <a class="code" href="classclang_1_1Sema_1_1SpecialMemberOverloadResult.html">SpecialMemberOverloadResult</a> *Result =</div>
+<div class="line"><a name="l02683"></a><span class="lineno"> 2683</span>     LookupSpecialMember(Class, CXXCopyAssignment, Quals & <a class="code" href="classclang_1_1Qualifiers.html#a2754b754fd8a09705c060dc7b48badfea453669a6a4ff7ce22ec7b1024079aaf9">Qualifiers::Const</a>,</div>
+<div class="line"><a name="l02684"></a><span class="lineno"> 2684</span>                         Quals & <a class="code" href="classclang_1_1Qualifiers.html#a2754b754fd8a09705c060dc7b48badfea112191d3a4ad9cbd57f138a0c95e9f6f">Qualifiers::Volatile</a>, RValueThis,</div>
+<div class="line"><a name="l02685"></a><span class="lineno"> 2685</span>                         ThisQuals & Qualifiers::Const,</div>
+<div class="line"><a name="l02686"></a><span class="lineno"> 2686</span>                         ThisQuals & Qualifiers::Volatile);</div>
+<div class="line"><a name="l02687"></a><span class="lineno"> 2687</span> </div>
+<div class="line"><a name="l02688"></a><span class="lineno"> 2688</span>   <span class="keywordflow">return</span> Result-><a class="code" href="classclang_1_1Sema_1_1SpecialMemberOverloadResult.html#ae173bc4eb79200859cd1b621e3b5ec58">getMethod</a>();</div>
+<div class="line"><a name="l02689"></a><span class="lineno"> 2689</span> }</div>
+<div class="line"><a name="l02690"></a><span class="lineno"> 2690</span> <span class="comment"></span></div>
+<div class="line"><a name="l02691"></a><span class="lineno"> 2691</span> <span class="comment">/// \brief Look up the moving assignment operator for the given class.</span></div>
+<div class="line"><a name="l02692"></a><span class="lineno"><a class="code" href="classclang_1_1Sema.html#a976b990c8e44ca59b48ab32d08a6c69e"> 2692</a></span> <span class="comment"></span><a class="code" href="classclang_1_1CXXMethodDecl.html" title="Represents a static or instance method of a struct/union/class.">CXXMethodDecl</a> *<a class="code" href="classclang_1_1Sema.html#a976b990c8e44ca59b48ab32d08a6c69e" title="Look up the moving assignment operator for the given class.">Sema::LookupMovingAssignment</a>(<a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *Class,</div>
+<div class="line"><a name="l02693"></a><span class="lineno"> 2693</span>                                             <span class="keywordtype">unsigned</span> Quals,</div>
+<div class="line"><a name="l02694"></a><span class="lineno"> 2694</span>                                             <span class="keywordtype">bool</span> RValueThis,</div>
+<div class="line"><a name="l02695"></a><span class="lineno"> 2695</span>                                             <span class="keywordtype">unsigned</span> ThisQuals) {</div>
+<div class="line"><a name="l02696"></a><span class="lineno"> 2696</span>   assert(!(ThisQuals & ~(<a class="code" href="classclang_1_1Qualifiers.html#a2754b754fd8a09705c060dc7b48badfea453669a6a4ff7ce22ec7b1024079aaf9">Qualifiers::Const</a> | <a class="code" href="classclang_1_1Qualifiers.html#a2754b754fd8a09705c060dc7b48badfea112191d3a4ad9cbd57f138a0c95e9f6f">Qualifiers::Volatile</a>)) &&</div>
+<div class="line"><a name="l02697"></a><span class="lineno"> 2697</span>          <span class="stringliteral">"non-const, non-volatile qualifiers for copy assignment this"</span>);</div>
+<div class="line"><a name="l02698"></a><span class="lineno"> 2698</span>   <a class="code" href="classclang_1_1Sema_1_1SpecialMemberOverloadResult.html">SpecialMemberOverloadResult</a> *Result =</div>
+<div class="line"><a name="l02699"></a><span class="lineno"> 2699</span>     LookupSpecialMember(Class, CXXMoveAssignment, Quals & <a class="code" href="classclang_1_1Qualifiers.html#a2754b754fd8a09705c060dc7b48badfea453669a6a4ff7ce22ec7b1024079aaf9">Qualifiers::Const</a>,</div>
+<div class="line"><a name="l02700"></a><span class="lineno"> 2700</span>                         Quals & <a class="code" href="classclang_1_1Qualifiers.html#a2754b754fd8a09705c060dc7b48badfea112191d3a4ad9cbd57f138a0c95e9f6f">Qualifiers::Volatile</a>, RValueThis,</div>
+<div class="line"><a name="l02701"></a><span class="lineno"> 2701</span>                         ThisQuals & Qualifiers::Const,</div>
+<div class="line"><a name="l02702"></a><span class="lineno"> 2702</span>                         ThisQuals & Qualifiers::Volatile);</div>
+<div class="line"><a name="l02703"></a><span class="lineno"> 2703</span> </div>
+<div class="line"><a name="l02704"></a><span class="lineno"> 2704</span>   <span class="keywordflow">return</span> Result-><a class="code" href="classclang_1_1Sema_1_1SpecialMemberOverloadResult.html#ae173bc4eb79200859cd1b621e3b5ec58">getMethod</a>();</div>
+<div class="line"><a name="l02705"></a><span class="lineno"> 2705</span> }</div>
+<div class="line"><a name="l02706"></a><span class="lineno"> 2706</span> <span class="comment"></span></div>
+<div class="line"><a name="l02707"></a><span class="lineno"> 2707</span> <span class="comment">/// \brief Look for the destructor of the given class.</span></div>
+<div class="line"><a name="l02708"></a><span class="lineno"> 2708</span> <span class="comment">///</span></div>
+<div class="line"><a name="l02709"></a><span class="lineno"> 2709</span> <span class="comment">/// During semantic analysis, this routine should be used in lieu of</span></div>
+<div class="line"><a name="l02710"></a><span class="lineno"> 2710</span> <span class="comment">/// CXXRecordDecl::getDestructor().</span></div>
+<div class="line"><a name="l02711"></a><span class="lineno"> 2711</span> <span class="comment">///</span></div>
+<div class="line"><a name="l02712"></a><span class="lineno"> 2712</span> <span class="comment">/// \returns The destructor for this class.</span></div>
+<div class="line"><a name="l02713"></a><span class="lineno"><a class="code" href="classclang_1_1Sema.html#a48e848a59a19b4b93a2410fb9e54d341"> 2713</a></span> <span class="comment"></span><a class="code" href="classclang_1_1CXXDestructorDecl.html" title="Represents a C++ destructor within a class.">CXXDestructorDecl</a> *<a class="code" href="classclang_1_1Sema.html#a48e848a59a19b4b93a2410fb9e54d341" title="Look for the destructor of the given class.">Sema::LookupDestructor</a>(<a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *Class) {</div>
+<div class="line"><a name="l02714"></a><span class="lineno"> 2714</span>   <span class="keywordflow">return</span> cast<CXXDestructorDecl>(LookupSpecialMember(Class, CXXDestructor,</div>
+<div class="line"><a name="l02715"></a><span class="lineno"> 2715</span>                                                      <span class="keyword">false</span>, <span class="keyword">false</span>, <span class="keyword">false</span>,</div>
+<div class="line"><a name="l02716"></a><span class="lineno"> 2716</span>                                                      <span class="keyword">false</span>, <span class="keyword">false</span>)->getMethod());</div>
+<div class="line"><a name="l02717"></a><span class="lineno"> 2717</span> }</div>
+<div class="line"><a name="l02718"></a><span class="lineno"> 2718</span> <span class="comment"></span></div>
+<div class="line"><a name="l02719"></a><span class="lineno"> 2719</span> <span class="comment">/// LookupLiteralOperator - Determine which literal operator should be used for</span></div>
+<div class="line"><a name="l02720"></a><span class="lineno"> 2720</span> <span class="comment">/// a user-defined literal, per C++11 [lex.ext].</span></div>
+<div class="line"><a name="l02721"></a><span class="lineno"> 2721</span> <span class="comment">///</span></div>
+<div class="line"><a name="l02722"></a><span class="lineno"> 2722</span> <span class="comment">/// Normal overload resolution is not used to select which literal operator to</span></div>
+<div class="line"><a name="l02723"></a><span class="lineno"> 2723</span> <span class="comment">/// call for a user-defined literal. Look up the provided literal operator name,</span></div>
+<div class="line"><a name="l02724"></a><span class="lineno"> 2724</span> <span class="comment">/// and filter the results to the appropriate set for the given argument types.</span></div>
+<div class="line"><a name="l02725"></a><span class="lineno"> 2725</span> <span class="comment"></span><a class="code" href="classclang_1_1Sema.html#aeaf31f438062f694b5e3261d00f5cebe" title="The possible outcomes of name lookup for a literal operator.">Sema::LiteralOperatorLookupResult</a></div>
+<div class="line"><a name="l02726"></a><span class="lineno"><a class="code" href="classclang_1_1Sema.html#afdb16727583b2f44258410f587f2c349"> 2726</a></span> <a class="code" href="classclang_1_1Sema.html#afdb16727583b2f44258410f587f2c349">Sema::LookupLiteralOperator</a>(<a class="code" href="classclang_1_1Scope.html">Scope</a> *S, <a class="code" href="classclang_1_1LookupResult.html" title="Represents the results of name lookup.">LookupResult</a> &R,</div>
+<div class="line"><a name="l02727"></a><span class="lineno"> 2727</span>                             <a class="code" href="classllvm_1_1ArrayRef.html">ArrayRef<QualType></a> ArgTys,</div>
+<div class="line"><a name="l02728"></a><span class="lineno"> 2728</span>                             <span class="keywordtype">bool</span> AllowRaw, <span class="keywordtype">bool</span> AllowTemplate,</div>
+<div class="line"><a name="l02729"></a><span class="lineno"> 2729</span>                             <span class="keywordtype">bool</span> AllowStringTemplate) {</div>
+<div class="line"><a name="l02730"></a><span class="lineno"> 2730</span>   LookupName(R, S);</div>
+<div class="line"><a name="l02731"></a><span class="lineno"> 2731</span>   assert(R.<a class="code" href="classclang_1_1LookupResult.html#a4b184f1c5c87b87f3405a788826c56e1">getResultKind</a>() != <a class="code" href="classclang_1_1LookupResult.html#a1ca33eb830beacd6f646737a21a4686aa50c7b072dc8772c290cea6bd9ba895b0" title="Name lookup results in an ambiguity; use getAmbiguityKind to figure out what kind of ambiguity we hav...">LookupResult::Ambiguous</a> &&</div>
+<div class="line"><a name="l02732"></a><span class="lineno"> 2732</span>          <span class="stringliteral">"literal operator lookup can't be ambiguous"</span>);</div>
+<div class="line"><a name="l02733"></a><span class="lineno"> 2733</span> </div>
+<div class="line"><a name="l02734"></a><span class="lineno"> 2734</span>   <span class="comment">// Filter the lookup results appropriately.</span></div>
+<div class="line"><a name="l02735"></a><span class="lineno"> 2735</span>   <a class="code" href="classclang_1_1LookupResult_1_1Filter.html">LookupResult::Filter</a> F = R.<a class="code" href="classclang_1_1LookupResult.html#a8fcd0c83d80750fb4ecfda2d77dab8f9" title="Create a filter for this result set.">makeFilter</a>();</div>
+<div class="line"><a name="l02736"></a><span class="lineno"> 2736</span> </div>
+<div class="line"><a name="l02737"></a><span class="lineno"> 2737</span>   <span class="keywordtype">bool</span> FoundRaw = <span class="keyword">false</span>;</div>
+<div class="line"><a name="l02738"></a><span class="lineno"> 2738</span>   <span class="keywordtype">bool</span> FoundTemplate = <span class="keyword">false</span>;</div>
+<div class="line"><a name="l02739"></a><span class="lineno"> 2739</span>   <span class="keywordtype">bool</span> FoundStringTemplate = <span class="keyword">false</span>;</div>
+<div class="line"><a name="l02740"></a><span class="lineno"> 2740</span>   <span class="keywordtype">bool</span> FoundExactMatch = <span class="keyword">false</span>;</div>
+<div class="line"><a name="l02741"></a><span class="lineno"> 2741</span> </div>
+<div class="line"><a name="l02742"></a><span class="lineno"> 2742</span>   <span class="keywordflow">while</span> (F.hasNext()) {</div>
+<div class="line"><a name="l02743"></a><span class="lineno"> 2743</span>     <a class="code" href="classclang_1_1Decl.html">Decl</a> *D = F.next();</div>
+<div class="line"><a name="l02744"></a><span class="lineno"> 2744</span>     <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1UsingShadowDecl.html" title="Represents a shadow declaration introduced into a scope by a (resolved) using declaration.">UsingShadowDecl</a> *USD = dyn_cast<UsingShadowDecl>(D))</div>
+<div class="line"><a name="l02745"></a><span class="lineno"> 2745</span>       D = USD->getTargetDecl();</div>
+<div class="line"><a name="l02746"></a><span class="lineno"> 2746</span> </div>
+<div class="line"><a name="l02747"></a><span class="lineno"> 2747</span>     <span class="comment">// If the declaration we found is invalid, skip it.</span></div>
+<div class="line"><a name="l02748"></a><span class="lineno"> 2748</span>     <span class="keywordflow">if</span> (D-><a class="code" href="classclang_1_1Decl.html#a17ec912fd67469eea51741d45eb0c800">isInvalidDecl</a>()) {</div>
+<div class="line"><a name="l02749"></a><span class="lineno"> 2749</span>       F.erase();</div>
+<div class="line"><a name="l02750"></a><span class="lineno"> 2750</span>       <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l02751"></a><span class="lineno"> 2751</span>     }</div>
+<div class="line"><a name="l02752"></a><span class="lineno"> 2752</span> </div>
+<div class="line"><a name="l02753"></a><span class="lineno"> 2753</span>     <span class="keywordtype">bool</span> IsRaw = <span class="keyword">false</span>;</div>
+<div class="line"><a name="l02754"></a><span class="lineno"> 2754</span>     <span class="keywordtype">bool</span> IsTemplate = <span class="keyword">false</span>;</div>
+<div class="line"><a name="l02755"></a><span class="lineno"> 2755</span>     <span class="keywordtype">bool</span> IsStringTemplate = <span class="keyword">false</span>;</div>
+<div class="line"><a name="l02756"></a><span class="lineno"> 2756</span>     <span class="keywordtype">bool</span> IsExactMatch = <span class="keyword">false</span>;</div>
+<div class="line"><a name="l02757"></a><span class="lineno"> 2757</span> </div>
+<div class="line"><a name="l02758"></a><span class="lineno"> 2758</span>     <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1FunctionDecl.html">FunctionDecl</a> *FD = dyn_cast<FunctionDecl>(D)) {</div>
+<div class="line"><a name="l02759"></a><span class="lineno"> 2759</span>       <span class="keywordflow">if</span> (FD->getNumParams() == 1 &&</div>
+<div class="line"><a name="l02760"></a><span class="lineno"> 2760</span>           FD->getParamDecl(0)->getType()->getAs<<a class="code" href="classclang_1_1PointerType.html">PointerType</a>>())</div>
+<div class="line"><a name="l02761"></a><span class="lineno"> 2761</span>         IsRaw = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l02762"></a><span class="lineno"> 2762</span>       <span class="keywordflow">else</span> <span class="keywordflow">if</span> (FD->getNumParams() == ArgTys.size()) {</div>
+<div class="line"><a name="l02763"></a><span class="lineno"> 2763</span>         IsExactMatch = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l02764"></a><span class="lineno"> 2764</span>         <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> ArgIdx = 0; ArgIdx != ArgTys.size(); ++ArgIdx) {</div>
+<div class="line"><a name="l02765"></a><span class="lineno"> 2765</span>           <a class="code" href="classclang_1_1QualType.html">QualType</a> ParamTy = FD->getParamDecl(ArgIdx)->getType();</div>
+<div class="line"><a name="l02766"></a><span class="lineno"> 2766</span>           <span class="keywordflow">if</span> (!<a class="code" href="ASTMatchFinder_8cpp.html#a779280869b9fac47a9bc391e7709171f">Context</a>.<a class="code" href="classclang_1_1ASTContext.html#a40efa7d4fe133c0a709f0df4b6fcc2bf" title="Determine whether the given types are equivalent after cvr-qualifiers have been removed.">hasSameUnqualifiedType</a>(ArgTys[ArgIdx], ParamTy)) {</div>
+<div class="line"><a name="l02767"></a><span class="lineno"> 2767</span>             IsExactMatch = <span class="keyword">false</span>;</div>
+<div class="line"><a name="l02768"></a><span class="lineno"> 2768</span>             <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l02769"></a><span class="lineno"> 2769</span>           }</div>
+<div class="line"><a name="l02770"></a><span class="lineno"> 2770</span>         }</div>
+<div class="line"><a name="l02771"></a><span class="lineno"> 2771</span>       }</div>
+<div class="line"><a name="l02772"></a><span class="lineno"> 2772</span>     }</div>
+<div class="line"><a name="l02773"></a><span class="lineno"> 2773</span>     <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1FunctionTemplateDecl.html" title="Declaration of a template function.">FunctionTemplateDecl</a> *FD = dyn_cast<FunctionTemplateDecl>(D)) {</div>
+<div class="line"><a name="l02774"></a><span class="lineno"> 2774</span>       <a class="code" href="classclang_1_1TemplateParameterList.html" title="Stores a list of template parameters for a TemplateDecl and its derived classes.">TemplateParameterList</a> *Params = FD->getTemplateParameters();</div>
+<div class="line"><a name="l02775"></a><span class="lineno"> 2775</span>       <span class="keywordflow">if</span> (Params-><a class="code" href="classclang_1_1TemplateParameterList.html#a2ce2ffffbaa44a8bf317655f1ff5d845">size</a>() == 1)</div>
+<div class="line"><a name="l02776"></a><span class="lineno"> 2776</span>         IsTemplate = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l02777"></a><span class="lineno"> 2777</span>       <span class="keywordflow">else</span></div>
+<div class="line"><a name="l02778"></a><span class="lineno"> 2778</span>         IsStringTemplate = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l02779"></a><span class="lineno"> 2779</span>     }</div>
+<div class="line"><a name="l02780"></a><span class="lineno"> 2780</span> </div>
+<div class="line"><a name="l02781"></a><span class="lineno"> 2781</span>     <span class="keywordflow">if</span> (IsExactMatch) {</div>
+<div class="line"><a name="l02782"></a><span class="lineno"> 2782</span>       FoundExactMatch = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l02783"></a><span class="lineno"> 2783</span>       AllowRaw = <span class="keyword">false</span>;</div>
+<div class="line"><a name="l02784"></a><span class="lineno"> 2784</span>       AllowTemplate = <span class="keyword">false</span>;</div>
+<div class="line"><a name="l02785"></a><span class="lineno"> 2785</span>       AllowStringTemplate = <span class="keyword">false</span>;</div>
+<div class="line"><a name="l02786"></a><span class="lineno"> 2786</span>       <span class="keywordflow">if</span> (FoundRaw || FoundTemplate || FoundStringTemplate) {</div>
+<div class="line"><a name="l02787"></a><span class="lineno"> 2787</span>         <span class="comment">// Go through again and remove the raw and template decls we've</span></div>
+<div class="line"><a name="l02788"></a><span class="lineno"> 2788</span>         <span class="comment">// already found.</span></div>
+<div class="line"><a name="l02789"></a><span class="lineno"> 2789</span>         F.restart();</div>
+<div class="line"><a name="l02790"></a><span class="lineno"> 2790</span>         FoundRaw = FoundTemplate = FoundStringTemplate = <span class="keyword">false</span>;</div>
+<div class="line"><a name="l02791"></a><span class="lineno"> 2791</span>       }</div>
+<div class="line"><a name="l02792"></a><span class="lineno"> 2792</span>     } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (AllowRaw && IsRaw) {</div>
+<div class="line"><a name="l02793"></a><span class="lineno"> 2793</span>       FoundRaw = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l02794"></a><span class="lineno"> 2794</span>     } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (AllowTemplate && IsTemplate) {</div>
+<div class="line"><a name="l02795"></a><span class="lineno"> 2795</span>       FoundTemplate = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l02796"></a><span class="lineno"> 2796</span>     } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (AllowStringTemplate && IsStringTemplate) {</div>
+<div class="line"><a name="l02797"></a><span class="lineno"> 2797</span>       FoundStringTemplate = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l02798"></a><span class="lineno"> 2798</span>     } <span class="keywordflow">else</span> {</div>
+<div class="line"><a name="l02799"></a><span class="lineno"> 2799</span>       F.erase();</div>
+<div class="line"><a name="l02800"></a><span class="lineno"> 2800</span>     }</div>
+<div class="line"><a name="l02801"></a><span class="lineno"> 2801</span>   }</div>
+<div class="line"><a name="l02802"></a><span class="lineno"> 2802</span> </div>
+<div class="line"><a name="l02803"></a><span class="lineno"> 2803</span>   F.done();</div>
+<div class="line"><a name="l02804"></a><span class="lineno"> 2804</span> </div>
+<div class="line"><a name="l02805"></a><span class="lineno"> 2805</span>   <span class="comment">// C++11 [lex.ext]p3, p4: If S contains a literal operator with a matching</span></div>
+<div class="line"><a name="l02806"></a><span class="lineno"> 2806</span>   <span class="comment">// parameter type, that is used in preference to a raw literal operator</span></div>
+<div class="line"><a name="l02807"></a><span class="lineno"> 2807</span>   <span class="comment">// or literal operator template.</span></div>
+<div class="line"><a name="l02808"></a><span class="lineno"> 2808</span>   <span class="keywordflow">if</span> (FoundExactMatch)</div>
+<div class="line"><a name="l02809"></a><span class="lineno"> 2809</span>     <span class="keywordflow">return</span> LOLR_Cooked;</div>
+<div class="line"><a name="l02810"></a><span class="lineno"> 2810</span> </div>
+<div class="line"><a name="l02811"></a><span class="lineno"> 2811</span>   <span class="comment">// C++11 [lex.ext]p3, p4: S shall contain a raw literal operator or a literal</span></div>
+<div class="line"><a name="l02812"></a><span class="lineno"> 2812</span>   <span class="comment">// operator template, but not both.</span></div>
+<div class="line"><a name="l02813"></a><span class="lineno"> 2813</span>   <span class="keywordflow">if</span> (FoundRaw && FoundTemplate) {</div>
+<div class="line"><a name="l02814"></a><span class="lineno"> 2814</span>     <a class="code" href="LiteralSupport_8cpp.html#a5f4a4a29292c4a1697226abf1d22b9dd" title="Produce a diagnostic highlighting some portion of a literal.">Diag</a>(R.<a class="code" href="classclang_1_1LookupResult.html#af980e0b636ede7d9e0018dff05b0d269">getNameLoc</a>(), diag::err_ovl_ambiguous_call) << R.<a class="code" href="classclang_1_1LookupResult.html#a3dd82d154e991b574d70a6a5aba8c61b" title="Gets the name to look up.">getLookupName</a>();</div>
+<div class="line"><a name="l02815"></a><span class="lineno"> 2815</span>     <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1UnresolvedSetIterator.html">LookupResult::iterator</a> I = R.<a class="code" href="classclang_1_1LookupResult.html#a460debe22c59694c326b3c4671726889">begin</a>(), E = R.<a class="code" href="classclang_1_1LookupResult.html#ae1db847b7820acee0a0371510ccdf1c9">end</a>(); I != E; ++I) {</div>
+<div class="line"><a name="l02816"></a><span class="lineno"> 2816</span>       <a class="code" href="classclang_1_1Decl.html">Decl</a> *D = *I;</div>
+<div class="line"><a name="l02817"></a><span class="lineno"> 2817</span>       <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1UsingShadowDecl.html" title="Represents a shadow declaration introduced into a scope by a (resolved) using declaration.">UsingShadowDecl</a> *USD = dyn_cast<UsingShadowDecl>(D))</div>
+<div class="line"><a name="l02818"></a><span class="lineno"> 2818</span>         D = USD->getTargetDecl();</div>
+<div class="line"><a name="l02819"></a><span class="lineno"> 2819</span>       <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1FunctionTemplateDecl.html" title="Declaration of a template function.">FunctionTemplateDecl</a> *FunTmpl = dyn_cast<FunctionTemplateDecl>(D))</div>
+<div class="line"><a name="l02820"></a><span class="lineno"> 2820</span>         D = FunTmpl->getTemplatedDecl();</div>
+<div class="line"><a name="l02821"></a><span class="lineno"> 2821</span>       NoteOverloadCandidate(cast<FunctionDecl>(D));</div>
+<div class="line"><a name="l02822"></a><span class="lineno"> 2822</span>     }</div>
+<div class="line"><a name="l02823"></a><span class="lineno"> 2823</span>     <span class="keywordflow">return</span> LOLR_Error;</div>
+<div class="line"><a name="l02824"></a><span class="lineno"> 2824</span>   }</div>
+<div class="line"><a name="l02825"></a><span class="lineno"> 2825</span> </div>
+<div class="line"><a name="l02826"></a><span class="lineno"> 2826</span>   <span class="keywordflow">if</span> (FoundRaw)</div>
+<div class="line"><a name="l02827"></a><span class="lineno"> 2827</span>     <span class="keywordflow">return</span> LOLR_Raw;</div>
+<div class="line"><a name="l02828"></a><span class="lineno"> 2828</span> </div>
+<div class="line"><a name="l02829"></a><span class="lineno"> 2829</span>   <span class="keywordflow">if</span> (FoundTemplate)</div>
+<div class="line"><a name="l02830"></a><span class="lineno"> 2830</span>     <span class="keywordflow">return</span> LOLR_Template;</div>
+<div class="line"><a name="l02831"></a><span class="lineno"> 2831</span> </div>
+<div class="line"><a name="l02832"></a><span class="lineno"> 2832</span>   <span class="keywordflow">if</span> (FoundStringTemplate)</div>
+<div class="line"><a name="l02833"></a><span class="lineno"> 2833</span>     <span class="keywordflow">return</span> LOLR_StringTemplate;</div>
+<div class="line"><a name="l02834"></a><span class="lineno"> 2834</span> </div>
+<div class="line"><a name="l02835"></a><span class="lineno"> 2835</span>   <span class="comment">// Didn't find anything we could use.</span></div>
+<div class="line"><a name="l02836"></a><span class="lineno"> 2836</span>   <a class="code" href="LiteralSupport_8cpp.html#a5f4a4a29292c4a1697226abf1d22b9dd" title="Produce a diagnostic highlighting some portion of a literal.">Diag</a>(R.<a class="code" href="classclang_1_1LookupResult.html#af980e0b636ede7d9e0018dff05b0d269">getNameLoc</a>(), diag::err_ovl_no_viable_literal_operator)</div>
+<div class="line"><a name="l02837"></a><span class="lineno"> 2837</span>     << R.<a class="code" href="classclang_1_1LookupResult.html#a3dd82d154e991b574d70a6a5aba8c61b" title="Gets the name to look up.">getLookupName</a>() << (int)ArgTys.size() << ArgTys[0]</div>
+<div class="line"><a name="l02838"></a><span class="lineno"> 2838</span>     << (ArgTys.size() == 2 ? ArgTys[1] : <a class="code" href="classclang_1_1QualType.html">QualType</a>()) << AllowRaw</div>
+<div class="line"><a name="l02839"></a><span class="lineno"> 2839</span>     << (AllowTemplate || AllowStringTemplate);</div>
+<div class="line"><a name="l02840"></a><span class="lineno"> 2840</span>   <span class="keywordflow">return</span> LOLR_Error;</div>
+<div class="line"><a name="l02841"></a><span class="lineno"> 2841</span> }</div>
+<div class="line"><a name="l02842"></a><span class="lineno"> 2842</span> </div>
+<div class="line"><a name="l02843"></a><span class="lineno"><a class="code" href="classclang_1_1ADLResult.html#aa11af418c07de8a9e49eedafadb0bbfc"> 2843</a></span> <span class="keywordtype">void</span> <a class="code" href="classclang_1_1ADLResult.html#aa11af418c07de8a9e49eedafadb0bbfc" title="Adds a new ADL candidate to this map.">ADLResult::insert</a>(<a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *New) {</div>
+<div class="line"><a name="l02844"></a><span class="lineno"> 2844</span>   <a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *&Old = Decls[cast<NamedDecl>(New-><a class="code" href="classclang_1_1Decl.html#a8dc8c86b18af77eba9afe42e4f429fdc" title="Retrieves the "canonical" declaration of the given declaration.">getCanonicalDecl</a>())];</div>
+<div class="line"><a name="l02845"></a><span class="lineno"> 2845</span> </div>
+<div class="line"><a name="l02846"></a><span class="lineno"> 2846</span>   <span class="comment">// If we haven't yet seen a decl for this key, or the last decl</span></div>
+<div class="line"><a name="l02847"></a><span class="lineno"> 2847</span>   <span class="comment">// was exactly this one, we're done.</span></div>
+<div class="line"><a name="l02848"></a><span class="lineno"> 2848</span>   <span class="keywordflow">if</span> (Old == 0 || Old == New) {</div>
+<div class="line"><a name="l02849"></a><span class="lineno"> 2849</span>     Old = New;</div>
+<div class="line"><a name="l02850"></a><span class="lineno"> 2850</span>     <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l02851"></a><span class="lineno"> 2851</span>   }</div>
+<div class="line"><a name="l02852"></a><span class="lineno"> 2852</span> </div>
+<div class="line"><a name="l02853"></a><span class="lineno"> 2853</span>   <span class="comment">// Otherwise, decide which is a more recent redeclaration.</span></div>
+<div class="line"><a name="l02854"></a><span class="lineno"> 2854</span>   <a class="code" href="classclang_1_1FunctionDecl.html">FunctionDecl</a> *OldFD, *NewFD;</div>
+<div class="line"><a name="l02855"></a><span class="lineno"> 2855</span>   <span class="keywordflow">if</span> (isa<FunctionTemplateDecl>(New)) {</div>
+<div class="line"><a name="l02856"></a><span class="lineno"> 2856</span>     OldFD = cast<FunctionTemplateDecl>(Old)->getTemplatedDecl();</div>
+<div class="line"><a name="l02857"></a><span class="lineno"> 2857</span>     NewFD = cast<FunctionTemplateDecl>(New)->getTemplatedDecl();</div>
+<div class="line"><a name="l02858"></a><span class="lineno"> 2858</span>   } <span class="keywordflow">else</span> {</div>
+<div class="line"><a name="l02859"></a><span class="lineno"> 2859</span>     OldFD = cast<FunctionDecl>(Old);</div>
+<div class="line"><a name="l02860"></a><span class="lineno"> 2860</span>     NewFD = cast<FunctionDecl>(New);</div>
+<div class="line"><a name="l02861"></a><span class="lineno"> 2861</span>   }</div>
+<div class="line"><a name="l02862"></a><span class="lineno"> 2862</span> </div>
+<div class="line"><a name="l02863"></a><span class="lineno"> 2863</span>   <a class="code" href="classclang_1_1FunctionDecl.html">FunctionDecl</a> *Cursor = NewFD;</div>
+<div class="line"><a name="l02864"></a><span class="lineno"> 2864</span>   <span class="keywordflow">while</span> (<span class="keyword">true</span>) {</div>
+<div class="line"><a name="l02865"></a><span class="lineno"> 2865</span>     Cursor = Cursor-><a class="code" href="classclang_1_1Redeclarable.html#ae865b5549d99099ecb62d8b3a104f033" title="Return the previous declaration of this declaration or NULL if this is the first declaration.">getPreviousDecl</a>();</div>
+<div class="line"><a name="l02866"></a><span class="lineno"> 2866</span> </div>
+<div class="line"><a name="l02867"></a><span class="lineno"> 2867</span>     <span class="comment">// If we got to the end without finding OldFD, OldFD is the newer</span></div>
+<div class="line"><a name="l02868"></a><span class="lineno"> 2868</span>     <span class="comment">// declaration;  leave things as they are.</span></div>
+<div class="line"><a name="l02869"></a><span class="lineno"> 2869</span>     <span class="keywordflow">if</span> (!Cursor) <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l02870"></a><span class="lineno"> 2870</span> </div>
+<div class="line"><a name="l02871"></a><span class="lineno"> 2871</span>     <span class="comment">// If we do find OldFD, then NewFD is newer.</span></div>
+<div class="line"><a name="l02872"></a><span class="lineno"> 2872</span>     <span class="keywordflow">if</span> (Cursor == OldFD) <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l02873"></a><span class="lineno"> 2873</span> </div>
+<div class="line"><a name="l02874"></a><span class="lineno"> 2874</span>     <span class="comment">// Otherwise, keep looking.</span></div>
+<div class="line"><a name="l02875"></a><span class="lineno"> 2875</span>   }</div>
+<div class="line"><a name="l02876"></a><span class="lineno"> 2876</span> </div>
+<div class="line"><a name="l02877"></a><span class="lineno"> 2877</span>   Old = New;</div>
+<div class="line"><a name="l02878"></a><span class="lineno"> 2878</span> }</div>
+<div class="line"><a name="l02879"></a><span class="lineno"> 2879</span> </div>
+<div class="line"><a name="l02880"></a><span class="lineno"><a class="code" href="classclang_1_1Sema.html#a7625f231f692e0de45446f9e67686620"> 2880</a></span> <span class="keywordtype">void</span> <a class="code" href="classclang_1_1Sema.html#a7625f231f692e0de45446f9e67686620">Sema::ArgumentDependentLookup</a>(<a class="code" href="classclang_1_1DeclarationName.html">DeclarationName</a> Name, <span class="keywordtype">bool</span> Operator,</div>
+<div class="line"><a name="l02881"></a><span class="lineno"> 2881</span>                                    <a class="code" href="classclang_1_1SourceLocation.html" title="Encodes a location in the source. The SourceManager can decode this to get at the full include stack...">SourceLocation</a> Loc, <a class="code" href="classllvm_1_1ArrayRef.html">ArrayRef<Expr *></a> <a class="code" href="SemaOverload_8cpp.html#ab0970fce5a85028c7eac6fb99797fea5">Args</a>,</div>
+<div class="line"><a name="l02882"></a><span class="lineno"> 2882</span>                                    <a class="code" href="classclang_1_1ADLResult.html" title="A class for storing results from argument-dependent lookup.">ADLResult</a> &Result) {</div>
+<div class="line"><a name="l02883"></a><span class="lineno"> 2883</span>   <span class="comment">// Find all of the associated namespaces and classes based on the</span></div>
+<div class="line"><a name="l02884"></a><span class="lineno"> 2884</span>   <span class="comment">// arguments we have.</span></div>
+<div class="line"><a name="l02885"></a><span class="lineno"> 2885</span>   <a class="code" href="classclang_1_1Sema.html#a27dbfb91fb72a732f276f392a0f80564">AssociatedNamespaceSet</a> AssociatedNamespaces;</div>
+<div class="line"><a name="l02886"></a><span class="lineno"> 2886</span>   <a class="code" href="classclang_1_1Sema.html#a676e1612f9cbf42bb41120835e9b4d5a">AssociatedClassSet</a> AssociatedClasses;</div>
+<div class="line"><a name="l02887"></a><span class="lineno"> 2887</span>   FindAssociatedClassesAndNamespaces(Loc, Args,</div>
+<div class="line"><a name="l02888"></a><span class="lineno"> 2888</span>                                      AssociatedNamespaces,</div>
+<div class="line"><a name="l02889"></a><span class="lineno"> 2889</span>                                      AssociatedClasses);</div>
+<div class="line"><a name="l02890"></a><span class="lineno"> 2890</span> </div>
+<div class="line"><a name="l02891"></a><span class="lineno"> 2891</span>   <a class="code" href="classclang_1_1QualType.html">QualType</a> T1, T2;</div>
+<div class="line"><a name="l02892"></a><span class="lineno"> 2892</span>   <span class="keywordflow">if</span> (Operator) {</div>
+<div class="line"><a name="l02893"></a><span class="lineno"> 2893</span>     T1 = Args[0]->getType();</div>
+<div class="line"><a name="l02894"></a><span class="lineno"> 2894</span>     <span class="keywordflow">if</span> (Args.size() >= 2)</div>
+<div class="line"><a name="l02895"></a><span class="lineno"> 2895</span>       T2 = Args[1]->getType();</div>
+<div class="line"><a name="l02896"></a><span class="lineno"> 2896</span>   }</div>
+<div class="line"><a name="l02897"></a><span class="lineno"> 2897</span> </div>
+<div class="line"><a name="l02898"></a><span class="lineno"> 2898</span>   <span class="comment">// C++ [basic.lookup.argdep]p3:</span></div>
+<div class="line"><a name="l02899"></a><span class="lineno"> 2899</span>   <span class="comment">//   Let X be the lookup set produced by unqualified lookup (3.4.1)</span></div>
+<div class="line"><a name="l02900"></a><span class="lineno"> 2900</span>   <span class="comment">//   and let Y be the lookup set produced by argument dependent</span></div>
+<div class="line"><a name="l02901"></a><span class="lineno"> 2901</span>   <span class="comment">//   lookup (defined as follows). If X contains [...] then Y is</span></div>
+<div class="line"><a name="l02902"></a><span class="lineno"> 2902</span>   <span class="comment">//   empty. Otherwise Y is the set of declarations found in the</span></div>
+<div class="line"><a name="l02903"></a><span class="lineno"> 2903</span>   <span class="comment">//   namespaces associated with the argument types as described</span></div>
+<div class="line"><a name="l02904"></a><span class="lineno"> 2904</span>   <span class="comment">//   below. The set of declarations found by the lookup of the name</span></div>
+<div class="line"><a name="l02905"></a><span class="lineno"> 2905</span>   <span class="comment">//   is the union of X and Y.</span></div>
+<div class="line"><a name="l02906"></a><span class="lineno"> 2906</span>   <span class="comment">//</span></div>
+<div class="line"><a name="l02907"></a><span class="lineno"> 2907</span>   <span class="comment">// Here, we compute Y and add its members to the overloaded</span></div>
+<div class="line"><a name="l02908"></a><span class="lineno"> 2908</span>   <span class="comment">// candidate set.</span></div>
+<div class="line"><a name="l02909"></a><span class="lineno"> 2909</span>   <span class="keywordflow">for</span> (AssociatedNamespaceSet::iterator NS = AssociatedNamespaces.begin(),</div>
+<div class="line"><a name="l02910"></a><span class="lineno"> 2910</span>                                      NSEnd = AssociatedNamespaces.end();</div>
+<div class="line"><a name="l02911"></a><span class="lineno"> 2911</span>        NS != NSEnd; ++NS) {</div>
+<div class="line"><a name="l02912"></a><span class="lineno"> 2912</span>     <span class="comment">//   When considering an associated namespace, the lookup is the</span></div>
+<div class="line"><a name="l02913"></a><span class="lineno"> 2913</span>     <span class="comment">//   same as the lookup performed when the associated namespace is</span></div>
+<div class="line"><a name="l02914"></a><span class="lineno"> 2914</span>     <span class="comment">//   used as a qualifier (3.4.3.2) except that:</span></div>
+<div class="line"><a name="l02915"></a><span class="lineno"> 2915</span>     <span class="comment">//</span></div>
+<div class="line"><a name="l02916"></a><span class="lineno"> 2916</span>     <span class="comment">//     -- Any using-directives in the associated namespace are</span></div>
+<div class="line"><a name="l02917"></a><span class="lineno"> 2917</span>     <span class="comment">//        ignored.</span></div>
+<div class="line"><a name="l02918"></a><span class="lineno"> 2918</span>     <span class="comment">//</span></div>
+<div class="line"><a name="l02919"></a><span class="lineno"> 2919</span>     <span class="comment">//     -- Any namespace-scope friend functions declared in</span></div>
+<div class="line"><a name="l02920"></a><span class="lineno"> 2920</span>     <span class="comment">//        associated classes are visible within their respective</span></div>
+<div class="line"><a name="l02921"></a><span class="lineno"> 2921</span>     <span class="comment">//        namespaces even if they are not visible during an ordinary</span></div>
+<div class="line"><a name="l02922"></a><span class="lineno"> 2922</span>     <span class="comment">//        lookup (11.4).</span></div>
+<div class="line"><a name="l02923"></a><span class="lineno"> 2923</span>     <a class="code" href="classclang_1_1DeclContext.html#ac25dc34eabe6c4e035c76dd3329e8530">DeclContext::lookup_result</a> R = (*NS)->lookup(Name);</div>
+<div class="line"><a name="l02924"></a><span class="lineno"> 2924</span>     <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1NamedDecl.html">DeclContext::lookup_iterator</a> I = R.begin(), E = R.end(); I != E;</div>
+<div class="line"><a name="l02925"></a><span class="lineno"> 2925</span>          ++I) {</div>
+<div class="line"><a name="l02926"></a><span class="lineno"> 2926</span>       <a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *D = *I;</div>
+<div class="line"><a name="l02927"></a><span class="lineno"> 2927</span>       <span class="comment">// If the only declaration here is an ordinary friend, consider</span></div>
+<div class="line"><a name="l02928"></a><span class="lineno"> 2928</span>       <span class="comment">// it only if it was declared in an associated classes.</span></div>
+<div class="line"><a name="l02929"></a><span class="lineno"> 2929</span>       <span class="keywordflow">if</span> ((D-><a class="code" href="classclang_1_1Decl.html#a1172fe32c48af6bf358c3ae0e81a9257">getIdentifierNamespace</a>() & <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710a404c48f346be24fe30ae9bb910177a34">Decl::IDNS_Ordinary</a>) == 0) {</div>
+<div class="line"><a name="l02930"></a><span class="lineno"> 2930</span>         <span class="comment">// If it's neither ordinarily visible nor a friend, we can't find it.</span></div>
+<div class="line"><a name="l02931"></a><span class="lineno"> 2931</span>         <span class="keywordflow">if</span> ((D-><a class="code" href="classclang_1_1Decl.html#a1172fe32c48af6bf358c3ae0e81a9257">getIdentifierNamespace</a>() & <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710aca967650768477c1434472f270759ec1">Decl::IDNS_OrdinaryFriend</a>) == 0)</div>
+<div class="line"><a name="l02932"></a><span class="lineno"> 2932</span>           <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l02933"></a><span class="lineno"> 2933</span> </div>
+<div class="line"><a name="l02934"></a><span class="lineno"> 2934</span>         <span class="keywordtype">bool</span> DeclaredInAssociatedClass = <span class="keyword">false</span>;</div>
+<div class="line"><a name="l02935"></a><span class="lineno"> 2935</span>         <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1Decl.html">Decl</a> *DI = D; DI; DI = DI-><a class="code" href="classclang_1_1Decl.html#a89eb85283ad2678e94841d45c0a30c3a" title="Retrieve the previous declaration that declares the same entity as this declaration, or NULL if there is no previous declaration.">getPreviousDecl</a>()) {</div>
+<div class="line"><a name="l02936"></a><span class="lineno"> 2936</span>           <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *LexDC = DI->getLexicalDeclContext();</div>
+<div class="line"><a name="l02937"></a><span class="lineno"> 2937</span>           <span class="keywordflow">if</span> (isa<CXXRecordDecl>(LexDC) &&</div>
+<div class="line"><a name="l02938"></a><span class="lineno"> 2938</span>               AssociatedClasses.count(cast<CXXRecordDecl>(LexDC))) {</div>
+<div class="line"><a name="l02939"></a><span class="lineno"> 2939</span>             DeclaredInAssociatedClass = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l02940"></a><span class="lineno"> 2940</span>             <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l02941"></a><span class="lineno"> 2941</span>           }</div>
+<div class="line"><a name="l02942"></a><span class="lineno"> 2942</span>         }</div>
+<div class="line"><a name="l02943"></a><span class="lineno"> 2943</span>         <span class="keywordflow">if</span> (!DeclaredInAssociatedClass)</div>
+<div class="line"><a name="l02944"></a><span class="lineno"> 2944</span>           <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l02945"></a><span class="lineno"> 2945</span>       }</div>
+<div class="line"><a name="l02946"></a><span class="lineno"> 2946</span> </div>
+<div class="line"><a name="l02947"></a><span class="lineno"> 2947</span>       <span class="keywordflow">if</span> (isa<UsingShadowDecl>(D))</div>
+<div class="line"><a name="l02948"></a><span class="lineno"> 2948</span>         D = cast<UsingShadowDecl>(D)->getTargetDecl();</div>
+<div class="line"><a name="l02949"></a><span class="lineno"> 2949</span> </div>
+<div class="line"><a name="l02950"></a><span class="lineno"> 2950</span>       <span class="keywordflow">if</span> (isa<FunctionDecl>(D)) {</div>
+<div class="line"><a name="l02951"></a><span class="lineno"> 2951</span>         <span class="keywordflow">if</span> (Operator &&</div>
+<div class="line"><a name="l02952"></a><span class="lineno"> 2952</span>             !<a class="code" href="SemaLookup_8cpp.html#a09a3390e17b62472963f07da2acca607">IsAcceptableNonMemberOperatorCandidate</a>(cast<FunctionDecl>(D),</div>
+<div class="line"><a name="l02953"></a><span class="lineno"> 2953</span>                                                     T1, T2, <a class="code" href="ASTMatchFinder_8cpp.html#a779280869b9fac47a9bc391e7709171f">Context</a>))</div>
+<div class="line"><a name="l02954"></a><span class="lineno"> 2954</span>           <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l02955"></a><span class="lineno"> 2955</span>       } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (!isa<FunctionTemplateDecl>(D))</div>
+<div class="line"><a name="l02956"></a><span class="lineno"> 2956</span>         <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l02957"></a><span class="lineno"> 2957</span> </div>
+<div class="line"><a name="l02958"></a><span class="lineno"> 2958</span>       Result.<a class="code" href="classclang_1_1ADLResult.html#aa11af418c07de8a9e49eedafadb0bbfc" title="Adds a new ADL candidate to this map.">insert</a>(D);</div>
+<div class="line"><a name="l02959"></a><span class="lineno"> 2959</span>     }</div>
+<div class="line"><a name="l02960"></a><span class="lineno"> 2960</span>   }</div>
+<div class="line"><a name="l02961"></a><span class="lineno"> 2961</span> }</div>
+<div class="line"><a name="l02962"></a><span class="lineno"> 2962</span> </div>
+<div class="line"><a name="l02963"></a><span class="lineno"> 2963</span> <span class="comment">//----------------------------------------------------------------------------</span></div>
+<div class="line"><a name="l02964"></a><span class="lineno"> 2964</span> <span class="comment">// Search for all visible declarations.</span></div>
+<div class="line"><a name="l02965"></a><span class="lineno"> 2965</span> <span class="comment">//----------------------------------------------------------------------------</span></div>
+<div class="line"><a name="l02966"></a><span class="lineno"><a class="code" href="classclang_1_1VisibleDeclConsumer.html#a7c294f01ca63e9fd6bd79dcb4cad2191"> 2966</a></span> <a class="code" href="classclang_1_1VisibleDeclConsumer.html#a7c294f01ca63e9fd6bd79dcb4cad2191" title="Destroys the visible declaration consumer.">VisibleDeclConsumer::~VisibleDeclConsumer</a>() { }</div>
+<div class="line"><a name="l02967"></a><span class="lineno"> 2967</span> </div>
+<div class="line"><a name="l02968"></a><span class="lineno"><a class="code" href="classclang_1_1VisibleDeclConsumer.html#a21d36539fa6518de53951678d2d81c69"> 2968</a></span> <span class="keywordtype">bool</span> <a class="code" href="classclang_1_1VisibleDeclConsumer.html#a21d36539fa6518de53951678d2d81c69" title="Determine whether hidden declarations (from unimported modules) should be given to this consumer...">VisibleDeclConsumer::includeHiddenDecls</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">false</span>; }</div>
+<div class="line"><a name="l02969"></a><span class="lineno"> 2969</span> </div>
+<div class="line"><a name="l02970"></a><span class="lineno"> 2970</span> <span class="keyword">namespace </span>{</div>
+<div class="line"><a name="l02971"></a><span class="lineno"> 2971</span> </div>
+<div class="line"><a name="l02972"></a><span class="lineno"> 2972</span> <span class="keyword">class </span>ShadowContextRAII;</div>
+<div class="line"><a name="l02973"></a><span class="lineno"> 2973</span> </div>
+<div class="line"><a name="l02974"></a><span class="lineno"> 2974</span> <span class="keyword">class </span>VisibleDeclsRecord {</div>
+<div class="line"><a name="l02975"></a><span class="lineno"> 2975</span> <span class="keyword">public</span>:<span class="comment"></span></div>
+<div class="line"><a name="l02976"></a><span class="lineno"> 2976</span> <span class="comment">  /// \brief An entry in the shadow map, which is optimized to store a</span></div>
+<div class="line"><a name="l02977"></a><span class="lineno"> 2977</span> <span class="comment">  /// single declaration (the common case) but can also store a list</span></div>
+<div class="line"><a name="l02978"></a><span class="lineno"> 2978</span> <span class="comment">  /// of declarations.</span></div>
+<div class="line"><a name="l02979"></a><span class="lineno"> 2979</span> <span class="comment"></span>  <span class="keyword">typedef</span> llvm::TinyPtrVector<NamedDecl*> ShadowMapEntry;</div>
+<div class="line"><a name="l02980"></a><span class="lineno"> 2980</span> </div>
+<div class="line"><a name="l02981"></a><span class="lineno"> 2981</span> <span class="keyword">private</span>:<span class="comment"></span></div>
+<div class="line"><a name="l02982"></a><span class="lineno"> 2982</span> <span class="comment">  /// \brief A mapping from declaration names to the declarations that have</span></div>
+<div class="line"><a name="l02983"></a><span class="lineno"> 2983</span> <span class="comment">  /// this name within a particular scope.</span></div>
+<div class="line"><a name="l02984"></a><span class="lineno"> 2984</span> <span class="comment"></span>  <span class="keyword">typedef</span> llvm::DenseMap<DeclarationName, ShadowMapEntry> ShadowMap;</div>
+<div class="line"><a name="l02985"></a><span class="lineno"> 2985</span> <span class="comment"></span></div>
+<div class="line"><a name="l02986"></a><span class="lineno"> 2986</span> <span class="comment">  /// \brief A list of shadow maps, which is used to model name hiding.</span></div>
+<div class="line"><a name="l02987"></a><span class="lineno"> 2987</span> <span class="comment"></span>  std::list<ShadowMap> ShadowMaps;</div>
+<div class="line"><a name="l02988"></a><span class="lineno"> 2988</span> <span class="comment"></span></div>
+<div class="line"><a name="l02989"></a><span class="lineno"> 2989</span> <span class="comment">  /// \brief The declaration contexts we have already visited.</span></div>
+<div class="line"><a name="l02990"></a><span class="lineno"> 2990</span> <span class="comment"></span>  llvm::SmallPtrSet<DeclContext *, 8> VisitedContexts;</div>
+<div class="line"><a name="l02991"></a><span class="lineno"> 2991</span> </div>
+<div class="line"><a name="l02992"></a><span class="lineno"> 2992</span>   <span class="keyword">friend</span> <span class="keyword">class </span>ShadowContextRAII;</div>
+<div class="line"><a name="l02993"></a><span class="lineno"> 2993</span> </div>
+<div class="line"><a name="l02994"></a><span class="lineno"> 2994</span> <span class="keyword">public</span>:<span class="comment"></span></div>
+<div class="line"><a name="l02995"></a><span class="lineno"> 2995</span> <span class="comment">  /// \brief Determine whether we have already visited this context</span></div>
+<div class="line"><a name="l02996"></a><span class="lineno"> 2996</span> <span class="comment">  /// (and, if not, note that we are going to visit that context now).</span></div>
+<div class="line"><a name="l02997"></a><span class="lineno"> 2997</span> <span class="comment"></span>  <span class="keywordtype">bool</span> visitedContext(<a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *Ctx) {</div>
+<div class="line"><a name="l02998"></a><span class="lineno"> 2998</span>     <span class="keywordflow">return</span> !VisitedContexts.insert(Ctx);</div>
+<div class="line"><a name="l02999"></a><span class="lineno"> 2999</span>   }</div>
+<div class="line"><a name="l03000"></a><span class="lineno"> 3000</span> </div>
+<div class="line"><a name="l03001"></a><span class="lineno"> 3001</span>   <span class="keywordtype">bool</span> alreadyVisitedContext(<a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *Ctx) {</div>
+<div class="line"><a name="l03002"></a><span class="lineno"> 3002</span>     <span class="keywordflow">return</span> VisitedContexts.count(Ctx);</div>
+<div class="line"><a name="l03003"></a><span class="lineno"> 3003</span>   }</div>
+<div class="line"><a name="l03004"></a><span class="lineno"> 3004</span> <span class="comment"></span></div>
+<div class="line"><a name="l03005"></a><span class="lineno"> 3005</span> <span class="comment">  /// \brief Determine whether the given declaration is hidden in the</span></div>
+<div class="line"><a name="l03006"></a><span class="lineno"> 3006</span> <span class="comment">  /// current scope.</span></div>
+<div class="line"><a name="l03007"></a><span class="lineno"> 3007</span> <span class="comment">  ///</span></div>
+<div class="line"><a name="l03008"></a><span class="lineno"> 3008</span> <span class="comment">  /// \returns the declaration that hides the given declaration, or</span></div>
+<div class="line"><a name="l03009"></a><span class="lineno"> 3009</span> <span class="comment">  /// NULL if no such declaration exists.</span></div>
+<div class="line"><a name="l03010"></a><span class="lineno"> 3010</span> <span class="comment"></span>  <a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *checkHidden(<a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *ND);</div>
+<div class="line"><a name="l03011"></a><span class="lineno"> 3011</span> <span class="comment"></span></div>
+<div class="line"><a name="l03012"></a><span class="lineno"> 3012</span> <span class="comment">  /// \brief Add a declaration to the current shadow map.</span></div>
+<div class="line"><a name="l03013"></a><span class="lineno"> 3013</span> <span class="comment"></span>  <span class="keywordtype">void</span> add(<a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *ND) {</div>
+<div class="line"><a name="l03014"></a><span class="lineno"> 3014</span>     ShadowMaps.back()[ND-><a class="code" href="classclang_1_1NamedDecl.html#a1e3e90455be89bb5c7c23640cbbd7153">getDeclName</a>()].push_back(ND);</div>
+<div class="line"><a name="l03015"></a><span class="lineno"> 3015</span>   }</div>
+<div class="line"><a name="l03016"></a><span class="lineno"> 3016</span> };</div>
+<div class="line"><a name="l03017"></a><span class="lineno"> 3017</span> <span class="comment"></span></div>
+<div class="line"><a name="l03018"></a><span class="lineno"> 3018</span> <span class="comment">/// \brief RAII object that records when we've entered a shadow context.</span></div>
+<div class="line"><a name="l03019"></a><span class="lineno"> 3019</span> <span class="comment"></span><span class="keyword">class </span>ShadowContextRAII {</div>
+<div class="line"><a name="l03020"></a><span class="lineno"> 3020</span>   VisibleDeclsRecord &Visible;</div>
+<div class="line"><a name="l03021"></a><span class="lineno"> 3021</span> </div>
+<div class="line"><a name="l03022"></a><span class="lineno"> 3022</span>   <span class="keyword">typedef</span> VisibleDeclsRecord::ShadowMap ShadowMap;</div>
+<div class="line"><a name="l03023"></a><span class="lineno"> 3023</span> </div>
+<div class="line"><a name="l03024"></a><span class="lineno"> 3024</span> <span class="keyword">public</span>:</div>
+<div class="line"><a name="l03025"></a><span class="lineno"> 3025</span>   ShadowContextRAII(VisibleDeclsRecord &Visible) : Visible(Visible) {</div>
+<div class="line"><a name="l03026"></a><span class="lineno"> 3026</span>     Visible.ShadowMaps.push_back(ShadowMap());</div>
+<div class="line"><a name="l03027"></a><span class="lineno"> 3027</span>   }</div>
+<div class="line"><a name="l03028"></a><span class="lineno"> 3028</span> </div>
+<div class="line"><a name="l03029"></a><span class="lineno"> 3029</span>   ~ShadowContextRAII() {</div>
+<div class="line"><a name="l03030"></a><span class="lineno"> 3030</span>     Visible.ShadowMaps.pop_back();</div>
+<div class="line"><a name="l03031"></a><span class="lineno"> 3031</span>   }</div>
+<div class="line"><a name="l03032"></a><span class="lineno"> 3032</span> };</div>
+<div class="line"><a name="l03033"></a><span class="lineno"> 3033</span> </div>
+<div class="line"><a name="l03034"></a><span class="lineno"> 3034</span> } <span class="comment">// end anonymous namespace</span></div>
+<div class="line"><a name="l03035"></a><span class="lineno"> 3035</span> </div>
+<div class="line"><a name="l03036"></a><span class="lineno"> 3036</span> <a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *VisibleDeclsRecord::checkHidden(<a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *ND) {</div>
+<div class="line"><a name="l03037"></a><span class="lineno"> 3037</span>   <span class="comment">// Look through using declarations.</span></div>
+<div class="line"><a name="l03038"></a><span class="lineno"> 3038</span>   ND = ND-><a class="code" href="classclang_1_1NamedDecl.html#a8fee30304b9ae8b24136a279b678b951" title="Looks through UsingDecls and ObjCCompatibleAliasDecls for the underlying named decl.">getUnderlyingDecl</a>();</div>
+<div class="line"><a name="l03039"></a><span class="lineno"> 3039</span> </div>
+<div class="line"><a name="l03040"></a><span class="lineno"> 3040</span>   <span class="keywordtype">unsigned</span> IDNS = ND-><a class="code" href="classclang_1_1Decl.html#a1172fe32c48af6bf358c3ae0e81a9257">getIdentifierNamespace</a>();</div>
+<div class="line"><a name="l03041"></a><span class="lineno"> 3041</span>   std::list<ShadowMap>::reverse_iterator <a class="code" href="AnalysisBasedWarnings_8cpp.html#afe4356a77609114d8df0bfc9c2b8701f">SM</a> = ShadowMaps.rbegin();</div>
+<div class="line"><a name="l03042"></a><span class="lineno"> 3042</span>   <span class="keywordflow">for</span> (std::list<ShadowMap>::reverse_iterator SMEnd = ShadowMaps.rend();</div>
+<div class="line"><a name="l03043"></a><span class="lineno"> 3043</span>        SM != SMEnd; ++<a class="code" href="AnalysisBasedWarnings_8cpp.html#afe4356a77609114d8df0bfc9c2b8701f">SM</a>) {</div>
+<div class="line"><a name="l03044"></a><span class="lineno"> 3044</span>     ShadowMap::iterator Pos = SM->find(ND-><a class="code" href="classclang_1_1NamedDecl.html#a1e3e90455be89bb5c7c23640cbbd7153">getDeclName</a>());</div>
+<div class="line"><a name="l03045"></a><span class="lineno"> 3045</span>     <span class="keywordflow">if</span> (Pos == SM->end())</div>
+<div class="line"><a name="l03046"></a><span class="lineno"> 3046</span>       <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l03047"></a><span class="lineno"> 3047</span> </div>
+<div class="line"><a name="l03048"></a><span class="lineno"> 3048</span>     <span class="keywordflow">for</span> (ShadowMapEntry::iterator I = Pos->second.begin(),</div>
+<div class="line"><a name="l03049"></a><span class="lineno"> 3049</span>                                IEnd = Pos->second.end();</div>
+<div class="line"><a name="l03050"></a><span class="lineno"> 3050</span>          I != IEnd; ++I) {</div>
+<div class="line"><a name="l03051"></a><span class="lineno"> 3051</span>       <span class="comment">// A tag declaration does not hide a non-tag declaration.</span></div>
+<div class="line"><a name="l03052"></a><span class="lineno"> 3052</span>       <span class="keywordflow">if</span> ((*I)->hasTagIdentifierNamespace() &&</div>
+<div class="line"><a name="l03053"></a><span class="lineno"> 3053</span>           (IDNS & (<a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710a96e26295d5162e8a76b56de4e5b11602">Decl::IDNS_Member</a> | <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710a404c48f346be24fe30ae9bb910177a34">Decl::IDNS_Ordinary</a> |</div>
+<div class="line"><a name="l03054"></a><span class="lineno"> 3054</span>                    <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710abdf62fd9f1af5e6c4d726c75569cbee8" title="Objective C @protocol.">Decl::IDNS_ObjCProtocol</a>)))</div>
+<div class="line"><a name="l03055"></a><span class="lineno"> 3055</span>         <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l03056"></a><span class="lineno"> 3056</span> </div>
+<div class="line"><a name="l03057"></a><span class="lineno"> 3057</span>       <span class="comment">// Protocols are in distinct namespaces from everything else.</span></div>
+<div class="line"><a name="l03058"></a><span class="lineno"> 3058</span>       <span class="keywordflow">if</span> ((((*I)->getIdentifierNamespace() & <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710abdf62fd9f1af5e6c4d726c75569cbee8" title="Objective C @protocol.">Decl::IDNS_ObjCProtocol</a>)</div>
+<div class="line"><a name="l03059"></a><span class="lineno"> 3059</span>            || (IDNS & <a class="code" href="classclang_1_1Decl.html#a9e38ae17197f1ebf6cdbb58260133710abdf62fd9f1af5e6c4d726c75569cbee8" title="Objective C @protocol.">Decl::IDNS_ObjCProtocol</a>)) &&</div>
+<div class="line"><a name="l03060"></a><span class="lineno"> 3060</span>           (*I)->getIdentifierNamespace() != IDNS)</div>
+<div class="line"><a name="l03061"></a><span class="lineno"> 3061</span>         <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l03062"></a><span class="lineno"> 3062</span> </div>
+<div class="line"><a name="l03063"></a><span class="lineno"> 3063</span>       <span class="comment">// Functions and function templates in the same scope overload</span></div>
+<div class="line"><a name="l03064"></a><span class="lineno"> 3064</span>       <span class="comment">// rather than hide.  FIXME: Look for hiding based on function</span></div>
+<div class="line"><a name="l03065"></a><span class="lineno"> 3065</span>       <span class="comment">// signatures!</span></div>
+<div class="line"><a name="l03066"></a><span class="lineno"> 3066</span>       <span class="keywordflow">if</span> ((*I)->isFunctionOrFunctionTemplate() &&</div>
+<div class="line"><a name="l03067"></a><span class="lineno"> 3067</span>           ND-><a class="code" href="classclang_1_1Decl.html#acfded90869b5610b7eb1958e843e74d2" title="Whether this declaration is a function or function template.">isFunctionOrFunctionTemplate</a>() &&</div>
+<div class="line"><a name="l03068"></a><span class="lineno"> 3068</span>           SM == ShadowMaps.rbegin())</div>
+<div class="line"><a name="l03069"></a><span class="lineno"> 3069</span>         <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l03070"></a><span class="lineno"> 3070</span> </div>
+<div class="line"><a name="l03071"></a><span class="lineno"> 3071</span>       <span class="comment">// We've found a declaration that hides this one.</span></div>
+<div class="line"><a name="l03072"></a><span class="lineno"> 3072</span>       <span class="keywordflow">return</span> *I;</div>
+<div class="line"><a name="l03073"></a><span class="lineno"> 3073</span>     }</div>
+<div class="line"><a name="l03074"></a><span class="lineno"> 3074</span>   }</div>
+<div class="line"><a name="l03075"></a><span class="lineno"> 3075</span> </div>
+<div class="line"><a name="l03076"></a><span class="lineno"> 3076</span>   <span class="keywordflow">return</span> 0;</div>
+<div class="line"><a name="l03077"></a><span class="lineno"> 3077</span> }</div>
+<div class="line"><a name="l03078"></a><span class="lineno"> 3078</span> </div>
+<div class="line"><a name="l03079"></a><span class="lineno"><a class="code" href="SemaLookup_8cpp.html#a5f870ddac6aadf46816fdb72e1c26fd3"> 3079</a></span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="SemaLookup_8cpp.html#a5f870ddac6aadf46816fdb72e1c26fd3">LookupVisibleDecls</a>(<a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *Ctx, <a class="code" href="classclang_1_1LookupResult.html" title="Represents the results of name lookup.">LookupResult</a> &Result,</div>
+<div class="line"><a name="l03080"></a><span class="lineno"> 3080</span>                                <span class="keywordtype">bool</span> QualifiedNameLookup,</div>
+<div class="line"><a name="l03081"></a><span class="lineno"> 3081</span>                                <span class="keywordtype">bool</span> InBaseClass,</div>
+<div class="line"><a name="l03082"></a><span class="lineno"> 3082</span>                                <a class="code" href="classclang_1_1VisibleDeclConsumer.html" title="Consumes visible declarations found when searching for all visible names within a given scope or cont...">VisibleDeclConsumer</a> &Consumer,</div>
+<div class="line"><a name="l03083"></a><span class="lineno"> 3083</span>                                VisibleDeclsRecord &Visited) {</div>
+<div class="line"><a name="l03084"></a><span class="lineno"> 3084</span>   <span class="keywordflow">if</span> (!Ctx)</div>
+<div class="line"><a name="l03085"></a><span class="lineno"> 3085</span>     <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l03086"></a><span class="lineno"> 3086</span> </div>
+<div class="line"><a name="l03087"></a><span class="lineno"> 3087</span>   <span class="comment">// Make sure we don't visit the same context twice.</span></div>
+<div class="line"><a name="l03088"></a><span class="lineno"> 3088</span>   <span class="keywordflow">if</span> (Visited.visitedContext(Ctx-><a class="code" href="classclang_1_1DeclContext.html#ac3368ad7389098f8fed5c5d346b77445">getPrimaryContext</a>()))</div>
+<div class="line"><a name="l03089"></a><span class="lineno"> 3089</span>     <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l03090"></a><span class="lineno"> 3090</span> </div>
+<div class="line"><a name="l03091"></a><span class="lineno"> 3091</span>   <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *Class = dyn_cast<CXXRecordDecl>(Ctx))</div>
+<div class="line"><a name="l03092"></a><span class="lineno"> 3092</span>     Result.<a class="code" href="classclang_1_1LookupResult.html#a9a66340b9004f3dfbd4a8048cf991d42" title="Get the Sema object that this lookup result is searching with.">getSema</a>().<a class="code" href="classclang_1_1Sema.html#a13e40364e7b40a2311e03d010610bd34" title="Force the declaration of any implicitly-declared members of this class.">ForceDeclarationOfImplicitMembers</a>(Class);</div>
+<div class="line"><a name="l03093"></a><span class="lineno"> 3093</span> </div>
+<div class="line"><a name="l03094"></a><span class="lineno"> 3094</span>   <span class="comment">// Enumerate all of the results in this context.</span></div>
+<div class="line"><a name="l03095"></a><span class="lineno"> 3095</span>   <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1DeclContext_1_1all__lookups__iterator.html">DeclContext::all_lookups_iterator</a> L = Ctx-><a class="code" href="classclang_1_1DeclContext.html#adb00cc1a9e8709ccb39abead0082b2b5" title="Iterators over all possible lookups within this context.">lookups_begin</a>(),</div>
+<div class="line"><a name="l03096"></a><span class="lineno"> 3096</span>                                       LEnd = Ctx-><a class="code" href="classclang_1_1DeclContext.html#a20f1f2417c28d535321728f403b4fccf">lookups_end</a>();</div>
+<div class="line"><a name="l03097"></a><span class="lineno"> 3097</span>        L != LEnd; ++L) {</div>
+<div class="line"><a name="l03098"></a><span class="lineno"> 3098</span>     <a class="code" href="classclang_1_1DeclContext.html#ac25dc34eabe6c4e035c76dd3329e8530">DeclContext::lookup_result</a> R = *L;</div>
+<div class="line"><a name="l03099"></a><span class="lineno"> 3099</span>     <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1NamedDecl.html">DeclContext::lookup_iterator</a> I = R.begin(), E = R.end(); I != E;</div>
+<div class="line"><a name="l03100"></a><span class="lineno"> 3100</span>          ++I) {</div>
+<div class="line"><a name="l03101"></a><span class="lineno"> 3101</span>       <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *ND = dyn_cast<NamedDecl>(*I)) {</div>
+<div class="line"><a name="l03102"></a><span class="lineno"> 3102</span>         <span class="keywordflow">if</span> ((ND = Result.<a class="code" href="classclang_1_1LookupResult.html#aaa70a0b9fc7600f4077789afeee34f63" title="Retrieve the accepted (re)declaration of the given declaration, if there is one.">getAcceptableDecl</a>(ND))) {</div>
+<div class="line"><a name="l03103"></a><span class="lineno"> 3103</span>           Consumer.<a class="code" href="classclang_1_1VisibleDeclConsumer.html#a3e33c22b58be42ce311e2db3da14b023" title="Invoked each time Sema::LookupVisibleDecls() finds a declaration visible from the current scope or co...">FoundDecl</a>(ND, Visited.checkHidden(ND), Ctx, InBaseClass);</div>
+<div class="line"><a name="l03104"></a><span class="lineno"> 3104</span>           Visited.add(ND);</div>
+<div class="line"><a name="l03105"></a><span class="lineno"> 3105</span>         }</div>
+<div class="line"><a name="l03106"></a><span class="lineno"> 3106</span>       }</div>
+<div class="line"><a name="l03107"></a><span class="lineno"> 3107</span>     }</div>
+<div class="line"><a name="l03108"></a><span class="lineno"> 3108</span>   }</div>
+<div class="line"><a name="l03109"></a><span class="lineno"> 3109</span> </div>
+<div class="line"><a name="l03110"></a><span class="lineno"> 3110</span>   <span class="comment">// Traverse using directives for qualified name lookup.</span></div>
+<div class="line"><a name="l03111"></a><span class="lineno"> 3111</span>   <span class="keywordflow">if</span> (QualifiedNameLookup) {</div>
+<div class="line"><a name="l03112"></a><span class="lineno"> 3112</span>     ShadowContextRAII Shadow(Visited);</div>
+<div class="line"><a name="l03113"></a><span class="lineno"> 3113</span>     <a class="code" href="classclang_1_1DeclContext.html#a073bdd3d5bbee972cf008ebb15d50bbe">DeclContext::udir_iterator</a> I, E;</div>
+<div class="line"><a name="l03114"></a><span class="lineno"> 3114</span>     <span class="keywordflow">for</span> (llvm::tie(I, E) = Ctx-><a class="code" href="classclang_1_1DeclContext.html#a4d67d5fc4d4038c838d14e728250057d">getUsingDirectives</a>(); I != E; ++I) {</div>
+<div class="line"><a name="l03115"></a><span class="lineno"> 3115</span>       <a class="code" href="SemaLookup_8cpp.html#a5f870ddac6aadf46816fdb72e1c26fd3">LookupVisibleDecls</a>((*I)->getNominatedNamespace(), Result,</div>
+<div class="line"><a name="l03116"></a><span class="lineno"> 3116</span>                          QualifiedNameLookup, InBaseClass, Consumer, Visited);</div>
+<div class="line"><a name="l03117"></a><span class="lineno"> 3117</span>     }</div>
+<div class="line"><a name="l03118"></a><span class="lineno"> 3118</span>   }</div>
+<div class="line"><a name="l03119"></a><span class="lineno"> 3119</span> </div>
+<div class="line"><a name="l03120"></a><span class="lineno"> 3120</span>   <span class="comment">// Traverse the contexts of inherited C++ classes.</span></div>
+<div class="line"><a name="l03121"></a><span class="lineno"> 3121</span>   <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1CXXRecordDecl.html" title="Represents a C++ struct/union/class.">CXXRecordDecl</a> *Record = dyn_cast<CXXRecordDecl>(Ctx)) {</div>
+<div class="line"><a name="l03122"></a><span class="lineno"> 3122</span>     <span class="keywordflow">if</span> (!Record->hasDefinition())</div>
+<div class="line"><a name="l03123"></a><span class="lineno"> 3123</span>       <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l03124"></a><span class="lineno"> 3124</span> </div>
+<div class="line"><a name="l03125"></a><span class="lineno"> 3125</span>     <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1CXXBaseSpecifier.html" title="Represents a base class of a C++ class.">CXXRecordDecl::base_class_iterator</a> B = Record->bases_begin(),</div>
+<div class="line"><a name="l03126"></a><span class="lineno"> 3126</span>                                          BEnd = Record->bases_end();</div>
+<div class="line"><a name="l03127"></a><span class="lineno"> 3127</span>          B != BEnd; ++B) {</div>
+<div class="line"><a name="l03128"></a><span class="lineno"> 3128</span>       <a class="code" href="classclang_1_1QualType.html">QualType</a> BaseType = B->getType();</div>
+<div class="line"><a name="l03129"></a><span class="lineno"> 3129</span> </div>
+<div class="line"><a name="l03130"></a><span class="lineno"> 3130</span>       <span class="comment">// Don't look into dependent bases, because name lookup can't look</span></div>
+<div class="line"><a name="l03131"></a><span class="lineno"> 3131</span>       <span class="comment">// there anyway.</span></div>
+<div class="line"><a name="l03132"></a><span class="lineno"> 3132</span>       <span class="keywordflow">if</span> (BaseType-><a class="code" href="classclang_1_1Type.html#a7e475b7859ae970eb837da95e94ab26c">isDependentType</a>())</div>
+<div class="line"><a name="l03133"></a><span class="lineno"> 3133</span>         <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l03134"></a><span class="lineno"> 3134</span> </div>
+<div class="line"><a name="l03135"></a><span class="lineno"> 3135</span>       <span class="keyword">const</span> <a class="code" href="classclang_1_1RecordType.html">RecordType</a> *Record = BaseType-><a class="code" href="classclang_1_1Type.html#a12103ea8bee9506930287bab68a08569">getAs</a><<a class="code" href="classclang_1_1RecordType.html">RecordType</a>>();</div>
+<div class="line"><a name="l03136"></a><span class="lineno"> 3136</span>       <span class="keywordflow">if</span> (!Record)</div>
+<div class="line"><a name="l03137"></a><span class="lineno"> 3137</span>         <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l03138"></a><span class="lineno"> 3138</span> </div>
+<div class="line"><a name="l03139"></a><span class="lineno"> 3139</span>       <span class="comment">// FIXME: It would be nice to be able to determine whether referencing</span></div>
+<div class="line"><a name="l03140"></a><span class="lineno"> 3140</span>       <span class="comment">// a particular member would be ambiguous. For example, given</span></div>
+<div class="line"><a name="l03141"></a><span class="lineno"> 3141</span>       <span class="comment">//</span></div>
+<div class="line"><a name="l03142"></a><span class="lineno"> 3142</span>       <span class="comment">//   struct A { int member; };</span></div>
+<div class="line"><a name="l03143"></a><span class="lineno"> 3143</span>       <span class="comment">//   struct B { int member; };</span></div>
+<div class="line"><a name="l03144"></a><span class="lineno"> 3144</span>       <span class="comment">//   struct C : A, B { };</span></div>
+<div class="line"><a name="l03145"></a><span class="lineno"> 3145</span>       <span class="comment">//</span></div>
+<div class="line"><a name="l03146"></a><span class="lineno"> 3146</span>       <span class="comment">//   void f(C *c) { c->### }</span></div>
+<div class="line"><a name="l03147"></a><span class="lineno"> 3147</span>       <span class="comment">//</span></div>
+<div class="line"><a name="l03148"></a><span class="lineno"> 3148</span>       <span class="comment">// accessing 'member' would result in an ambiguity. However, we</span></div>
+<div class="line"><a name="l03149"></a><span class="lineno"> 3149</span>       <span class="comment">// could be smart enough to qualify the member with the base</span></div>
+<div class="line"><a name="l03150"></a><span class="lineno"> 3150</span>       <span class="comment">// class, e.g.,</span></div>
+<div class="line"><a name="l03151"></a><span class="lineno"> 3151</span>       <span class="comment">//</span></div>
+<div class="line"><a name="l03152"></a><span class="lineno"> 3152</span>       <span class="comment">//   c->B::member</span></div>
+<div class="line"><a name="l03153"></a><span class="lineno"> 3153</span>       <span class="comment">//</span></div>
+<div class="line"><a name="l03154"></a><span class="lineno"> 3154</span>       <span class="comment">// or</span></div>
+<div class="line"><a name="l03155"></a><span class="lineno"> 3155</span>       <span class="comment">//</span></div>
+<div class="line"><a name="l03156"></a><span class="lineno"> 3156</span>       <span class="comment">//   c->A::member</span></div>
+<div class="line"><a name="l03157"></a><span class="lineno"> 3157</span> </div>
+<div class="line"><a name="l03158"></a><span class="lineno"> 3158</span>       <span class="comment">// Find results in this base class (and its bases).</span></div>
+<div class="line"><a name="l03159"></a><span class="lineno"> 3159</span>       ShadowContextRAII Shadow(Visited);</div>
+<div class="line"><a name="l03160"></a><span class="lineno"> 3160</span>       <a class="code" href="SemaLookup_8cpp.html#a5f870ddac6aadf46816fdb72e1c26fd3">LookupVisibleDecls</a>(Record-><a class="code" href="classclang_1_1RecordType.html#a312ab3ebe179cc7d8692c07479c91076">getDecl</a>(), Result, QualifiedNameLookup,</div>
+<div class="line"><a name="l03161"></a><span class="lineno"> 3161</span>                          <span class="keyword">true</span>, Consumer, Visited);</div>
+<div class="line"><a name="l03162"></a><span class="lineno"> 3162</span>     }</div>
+<div class="line"><a name="l03163"></a><span class="lineno"> 3163</span>   }</div>
+<div class="line"><a name="l03164"></a><span class="lineno"> 3164</span> </div>
+<div class="line"><a name="l03165"></a><span class="lineno"> 3165</span>   <span class="comment">// Traverse the contexts of Objective-C classes.</span></div>
+<div class="line"><a name="l03166"></a><span class="lineno"> 3166</span>   <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1ObjCInterfaceDecl.html" title="Represents an ObjC class declaration.">ObjCInterfaceDecl</a> *IFace = dyn_cast<ObjCInterfaceDecl>(Ctx)) {</div>
+<div class="line"><a name="l03167"></a><span class="lineno"> 3167</span>     <span class="comment">// Traverse categories.</span></div>
+<div class="line"><a name="l03168"></a><span class="lineno"> 3168</span>     <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1ObjCInterfaceDecl_1_1filtered__category__iterator.html" title="Iterator that walks over the list of categories, filtering out those that do not meet specific criter...">ObjCInterfaceDecl::visible_categories_iterator</a></div>
+<div class="line"><a name="l03169"></a><span class="lineno"> 3169</span>            Cat = IFace->visible_categories_begin(),</div>
+<div class="line"><a name="l03170"></a><span class="lineno"> 3170</span>            CatEnd = IFace->visible_categories_end();</div>
+<div class="line"><a name="l03171"></a><span class="lineno"> 3171</span>          Cat != CatEnd; ++Cat) {</div>
+<div class="line"><a name="l03172"></a><span class="lineno"> 3172</span>       ShadowContextRAII Shadow(Visited);</div>
+<div class="line"><a name="l03173"></a><span class="lineno"> 3173</span>       <a class="code" href="SemaLookup_8cpp.html#a5f870ddac6aadf46816fdb72e1c26fd3">LookupVisibleDecls</a>(*Cat, Result, QualifiedNameLookup, <span class="keyword">false</span>,</div>
+<div class="line"><a name="l03174"></a><span class="lineno"> 3174</span>                          Consumer, Visited);</div>
+<div class="line"><a name="l03175"></a><span class="lineno"> 3175</span>     }</div>
+<div class="line"><a name="l03176"></a><span class="lineno"> 3176</span> </div>
+<div class="line"><a name="l03177"></a><span class="lineno"> 3177</span>     <span class="comment">// Traverse protocols.</span></div>
+<div class="line"><a name="l03178"></a><span class="lineno"> 3178</span>     <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1ObjCInterfaceDecl.html#a9da2d6646fb8c8dd1793f81688b6c0f0">ObjCInterfaceDecl::all_protocol_iterator</a></div>
+<div class="line"><a name="l03179"></a><span class="lineno"> 3179</span>          I = IFace->all_referenced_protocol_begin(),</div>
+<div class="line"><a name="l03180"></a><span class="lineno"> 3180</span>          E = IFace->all_referenced_protocol_end(); I != E; ++I) {</div>
+<div class="line"><a name="l03181"></a><span class="lineno"> 3181</span>       ShadowContextRAII Shadow(Visited);</div>
+<div class="line"><a name="l03182"></a><span class="lineno"> 3182</span>       <a class="code" href="SemaLookup_8cpp.html#a5f870ddac6aadf46816fdb72e1c26fd3">LookupVisibleDecls</a>(*I, Result, QualifiedNameLookup, <span class="keyword">false</span>, Consumer,</div>
+<div class="line"><a name="l03183"></a><span class="lineno"> 3183</span>                          Visited);</div>
+<div class="line"><a name="l03184"></a><span class="lineno"> 3184</span>     }</div>
+<div class="line"><a name="l03185"></a><span class="lineno"> 3185</span> </div>
+<div class="line"><a name="l03186"></a><span class="lineno"> 3186</span>     <span class="comment">// Traverse the superclass.</span></div>
+<div class="line"><a name="l03187"></a><span class="lineno"> 3187</span>     <span class="keywordflow">if</span> (IFace->getSuperClass()) {</div>
+<div class="line"><a name="l03188"></a><span class="lineno"> 3188</span>       ShadowContextRAII Shadow(Visited);</div>
+<div class="line"><a name="l03189"></a><span class="lineno"> 3189</span>       <a class="code" href="SemaLookup_8cpp.html#a5f870ddac6aadf46816fdb72e1c26fd3">LookupVisibleDecls</a>(IFace->getSuperClass(), Result, QualifiedNameLookup,</div>
+<div class="line"><a name="l03190"></a><span class="lineno"> 3190</span>                          <span class="keyword">true</span>, Consumer, Visited);</div>
+<div class="line"><a name="l03191"></a><span class="lineno"> 3191</span>     }</div>
+<div class="line"><a name="l03192"></a><span class="lineno"> 3192</span> </div>
+<div class="line"><a name="l03193"></a><span class="lineno"> 3193</span>     <span class="comment">// If there is an implementation, traverse it. We do this to find</span></div>
+<div class="line"><a name="l03194"></a><span class="lineno"> 3194</span>     <span class="comment">// synthesized ivars.</span></div>
+<div class="line"><a name="l03195"></a><span class="lineno"> 3195</span>     <span class="keywordflow">if</span> (IFace->getImplementation()) {</div>
+<div class="line"><a name="l03196"></a><span class="lineno"> 3196</span>       ShadowContextRAII Shadow(Visited);</div>
+<div class="line"><a name="l03197"></a><span class="lineno"> 3197</span>       <a class="code" href="SemaLookup_8cpp.html#a5f870ddac6aadf46816fdb72e1c26fd3">LookupVisibleDecls</a>(IFace->getImplementation(), Result,</div>
+<div class="line"><a name="l03198"></a><span class="lineno"> 3198</span>                          QualifiedNameLookup, InBaseClass, Consumer, Visited);</div>
+<div class="line"><a name="l03199"></a><span class="lineno"> 3199</span>     }</div>
+<div class="line"><a name="l03200"></a><span class="lineno"> 3200</span>   } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1ObjCProtocolDecl.html" title="Represents an Objective-C protocol declaration.">ObjCProtocolDecl</a> *Protocol = dyn_cast<ObjCProtocolDecl>(Ctx)) {</div>
+<div class="line"><a name="l03201"></a><span class="lineno"> 3201</span>     <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1ObjCProtocolDecl.html#adbd4b44a478f573a24072123f93b2fe9">ObjCProtocolDecl::protocol_iterator</a> I = Protocol->protocol_begin(),</div>
+<div class="line"><a name="l03202"></a><span class="lineno"> 3202</span>            E = Protocol->protocol_end(); I != E; ++I) {</div>
+<div class="line"><a name="l03203"></a><span class="lineno"> 3203</span>       ShadowContextRAII Shadow(Visited);</div>
+<div class="line"><a name="l03204"></a><span class="lineno"> 3204</span>       <a class="code" href="SemaLookup_8cpp.html#a5f870ddac6aadf46816fdb72e1c26fd3">LookupVisibleDecls</a>(*I, Result, QualifiedNameLookup, <span class="keyword">false</span>, Consumer,</div>
+<div class="line"><a name="l03205"></a><span class="lineno"> 3205</span>                          Visited);</div>
+<div class="line"><a name="l03206"></a><span class="lineno"> 3206</span>     }</div>
+<div class="line"><a name="l03207"></a><span class="lineno"> 3207</span>   } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1ObjCCategoryDecl.html">ObjCCategoryDecl</a> *Category = dyn_cast<ObjCCategoryDecl>(Ctx)) {</div>
+<div class="line"><a name="l03208"></a><span class="lineno"> 3208</span>     <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1ObjCCategoryDecl.html#a2838849e5805ca4bce587a4d9c68acb8">ObjCCategoryDecl::protocol_iterator</a> I = Category->protocol_begin(),</div>
+<div class="line"><a name="l03209"></a><span class="lineno"> 3209</span>            E = Category->protocol_end(); I != E; ++I) {</div>
+<div class="line"><a name="l03210"></a><span class="lineno"> 3210</span>       ShadowContextRAII Shadow(Visited);</div>
+<div class="line"><a name="l03211"></a><span class="lineno"> 3211</span>       <a class="code" href="SemaLookup_8cpp.html#a5f870ddac6aadf46816fdb72e1c26fd3">LookupVisibleDecls</a>(*I, Result, QualifiedNameLookup, <span class="keyword">false</span>, Consumer,</div>
+<div class="line"><a name="l03212"></a><span class="lineno"> 3212</span>                          Visited);</div>
+<div class="line"><a name="l03213"></a><span class="lineno"> 3213</span>     }</div>
+<div class="line"><a name="l03214"></a><span class="lineno"> 3214</span> </div>
+<div class="line"><a name="l03215"></a><span class="lineno"> 3215</span>     <span class="comment">// If there is an implementation, traverse it.</span></div>
+<div class="line"><a name="l03216"></a><span class="lineno"> 3216</span>     <span class="keywordflow">if</span> (Category->getImplementation()) {</div>
+<div class="line"><a name="l03217"></a><span class="lineno"> 3217</span>       ShadowContextRAII Shadow(Visited);</div>
+<div class="line"><a name="l03218"></a><span class="lineno"> 3218</span>       <a class="code" href="SemaLookup_8cpp.html#a5f870ddac6aadf46816fdb72e1c26fd3">LookupVisibleDecls</a>(Category->getImplementation(), Result,</div>
+<div class="line"><a name="l03219"></a><span class="lineno"> 3219</span>                          QualifiedNameLookup, <span class="keyword">true</span>, Consumer, Visited);</div>
+<div class="line"><a name="l03220"></a><span class="lineno"> 3220</span>     }</div>
+<div class="line"><a name="l03221"></a><span class="lineno"> 3221</span>   }</div>
+<div class="line"><a name="l03222"></a><span class="lineno"> 3222</span> }</div>
+<div class="line"><a name="l03223"></a><span class="lineno"> 3223</span> </div>
+<div class="line"><a name="l03224"></a><span class="lineno"><a class="code" href="SemaLookup_8cpp.html#aa63d657fad80410b38f346cc08acecbb"> 3224</a></span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="SemaLookup_8cpp.html#a5f870ddac6aadf46816fdb72e1c26fd3">LookupVisibleDecls</a>(<a class="code" href="classclang_1_1Scope.html">Scope</a> *S, <a class="code" href="classclang_1_1LookupResult.html" title="Represents the results of name lookup.">LookupResult</a> &Result,</div>
+<div class="line"><a name="l03225"></a><span class="lineno"> 3225</span>                                UnqualUsingDirectiveSet &UDirs,</div>
+<div class="line"><a name="l03226"></a><span class="lineno"> 3226</span>                                <a class="code" href="classclang_1_1VisibleDeclConsumer.html" title="Consumes visible declarations found when searching for all visible names within a given scope or cont...">VisibleDeclConsumer</a> &Consumer,</div>
+<div class="line"><a name="l03227"></a><span class="lineno"> 3227</span>                                VisibleDeclsRecord &Visited) {</div>
+<div class="line"><a name="l03228"></a><span class="lineno"> 3228</span>   <span class="keywordflow">if</span> (!S)</div>
+<div class="line"><a name="l03229"></a><span class="lineno"> 3229</span>     <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l03230"></a><span class="lineno"> 3230</span> </div>
+<div class="line"><a name="l03231"></a><span class="lineno"> 3231</span>   <span class="keywordflow">if</span> (!S-><a class="code" href="classclang_1_1Scope.html#a0ddcbbc7cb53f7b1f407ef68696b8d37">getEntity</a>() ||</div>
+<div class="line"><a name="l03232"></a><span class="lineno"> 3232</span>       (!S-><a class="code" href="classclang_1_1Scope.html#a41a39e012b966ffcb2f05d41f4bdbb4b">getParent</a>() &&</div>
+<div class="line"><a name="l03233"></a><span class="lineno"> 3233</span>        !Visited.alreadyVisitedContext(S-><a class="code" href="classclang_1_1Scope.html#a0ddcbbc7cb53f7b1f407ef68696b8d37">getEntity</a>())) ||</div>
+<div class="line"><a name="l03234"></a><span class="lineno"> 3234</span>       (S-><a class="code" href="classclang_1_1Scope.html#a0ddcbbc7cb53f7b1f407ef68696b8d37">getEntity</a>())-><a class="code" href="SemaDeclAttr_8cpp.html#a5b0f71fd207798cf4d3d54a89b89b20f">isFunctionOrMethod</a>()) {</div>
+<div class="line"><a name="l03235"></a><span class="lineno"> 3235</span>     FindLocalExternScope FindLocals(Result);</div>
+<div class="line"><a name="l03236"></a><span class="lineno"> 3236</span>     <span class="comment">// Walk through the declarations in this Scope.</span></div>
+<div class="line"><a name="l03237"></a><span class="lineno"> 3237</span>     <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1Scope.html#a5230621792f95deeb19d19479edced00">Scope::decl_iterator</a> D = S-><a class="code" href="classclang_1_1Scope.html#a9b5e95964496b345ea3c439e6904eeff">decl_begin</a>(), DEnd = S-><a class="code" href="classclang_1_1Scope.html#aba38f590f6d1f81297b2ca0693ed1664">decl_end</a>();</div>
+<div class="line"><a name="l03238"></a><span class="lineno"> 3238</span>          D != DEnd; ++D) {</div>
+<div class="line"><a name="l03239"></a><span class="lineno"> 3239</span>       <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *ND = dyn_cast<NamedDecl>(*D))</div>
+<div class="line"><a name="l03240"></a><span class="lineno"> 3240</span>         <span class="keywordflow">if</span> ((ND = Result.<a class="code" href="classclang_1_1LookupResult.html#aaa70a0b9fc7600f4077789afeee34f63" title="Retrieve the accepted (re)declaration of the given declaration, if there is one.">getAcceptableDecl</a>(ND))) {</div>
+<div class="line"><a name="l03241"></a><span class="lineno"> 3241</span>           Consumer.<a class="code" href="classclang_1_1VisibleDeclConsumer.html#a3e33c22b58be42ce311e2db3da14b023" title="Invoked each time Sema::LookupVisibleDecls() finds a declaration visible from the current scope or co...">FoundDecl</a>(ND, Visited.checkHidden(ND), 0, <span class="keyword">false</span>);</div>
+<div class="line"><a name="l03242"></a><span class="lineno"> 3242</span>           Visited.add(ND);</div>
+<div class="line"><a name="l03243"></a><span class="lineno"> 3243</span>         }</div>
+<div class="line"><a name="l03244"></a><span class="lineno"> 3244</span>     }</div>
+<div class="line"><a name="l03245"></a><span class="lineno"> 3245</span>   }</div>
+<div class="line"><a name="l03246"></a><span class="lineno"> 3246</span> </div>
+<div class="line"><a name="l03247"></a><span class="lineno"> 3247</span>   <span class="comment">// FIXME: C++ [temp.local]p8</span></div>
+<div class="line"><a name="l03248"></a><span class="lineno"> 3248</span>   <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *Entity = 0;</div>
+<div class="line"><a name="l03249"></a><span class="lineno"> 3249</span>   <span class="keywordflow">if</span> (S-><a class="code" href="classclang_1_1Scope.html#a0ddcbbc7cb53f7b1f407ef68696b8d37">getEntity</a>()) {</div>
+<div class="line"><a name="l03250"></a><span class="lineno"> 3250</span>     <span class="comment">// Look into this scope's declaration context, along with any of its</span></div>
+<div class="line"><a name="l03251"></a><span class="lineno"> 3251</span>     <span class="comment">// parent lookup contexts (e.g., enclosing classes), up to the point</span></div>
+<div class="line"><a name="l03252"></a><span class="lineno"> 3252</span>     <span class="comment">// where we hit the context stored in the next outer scope.</span></div>
+<div class="line"><a name="l03253"></a><span class="lineno"> 3253</span>     Entity = S-><a class="code" href="classclang_1_1Scope.html#a0ddcbbc7cb53f7b1f407ef68696b8d37">getEntity</a>();</div>
+<div class="line"><a name="l03254"></a><span class="lineno"> 3254</span>     <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *OuterCtx = <a class="code" href="SemaLookup_8cpp.html#a50e6e1b149e77014c7011c0352501fc8">findOuterContext</a>(S).first; <span class="comment">// FIXME</span></div>
+<div class="line"><a name="l03255"></a><span class="lineno"> 3255</span> </div>
+<div class="line"><a name="l03256"></a><span class="lineno"> 3256</span>     <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *Ctx = Entity; Ctx && !Ctx-><a class="code" href="classclang_1_1DeclContext.html#ab26c189165e15c46df7e4c734da0b0b8" title="Determine whether this declaration context is equivalent to the declaration context DC...">Equals</a>(OuterCtx);</div>
+<div class="line"><a name="l03257"></a><span class="lineno"> 3257</span>          Ctx = Ctx-><a class="code" href="classclang_1_1DeclContext.html#ad3f371a23f2b8f92275ef63817701e4e" title="Find the parent context of this context that will be used for unqualified name lookup.">getLookupParent</a>()) {</div>
+<div class="line"><a name="l03258"></a><span class="lineno"> 3258</span>       <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1ObjCMethodDecl.html">ObjCMethodDecl</a> *Method = dyn_cast<ObjCMethodDecl>(Ctx)) {</div>
+<div class="line"><a name="l03259"></a><span class="lineno"> 3259</span>         <span class="keywordflow">if</span> (Method->isInstanceMethod()) {</div>
+<div class="line"><a name="l03260"></a><span class="lineno"> 3260</span>           <span class="comment">// For instance methods, look for ivars in the method's interface.</span></div>
+<div class="line"><a name="l03261"></a><span class="lineno"> 3261</span>           <a class="code" href="classclang_1_1LookupResult.html" title="Represents the results of name lookup.">LookupResult</a> IvarResult(Result.<a class="code" href="classclang_1_1LookupResult.html#a9a66340b9004f3dfbd4a8048cf991d42" title="Get the Sema object that this lookup result is searching with.">getSema</a>(), Result.<a class="code" href="classclang_1_1LookupResult.html#a3dd82d154e991b574d70a6a5aba8c61b" title="Gets the name to look up.">getLookupName</a>(),</div>
+<div class="line"><a name="l03262"></a><span class="lineno"> 3262</span>                                   Result.<a class="code" href="classclang_1_1LookupResult.html#af980e0b636ede7d9e0018dff05b0d269">getNameLoc</a>(), <a class="code" href="classclang_1_1Sema.html#a0c6e994c44767e74e2892aa0235efb1aa93f2be273881a14dc35b733bc8653dbc">Sema::LookupMemberName</a>);</div>
+<div class="line"><a name="l03263"></a><span class="lineno"> 3263</span>           <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1ObjCInterfaceDecl.html" title="Represents an ObjC class declaration.">ObjCInterfaceDecl</a> *IFace = Method->getClassInterface()) {</div>
+<div class="line"><a name="l03264"></a><span class="lineno"> 3264</span>             <a class="code" href="SemaLookup_8cpp.html#a5f870ddac6aadf46816fdb72e1c26fd3">LookupVisibleDecls</a>(IFace, IvarResult, <span class="comment">/*QualifiedNameLookup=*/</span><span class="keyword">false</span>,</div>
+<div class="line"><a name="l03265"></a><span class="lineno"> 3265</span>                                <span class="comment">/*InBaseClass=*/</span><span class="keyword">false</span>, Consumer, Visited);</div>
+<div class="line"><a name="l03266"></a><span class="lineno"> 3266</span>           }</div>
+<div class="line"><a name="l03267"></a><span class="lineno"> 3267</span>         }</div>
+<div class="line"><a name="l03268"></a><span class="lineno"> 3268</span> </div>
+<div class="line"><a name="l03269"></a><span class="lineno"> 3269</span>         <span class="comment">// We've already performed all of the name lookup that we need</span></div>
+<div class="line"><a name="l03270"></a><span class="lineno"> 3270</span>         <span class="comment">// to for Objective-C methods; the next context will be the</span></div>
+<div class="line"><a name="l03271"></a><span class="lineno"> 3271</span>         <span class="comment">// outer scope.</span></div>
+<div class="line"><a name="l03272"></a><span class="lineno"> 3272</span>         <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l03273"></a><span class="lineno"> 3273</span>       }</div>
+<div class="line"><a name="l03274"></a><span class="lineno"> 3274</span> </div>
+<div class="line"><a name="l03275"></a><span class="lineno"> 3275</span>       <span class="keywordflow">if</span> (Ctx-><a class="code" href="classclang_1_1DeclContext.html#a05b966b6459e1d11c317f8abe3e2d66f">isFunctionOrMethod</a>())</div>
+<div class="line"><a name="l03276"></a><span class="lineno"> 3276</span>         <span class="keywordflow">continue</span>;</div>
+<div class="line"><a name="l03277"></a><span class="lineno"> 3277</span> </div>
+<div class="line"><a name="l03278"></a><span class="lineno"> 3278</span>       <a class="code" href="SemaLookup_8cpp.html#a5f870ddac6aadf46816fdb72e1c26fd3">LookupVisibleDecls</a>(Ctx, Result, <span class="comment">/*QualifiedNameLookup=*/</span><span class="keyword">false</span>,</div>
+<div class="line"><a name="l03279"></a><span class="lineno"> 3279</span>                          <span class="comment">/*InBaseClass=*/</span><span class="keyword">false</span>, Consumer, Visited);</div>
+<div class="line"><a name="l03280"></a><span class="lineno"> 3280</span>     }</div>
+<div class="line"><a name="l03281"></a><span class="lineno"> 3281</span>   } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (!S-><a class="code" href="classclang_1_1Scope.html#a41a39e012b966ffcb2f05d41f4bdbb4b">getParent</a>()) {</div>
+<div class="line"><a name="l03282"></a><span class="lineno"> 3282</span>     <span class="comment">// Look into the translation unit scope. We walk through the translation</span></div>
+<div class="line"><a name="l03283"></a><span class="lineno"> 3283</span>     <span class="comment">// unit's declaration context, because the Scope itself won't have all of</span></div>
+<div class="line"><a name="l03284"></a><span class="lineno"> 3284</span>     <span class="comment">// the declarations if we loaded a precompiled header.</span></div>
+<div class="line"><a name="l03285"></a><span class="lineno"> 3285</span>     <span class="comment">// FIXME: We would like the translation unit's Scope object to point to the</span></div>
+<div class="line"><a name="l03286"></a><span class="lineno"> 3286</span>     <span class="comment">// translation unit, so we don't need this special "if" branch. However,</span></div>
+<div class="line"><a name="l03287"></a><span class="lineno"> 3287</span>     <span class="comment">// doing so would force the normal C++ name-lookup code to look into the</span></div>
+<div class="line"><a name="l03288"></a><span class="lineno"> 3288</span>     <span class="comment">// translation unit decl when the IdentifierInfo chains would suffice.</span></div>
+<div class="line"><a name="l03289"></a><span class="lineno"> 3289</span>     <span class="comment">// Once we fix that problem (which is part of a more general "don't look</span></div>
+<div class="line"><a name="l03290"></a><span class="lineno"> 3290</span>     <span class="comment">// in DeclContexts unless we have to" optimization), we can eliminate this.</span></div>
+<div class="line"><a name="l03291"></a><span class="lineno"> 3291</span>     Entity = Result.<a class="code" href="classclang_1_1LookupResult.html#a9a66340b9004f3dfbd4a8048cf991d42" title="Get the Sema object that this lookup result is searching with.">getSema</a>().<a class="code" href="classclang_1_1Sema.html#a3ccddacb1f4f71b084296175cc9e5b0e">Context</a>.<a class="code" href="classclang_1_1ASTContext.html#abd909fb01ef10cfd0244832a67b1dd64">getTranslationUnitDecl</a>();</div>
+<div class="line"><a name="l03292"></a><span class="lineno"> 3292</span>     <a class="code" href="SemaLookup_8cpp.html#a5f870ddac6aadf46816fdb72e1c26fd3">LookupVisibleDecls</a>(Entity, Result, <span class="comment">/*QualifiedNameLookup=*/</span><span class="keyword">false</span>,</div>
+<div class="line"><a name="l03293"></a><span class="lineno"> 3293</span>                        <span class="comment">/*InBaseClass=*/</span><span class="keyword">false</span>, Consumer, Visited);</div>
+<div class="line"><a name="l03294"></a><span class="lineno"> 3294</span>   }</div>
+<div class="line"><a name="l03295"></a><span class="lineno"> 3295</span> </div>
+<div class="line"><a name="l03296"></a><span class="lineno"> 3296</span>   <span class="keywordflow">if</span> (Entity) {</div>
+<div class="line"><a name="l03297"></a><span class="lineno"> 3297</span>     <span class="comment">// Lookup visible declarations in any namespaces found by using</span></div>
+<div class="line"><a name="l03298"></a><span class="lineno"> 3298</span>     <span class="comment">// directives.</span></div>
+<div class="line"><a name="l03299"></a><span class="lineno"> 3299</span>     UnqualUsingDirectiveSet::const_iterator UI, UEnd;</div>
+<div class="line"><a name="l03300"></a><span class="lineno"> 3300</span>     llvm::tie(UI, UEnd) = UDirs.getNamespacesFor(Entity);</div>
+<div class="line"><a name="l03301"></a><span class="lineno"> 3301</span>     <span class="keywordflow">for</span> (; UI != UEnd; ++UI)</div>
+<div class="line"><a name="l03302"></a><span class="lineno"> 3302</span>       <a class="code" href="SemaLookup_8cpp.html#a5f870ddac6aadf46816fdb72e1c26fd3">LookupVisibleDecls</a>(const_cast<DeclContext *>(UI->getNominatedNamespace()),</div>
+<div class="line"><a name="l03303"></a><span class="lineno"> 3303</span>                          Result, <span class="comment">/*QualifiedNameLookup=*/</span><span class="keyword">false</span>,</div>
+<div class="line"><a name="l03304"></a><span class="lineno"> 3304</span>                          <span class="comment">/*InBaseClass=*/</span><span class="keyword">false</span>, Consumer, Visited);</div>
+<div class="line"><a name="l03305"></a><span class="lineno"> 3305</span>   }</div>
+<div class="line"><a name="l03306"></a><span class="lineno"> 3306</span> </div>
+<div class="line"><a name="l03307"></a><span class="lineno"> 3307</span>   <span class="comment">// Lookup names in the parent scope.</span></div>
+<div class="line"><a name="l03308"></a><span class="lineno"> 3308</span>   ShadowContextRAII Shadow(Visited);</div>
+<div class="line"><a name="l03309"></a><span class="lineno"> 3309</span>   <a class="code" href="SemaLookup_8cpp.html#a5f870ddac6aadf46816fdb72e1c26fd3">LookupVisibleDecls</a>(S-><a class="code" href="classclang_1_1Scope.html#a41a39e012b966ffcb2f05d41f4bdbb4b">getParent</a>(), Result, UDirs, Consumer, Visited);</div>
+<div class="line"><a name="l03310"></a><span class="lineno"> 3310</span> }</div>
+<div class="line"><a name="l03311"></a><span class="lineno"> 3311</span> </div>
+<div class="line"><a name="l03312"></a><span class="lineno"><a class="code" href="classclang_1_1Sema.html#a86d9284906bea5495c8cd387fa7a9566"> 3312</a></span> <span class="keywordtype">void</span> <a class="code" href="classclang_1_1Sema.html#a86d9284906bea5495c8cd387fa7a9566">Sema::LookupVisibleDecls</a>(<a class="code" href="classclang_1_1Scope.html">Scope</a> *S, <a class="code" href="classclang_1_1Sema.html#a0c6e994c44767e74e2892aa0235efb1a" title="Describes the kind of name lookup to perform.">LookupNameKind</a> <a class="code" href="ChrootChecker_8cpp.html#aa10c9e8951b8ccf714a59ec321bdac5b">Kind</a>,</div>
+<div class="line"><a name="l03313"></a><span class="lineno"> 3313</span>                               <a class="code" href="classclang_1_1VisibleDeclConsumer.html" title="Consumes visible declarations found when searching for all visible names within a given scope or cont...">VisibleDeclConsumer</a> &Consumer,</div>
+<div class="line"><a name="l03314"></a><span class="lineno"> 3314</span>                               <span class="keywordtype">bool</span> IncludeGlobalScope) {</div>
+<div class="line"><a name="l03315"></a><span class="lineno"> 3315</span>   <span class="comment">// Determine the set of using directives available during</span></div>
+<div class="line"><a name="l03316"></a><span class="lineno"> 3316</span>   <span class="comment">// unqualified name lookup.</span></div>
+<div class="line"><a name="l03317"></a><span class="lineno"> 3317</span>   <a class="code" href="classclang_1_1Scope.html">Scope</a> *Initial = <a class="code" href="AnalysisBasedWarnings_8cpp.html#a33dc45a03958a0bf07b5da2dec4db648">S</a>;</div>
+<div class="line"><a name="l03318"></a><span class="lineno"> 3318</span>   UnqualUsingDirectiveSet UDirs;</div>
+<div class="line"><a name="l03319"></a><span class="lineno"> 3319</span>   <span class="keywordflow">if</span> (getLangOpts().<a class="code" href="namespaceclang_1_1frontend.html#a09dfa01c4e997a3794d80922c5e853bbaf89a7ac6211aecefb5f7ecc17d3ebed4">CPlusPlus</a>) {</div>
+<div class="line"><a name="l03320"></a><span class="lineno"> 3320</span>     <span class="comment">// Find the first namespace or translation-unit scope.</span></div>
+<div class="line"><a name="l03321"></a><span class="lineno"> 3321</span>     <span class="keywordflow">while</span> (S && !<a class="code" href="SemaLookup_8cpp.html#a65d38506c270453f91a02a15477f8f0b">isNamespaceOrTranslationUnitScope</a>(S))</div>
+<div class="line"><a name="l03322"></a><span class="lineno"> 3322</span>       S = S-><a class="code" href="classclang_1_1Scope.html#a41a39e012b966ffcb2f05d41f4bdbb4b">getParent</a>();</div>
+<div class="line"><a name="l03323"></a><span class="lineno"> 3323</span> </div>
+<div class="line"><a name="l03324"></a><span class="lineno"> 3324</span>     UDirs.visitScopeChain(Initial, S);</div>
+<div class="line"><a name="l03325"></a><span class="lineno"> 3325</span>   }</div>
+<div class="line"><a name="l03326"></a><span class="lineno"> 3326</span>   UDirs.done();</div>
+<div class="line"><a name="l03327"></a><span class="lineno"> 3327</span> </div>
+<div class="line"><a name="l03328"></a><span class="lineno"> 3328</span>   <span class="comment">// Look for visible declarations.</span></div>
+<div class="line"><a name="l03329"></a><span class="lineno"> 3329</span>   <a class="code" href="classclang_1_1LookupResult.html" title="Represents the results of name lookup.">LookupResult</a> Result(*<span class="keyword">this</span>, <a class="code" href="classclang_1_1DeclarationName.html">DeclarationName</a>(), <a class="code" href="classclang_1_1SourceLocation.html" title="Encodes a location in the source. The SourceManager can decode this to get at the full include stack...">SourceLocation</a>(), Kind);</div>
+<div class="line"><a name="l03330"></a><span class="lineno"> 3330</span>   Result.<a class="code" href="classclang_1_1LookupResult.html#a4fc9b1c1e6597216a476daba6be00218" title="Specify whether hidden declarations are visible, e.g., for recovery reasons.">setAllowHidden</a>(Consumer.<a class="code" href="classclang_1_1VisibleDeclConsumer.html#a21d36539fa6518de53951678d2d81c69" title="Determine whether hidden declarations (from unimported modules) should be given to this consumer...">includeHiddenDecls</a>());</div>
+<div class="line"><a name="l03331"></a><span class="lineno"> 3331</span>   VisibleDeclsRecord Visited;</div>
+<div class="line"><a name="l03332"></a><span class="lineno"> 3332</span>   <span class="keywordflow">if</span> (!IncludeGlobalScope)</div>
+<div class="line"><a name="l03333"></a><span class="lineno"> 3333</span>     Visited.visitedContext(<a class="code" href="ASTMatchFinder_8cpp.html#a779280869b9fac47a9bc391e7709171f">Context</a>.<a class="code" href="classclang_1_1ASTContext.html#abd909fb01ef10cfd0244832a67b1dd64">getTranslationUnitDecl</a>());</div>
+<div class="line"><a name="l03334"></a><span class="lineno"> 3334</span>   ShadowContextRAII Shadow(Visited);</div>
+<div class="line"><a name="l03335"></a><span class="lineno"> 3335</span>   <a class="code" href="SemaLookup_8cpp.html#a5f870ddac6aadf46816fdb72e1c26fd3">::LookupVisibleDecls</a>(Initial, Result, UDirs, Consumer, Visited);</div>
+<div class="line"><a name="l03336"></a><span class="lineno"> 3336</span> }</div>
+<div class="line"><a name="l03337"></a><span class="lineno"> 3337</span> </div>
+<div class="line"><a name="l03338"></a><span class="lineno"><a class="code" href="classclang_1_1Sema.html#a458a1f2da974a9612d9af4bd38096cad"> 3338</a></span> <span class="keywordtype">void</span> <a class="code" href="classclang_1_1Sema.html#a86d9284906bea5495c8cd387fa7a9566">Sema::LookupVisibleDecls</a>(<a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *Ctx, <a class="code" href="classclang_1_1Sema.html#a0c6e994c44767e74e2892aa0235efb1a" title="Describes the kind of name lookup to perform.">LookupNameKind</a> <a class="code" href="ChrootChecker_8cpp.html#aa10c9e8951b8ccf714a59ec321bdac5b">Kind</a>,</div>
+<div class="line"><a name="l03339"></a><span class="lineno"> 3339</span>                               <a class="code" href="classclang_1_1VisibleDeclConsumer.html" title="Consumes visible declarations found when searching for all visible names within a given scope or cont...">VisibleDeclConsumer</a> &Consumer,</div>
+<div class="line"><a name="l03340"></a><span class="lineno"> 3340</span>                               <span class="keywordtype">bool</span> IncludeGlobalScope) {</div>
+<div class="line"><a name="l03341"></a><span class="lineno"> 3341</span>   <a class="code" href="classclang_1_1LookupResult.html" title="Represents the results of name lookup.">LookupResult</a> Result(*<span class="keyword">this</span>, <a class="code" href="classclang_1_1DeclarationName.html">DeclarationName</a>(), <a class="code" href="classclang_1_1SourceLocation.html" title="Encodes a location in the source. The SourceManager can decode this to get at the full include stack...">SourceLocation</a>(), Kind);</div>
+<div class="line"><a name="l03342"></a><span class="lineno"> 3342</span>   Result.<a class="code" href="classclang_1_1LookupResult.html#a4fc9b1c1e6597216a476daba6be00218" title="Specify whether hidden declarations are visible, e.g., for recovery reasons.">setAllowHidden</a>(Consumer.<a class="code" href="classclang_1_1VisibleDeclConsumer.html#a21d36539fa6518de53951678d2d81c69" title="Determine whether hidden declarations (from unimported modules) should be given to this consumer...">includeHiddenDecls</a>());</div>
+<div class="line"><a name="l03343"></a><span class="lineno"> 3343</span>   VisibleDeclsRecord Visited;</div>
+<div class="line"><a name="l03344"></a><span class="lineno"> 3344</span>   <span class="keywordflow">if</span> (!IncludeGlobalScope)</div>
+<div class="line"><a name="l03345"></a><span class="lineno"> 3345</span>     Visited.visitedContext(<a class="code" href="ASTMatchFinder_8cpp.html#a779280869b9fac47a9bc391e7709171f">Context</a>.<a class="code" href="classclang_1_1ASTContext.html#abd909fb01ef10cfd0244832a67b1dd64">getTranslationUnitDecl</a>());</div>
+<div class="line"><a name="l03346"></a><span class="lineno"> 3346</span>   ShadowContextRAII Shadow(Visited);</div>
+<div class="line"><a name="l03347"></a><span class="lineno"> 3347</span>   <a class="code" href="SemaLookup_8cpp.html#a5f870ddac6aadf46816fdb72e1c26fd3">::LookupVisibleDecls</a>(Ctx, Result, <span class="comment">/*QualifiedNameLookup=*/</span><span class="keyword">true</span>,</div>
+<div class="line"><a name="l03348"></a><span class="lineno"> 3348</span>                        <span class="comment">/*InBaseClass=*/</span><span class="keyword">false</span>, Consumer, Visited);</div>
+<div class="line"><a name="l03349"></a><span class="lineno"> 3349</span> }</div>
+<div class="line"><a name="l03350"></a><span class="lineno"> 3350</span> <span class="comment"></span></div>
+<div class="line"><a name="l03351"></a><span class="lineno"> 3351</span> <span class="comment">/// LookupOrCreateLabel - Do a name lookup of a label with the specified name.</span></div>
+<div class="line"><a name="l03352"></a><span class="lineno"> 3352</span> <span class="comment">/// If GnuLabelLoc is a valid source location, then this is a definition</span></div>
+<div class="line"><a name="l03353"></a><span class="lineno"> 3353</span> <span class="comment">/// of an __label__ label name, otherwise it is a normal label definition</span></div>
+<div class="line"><a name="l03354"></a><span class="lineno"> 3354</span> <span class="comment">/// or use.</span></div>
+<div class="line"><a name="l03355"></a><span class="lineno"><a class="code" href="classclang_1_1Sema.html#aa98c372eee45254a9ad59917ef5d4c2f"> 3355</a></span> <span class="comment"></span><a class="code" href="classclang_1_1LabelDecl.html">LabelDecl</a> *<a class="code" href="classclang_1_1Sema.html#aa98c372eee45254a9ad59917ef5d4c2f">Sema::LookupOrCreateLabel</a>(<a class="code" href="classclang_1_1IdentifierInfo.html">IdentifierInfo</a> *II, <a class="code" href="classclang_1_1SourceLocation.html" title="Encodes a location in the source. The SourceManager can decode this to get at the full include stack...">SourceLocation</a> Loc,</div>
+<div class="line"><a name="l03356"></a><span class="lineno"> 3356</span>                                      <a class="code" href="classclang_1_1SourceLocation.html" title="Encodes a location in the source. The SourceManager can decode this to get at the full include stack...">SourceLocation</a> GnuLabelLoc) {</div>
+<div class="line"><a name="l03357"></a><span class="lineno"> 3357</span>   <span class="comment">// Do a lookup to see if we have a label with this name already.</span></div>
+<div class="line"><a name="l03358"></a><span class="lineno"> 3358</span>   <a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *Res = 0;</div>
+<div class="line"><a name="l03359"></a><span class="lineno"> 3359</span> </div>
+<div class="line"><a name="l03360"></a><span class="lineno"> 3360</span>   <span class="keywordflow">if</span> (GnuLabelLoc.<a class="code" href="classclang_1_1SourceLocation.html#ad504978d83973770506b6ddb1d7b48f9" title="Return true if this is a valid SourceLocation object.">isValid</a>()) {</div>
+<div class="line"><a name="l03361"></a><span class="lineno"> 3361</span>     <span class="comment">// Local label definitions always shadow existing labels.</span></div>
+<div class="line"><a name="l03362"></a><span class="lineno"> 3362</span>     Res = <a class="code" href="classclang_1_1LabelDecl.html#a798d41a13a385858589e8aa7acf81193">LabelDecl::Create</a>(<a class="code" href="ASTMatchFinder_8cpp.html#a779280869b9fac47a9bc391e7709171f">Context</a>, CurContext, Loc, II, GnuLabelLoc);</div>
+<div class="line"><a name="l03363"></a><span class="lineno"> 3363</span>     <a class="code" href="classclang_1_1Scope.html">Scope</a> *S = CurScope;</div>
+<div class="line"><a name="l03364"></a><span class="lineno"> 3364</span>     PushOnScopeChains(Res, S, <span class="keyword">true</span>);</div>
+<div class="line"><a name="l03365"></a><span class="lineno"> 3365</span>     <span class="keywordflow">return</span> cast<LabelDecl>(Res);</div>
+<div class="line"><a name="l03366"></a><span class="lineno"> 3366</span>   }</div>
+<div class="line"><a name="l03367"></a><span class="lineno"> 3367</span> </div>
+<div class="line"><a name="l03368"></a><span class="lineno"> 3368</span>   <span class="comment">// Not a GNU local label.</span></div>
+<div class="line"><a name="l03369"></a><span class="lineno"> 3369</span>   Res = LookupSingleName(CurScope, II, Loc, LookupLabel, NotForRedeclaration);</div>
+<div class="line"><a name="l03370"></a><span class="lineno"> 3370</span>   <span class="comment">// If we found a label, check to see if it is in the same context as us.</span></div>
+<div class="line"><a name="l03371"></a><span class="lineno"> 3371</span>   <span class="comment">// When in a Block, we don't want to reuse a label in an enclosing function.</span></div>
+<div class="line"><a name="l03372"></a><span class="lineno"> 3372</span>   <span class="keywordflow">if</span> (Res && Res-><a class="code" href="classclang_1_1Decl.html#af67e1a1d24dcc51093b95dbcf68d4288">getDeclContext</a>() != CurContext)</div>
+<div class="line"><a name="l03373"></a><span class="lineno"> 3373</span>     Res = 0;</div>
+<div class="line"><a name="l03374"></a><span class="lineno"> 3374</span>   <span class="keywordflow">if</span> (Res == 0) {</div>
+<div class="line"><a name="l03375"></a><span class="lineno"> 3375</span>     <span class="comment">// If not forward referenced or defined already, create the backing decl.</span></div>
+<div class="line"><a name="l03376"></a><span class="lineno"> 3376</span>     Res = <a class="code" href="classclang_1_1LabelDecl.html#a798d41a13a385858589e8aa7acf81193">LabelDecl::Create</a>(<a class="code" href="ASTMatchFinder_8cpp.html#a779280869b9fac47a9bc391e7709171f">Context</a>, CurContext, Loc, II);</div>
+<div class="line"><a name="l03377"></a><span class="lineno"> 3377</span>     <a class="code" href="classclang_1_1Scope.html">Scope</a> *S = CurScope-><a class="code" href="classclang_1_1Scope.html#a9f689f716c89b3c12b187fc4f53d47ac">getFnParent</a>();</div>
+<div class="line"><a name="l03378"></a><span class="lineno"> 3378</span>     assert(S && <span class="stringliteral">"Not in a function?"</span>);</div>
+<div class="line"><a name="l03379"></a><span class="lineno"> 3379</span>     PushOnScopeChains(Res, S, <span class="keyword">true</span>);</div>
+<div class="line"><a name="l03380"></a><span class="lineno"> 3380</span>   }</div>
+<div class="line"><a name="l03381"></a><span class="lineno"> 3381</span>   <span class="keywordflow">return</span> cast<LabelDecl>(Res);</div>
+<div class="line"><a name="l03382"></a><span class="lineno"> 3382</span> }</div>
+<div class="line"><a name="l03383"></a><span class="lineno"> 3383</span> </div>
+<div class="line"><a name="l03384"></a><span class="lineno"> 3384</span> <span class="comment">//===----------------------------------------------------------------------===//</span></div>
+<div class="line"><a name="l03385"></a><span class="lineno"> 3385</span> <span class="comment">// Typo correction</span></div>
+<div class="line"><a name="l03386"></a><span class="lineno"> 3386</span> <span class="comment">//===----------------------------------------------------------------------===//</span></div>
+<div class="line"><a name="l03387"></a><span class="lineno"> 3387</span> </div>
+<div class="line"><a name="l03388"></a><span class="lineno"> 3388</span> <span class="keyword">namespace </span>{</div>
+<div class="line"><a name="l03389"></a><span class="lineno"> 3389</span> </div>
+<div class="line"><a name="l03390"></a><span class="lineno"> 3390</span> <span class="keyword">typedef</span> <a class="code" href="classllvm_1_1SmallVector.html">SmallVector<TypoCorrection, 1></a> TypoResultList;</div>
+<div class="line"><a name="l03391"></a><span class="lineno"> 3391</span> <span class="keyword">typedef</span> llvm::StringMap<TypoResultList, llvm::BumpPtrAllocator> TypoResultsMap;</div>
+<div class="line"><a name="l03392"></a><span class="lineno"> 3392</span> <span class="keyword">typedef</span> std::map<unsigned, TypoResultsMap> TypoEditDistanceMap;</div>
+<div class="line"><a name="l03393"></a><span class="lineno"> 3393</span> </div>
+<div class="line"><a name="l03394"></a><span class="lineno"> 3394</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> MaxTypoDistanceResultSets = 5;</div>
+<div class="line"><a name="l03395"></a><span class="lineno"> 3395</span> </div>
+<div class="line"><a name="l03396"></a><span class="lineno"> 3396</span> <span class="keyword">class </span>TypoCorrectionConsumer : <span class="keyword">public</span> <a class="code" href="classclang_1_1VisibleDeclConsumer.html" title="Consumes visible declarations found when searching for all visible names within a given scope or cont...">VisibleDeclConsumer</a> {<span class="comment"></span></div>
+<div class="line"><a name="l03397"></a><span class="lineno"> 3397</span> <span class="comment">  /// \brief The name written that is a typo in the source.</span></div>
+<div class="line"><a name="l03398"></a><span class="lineno"> 3398</span> <span class="comment"></span>  StringRef <a class="code" href="CommentSema_8cpp.html#ace01d1978435b977e8a71c3196358cc1">Typo</a>;</div>
+<div class="line"><a name="l03399"></a><span class="lineno"> 3399</span> <span class="comment"></span></div>
+<div class="line"><a name="l03400"></a><span class="lineno"> 3400</span> <span class="comment">  /// \brief The results found that have the smallest edit distance</span></div>
+<div class="line"><a name="l03401"></a><span class="lineno"> 3401</span> <span class="comment">  /// found (so far) with the typo name.</span></div>
+<div class="line"><a name="l03402"></a><span class="lineno"> 3402</span> <span class="comment">  ///</span></div>
+<div class="line"><a name="l03403"></a><span class="lineno"> 3403</span> <span class="comment">  /// The pointer value being set to the current DeclContext indicates</span></div>
+<div class="line"><a name="l03404"></a><span class="lineno"> 3404</span> <span class="comment">  /// whether there is a keyword with this name.</span></div>
+<div class="line"><a name="l03405"></a><span class="lineno"> 3405</span> <span class="comment"></span>  TypoEditDistanceMap CorrectionResults;</div>
+<div class="line"><a name="l03406"></a><span class="lineno"> 3406</span> </div>
+<div class="line"><a name="l03407"></a><span class="lineno"> 3407</span>   <a class="code" href="classclang_1_1Sema.html" title="Sema - This implements semantic analysis and AST building for C.">Sema</a> &<a class="code" href="SemaOverload_8cpp.html#a2143ac7d927afc9feb28c9270c7ed86d">SemaRef</a>;</div>
+<div class="line"><a name="l03408"></a><span class="lineno"> 3408</span> </div>
+<div class="line"><a name="l03409"></a><span class="lineno"> 3409</span> <span class="keyword">public</span>:</div>
+<div class="line"><a name="l03410"></a><span class="lineno"> 3410</span>   <span class="keyword">explicit</span> TypoCorrectionConsumer(<a class="code" href="classclang_1_1Sema.html" title="Sema - This implements semantic analysis and AST building for C.">Sema</a> &SemaRef, <a class="code" href="classclang_1_1IdentifierInfo.html">IdentifierInfo</a> *<a class="code" href="CommentSema_8cpp.html#ace01d1978435b977e8a71c3196358cc1">Typo</a>)</div>
+<div class="line"><a name="l03411"></a><span class="lineno"> 3411</span>     : Typo(Typo->getName()),</div>
+<div class="line"><a name="l03412"></a><span class="lineno"> 3412</span>       SemaRef(SemaRef) {}</div>
+<div class="line"><a name="l03413"></a><span class="lineno"> 3413</span> </div>
+<div class="line"><a name="l03414"></a><span class="lineno"> 3414</span>   <span class="keywordtype">bool</span> includeHiddenDecls()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">true</span>; }</div>
+<div class="line"><a name="l03415"></a><span class="lineno"> 3415</span> </div>
+<div class="line"><a name="l03416"></a><span class="lineno"> 3416</span>   <span class="keyword">virtual</span> <span class="keywordtype">void</span> FoundDecl(<a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *ND, <a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *Hiding, <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *Ctx,</div>
+<div class="line"><a name="l03417"></a><span class="lineno"> 3417</span>                          <span class="keywordtype">bool</span> InBaseClass);</div>
+<div class="line"><a name="l03418"></a><span class="lineno"> 3418</span>   <span class="keywordtype">void</span> FoundName(StringRef Name);</div>
+<div class="line"><a name="l03419"></a><span class="lineno"> 3419</span>   <span class="keywordtype">void</span> addKeywordResult(StringRef Keyword);</div>
+<div class="line"><a name="l03420"></a><span class="lineno"> 3420</span>   <span class="keywordtype">void</span> addName(StringRef Name, <a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *ND, <a class="code" href="classclang_1_1NestedNameSpecifier.html" title="Represents a C++ nested name specifier, such as "\::std::vector<int>::".">NestedNameSpecifier</a> *NNS = <a class="code" href="stddef_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>,</div>
+<div class="line"><a name="l03421"></a><span class="lineno"> 3421</span>                <span class="keywordtype">bool</span> isKeyword = <span class="keyword">false</span>);</div>
+<div class="line"><a name="l03422"></a><span class="lineno"> 3422</span>   <span class="keywordtype">void</span> addCorrection(<a class="code" href="classclang_1_1TypoCorrection.html" title="Simple class containing the result of Sema::CorrectTypo.">TypoCorrection</a> Correction);</div>
+<div class="line"><a name="l03423"></a><span class="lineno"> 3423</span> </div>
+<div class="line"><a name="l03424"></a><span class="lineno"> 3424</span>   <span class="keyword">typedef</span> TypoResultsMap::iterator result_iterator;</div>
+<div class="line"><a name="l03425"></a><span class="lineno"> 3425</span>   <span class="keyword">typedef</span> TypoEditDistanceMap::iterator distance_iterator;</div>
+<div class="line"><a name="l03426"></a><span class="lineno"> 3426</span>   distance_iterator begin() { <span class="keywordflow">return</span> CorrectionResults.begin(); }</div>
+<div class="line"><a name="l03427"></a><span class="lineno"> 3427</span>   distance_iterator end()  { <span class="keywordflow">return</span> CorrectionResults.end(); }</div>
+<div class="line"><a name="l03428"></a><span class="lineno"> 3428</span>   <span class="keywordtype">void</span> erase(distance_iterator I) { CorrectionResults.erase(I); }</div>
+<div class="line"><a name="l03429"></a><span class="lineno"> 3429</span>   <span class="keywordtype">unsigned</span> size()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> CorrectionResults.size(); }</div>
+<div class="line"><a name="l03430"></a><span class="lineno"> 3430</span>   <span class="keywordtype">bool</span> empty()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> CorrectionResults.empty(); }</div>
+<div class="line"><a name="l03431"></a><span class="lineno"> 3431</span> </div>
+<div class="line"><a name="l03432"></a><span class="lineno"> 3432</span>   TypoResultList &operator[](StringRef Name) {</div>
+<div class="line"><a name="l03433"></a><span class="lineno"> 3433</span>     <span class="keywordflow">return</span> CorrectionResults.begin()->second[Name];</div>
+<div class="line"><a name="l03434"></a><span class="lineno"> 3434</span>   }</div>
+<div class="line"><a name="l03435"></a><span class="lineno"> 3435</span> </div>
+<div class="line"><a name="l03436"></a><span class="lineno"> 3436</span>   <span class="keywordtype">unsigned</span> getBestEditDistance(<span class="keywordtype">bool</span> Normalized) {</div>
+<div class="line"><a name="l03437"></a><span class="lineno"> 3437</span>     <span class="keywordflow">if</span> (CorrectionResults.empty())</div>
+<div class="line"><a name="l03438"></a><span class="lineno"> 3438</span>       <span class="keywordflow">return</span> (std::numeric_limits<unsigned>::max)();</div>
+<div class="line"><a name="l03439"></a><span class="lineno"> 3439</span> </div>
+<div class="line"><a name="l03440"></a><span class="lineno"> 3440</span>     <span class="keywordtype">unsigned</span> BestED = CorrectionResults.begin()->first;</div>
+<div class="line"><a name="l03441"></a><span class="lineno"> 3441</span>     <span class="keywordflow">return</span> Normalized ? <a class="code" href="classclang_1_1TypoCorrection.html#aa74c541acb90925e7599bd4208d07f90">TypoCorrection::NormalizeEditDistance</a>(BestED) : BestED;</div>
+<div class="line"><a name="l03442"></a><span class="lineno"> 3442</span>   }</div>
+<div class="line"><a name="l03443"></a><span class="lineno"> 3443</span> </div>
+<div class="line"><a name="l03444"></a><span class="lineno"> 3444</span>   TypoResultsMap &getBestResults() {</div>
+<div class="line"><a name="l03445"></a><span class="lineno"> 3445</span>     <span class="keywordflow">return</span> CorrectionResults.begin()->second;</div>
+<div class="line"><a name="l03446"></a><span class="lineno"> 3446</span>   }</div>
+<div class="line"><a name="l03447"></a><span class="lineno"> 3447</span> </div>
+<div class="line"><a name="l03448"></a><span class="lineno"> 3448</span> };</div>
+<div class="line"><a name="l03449"></a><span class="lineno"> 3449</span> </div>
+<div class="line"><a name="l03450"></a><span class="lineno"> 3450</span> }</div>
+<div class="line"><a name="l03451"></a><span class="lineno"> 3451</span> </div>
+<div class="line"><a name="l03452"></a><span class="lineno"> 3452</span> <span class="keywordtype">void</span> TypoCorrectionConsumer::FoundDecl(<a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *ND, <a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *Hiding,</div>
+<div class="line"><a name="l03453"></a><span class="lineno"> 3453</span>                                        <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *Ctx, <span class="keywordtype">bool</span> InBaseClass) {</div>
+<div class="line"><a name="l03454"></a><span class="lineno"> 3454</span>   <span class="comment">// Don't consider hidden names for typo correction.</span></div>
+<div class="line"><a name="l03455"></a><span class="lineno"> 3455</span>   <span class="keywordflow">if</span> (Hiding)</div>
+<div class="line"><a name="l03456"></a><span class="lineno"> 3456</span>     <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l03457"></a><span class="lineno"> 3457</span> </div>
+<div class="line"><a name="l03458"></a><span class="lineno"> 3458</span>   <span class="comment">// Only consider entities with identifiers for names, ignoring</span></div>
+<div class="line"><a name="l03459"></a><span class="lineno"> 3459</span>   <span class="comment">// special names (constructors, overloaded operators, selectors,</span></div>
+<div class="line"><a name="l03460"></a><span class="lineno"> 3460</span>   <span class="comment">// etc.).</span></div>
+<div class="line"><a name="l03461"></a><span class="lineno"> 3461</span>   <a class="code" href="classclang_1_1IdentifierInfo.html">IdentifierInfo</a> *Name = ND-><a class="code" href="classclang_1_1NamedDecl.html#a554752f8f43eea0e6288da7205167fe2">getIdentifier</a>();</div>
+<div class="line"><a name="l03462"></a><span class="lineno"> 3462</span>   <span class="keywordflow">if</span> (!Name)</div>
+<div class="line"><a name="l03463"></a><span class="lineno"> 3463</span>     <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l03464"></a><span class="lineno"> 3464</span> </div>
+<div class="line"><a name="l03465"></a><span class="lineno"> 3465</span>   <span class="comment">// Only consider visible declarations and declarations from modules with</span></div>
+<div class="line"><a name="l03466"></a><span class="lineno"> 3466</span>   <span class="comment">// names that exactly match.</span></div>
+<div class="line"><a name="l03467"></a><span class="lineno"> 3467</span>   <span class="keywordflow">if</span> (!<a class="code" href="classclang_1_1LookupResult.html#ad308736d4d5745319a737e7bb40c7a9a" title="Determine whether the given declaration is visible to the program.">LookupResult::isVisible</a>(SemaRef, ND) && Name-><a class="code" href="classclang_1_1IdentifierInfo.html#a94caec6a16e508e8ca39eacd278bd2c5" title="Return the actual identifier string.">getName</a>() != <a class="code" href="CommentSema_8cpp.html#ace01d1978435b977e8a71c3196358cc1">Typo</a> &&</div>
+<div class="line"><a name="l03468"></a><span class="lineno"> 3468</span>       !<a class="code" href="SemaLookup_8cpp.html#a5cc0b00b9bc94a9bdf9970d2f7d47d65" title="Retrieve the visible declaration corresponding to D, if any.">findAcceptableDecl</a>(SemaRef, ND))</div>
+<div class="line"><a name="l03469"></a><span class="lineno"> 3469</span>     <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l03470"></a><span class="lineno"> 3470</span> </div>
+<div class="line"><a name="l03471"></a><span class="lineno"> 3471</span>   FoundName(Name-><a class="code" href="classclang_1_1IdentifierInfo.html#a94caec6a16e508e8ca39eacd278bd2c5" title="Return the actual identifier string.">getName</a>());</div>
+<div class="line"><a name="l03472"></a><span class="lineno"> 3472</span> }</div>
+<div class="line"><a name="l03473"></a><span class="lineno"> 3473</span> </div>
+<div class="line"><a name="l03474"></a><span class="lineno"> 3474</span> <span class="keywordtype">void</span> TypoCorrectionConsumer::FoundName(StringRef Name) {</div>
+<div class="line"><a name="l03475"></a><span class="lineno"> 3475</span>   <span class="comment">// Compute the edit distance between the typo and the name of this</span></div>
+<div class="line"><a name="l03476"></a><span class="lineno"> 3476</span>   <span class="comment">// entity, and add the identifier to the list of results.</span></div>
+<div class="line"><a name="l03477"></a><span class="lineno"> 3477</span>   addName(Name, <a class="code" href="stddef_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>);</div>
+<div class="line"><a name="l03478"></a><span class="lineno"> 3478</span> }</div>
+<div class="line"><a name="l03479"></a><span class="lineno"> 3479</span> </div>
+<div class="line"><a name="l03480"></a><span class="lineno"> 3480</span> <span class="keywordtype">void</span> TypoCorrectionConsumer::addKeywordResult(StringRef Keyword) {</div>
+<div class="line"><a name="l03481"></a><span class="lineno"> 3481</span>   <span class="comment">// Compute the edit distance between the typo and this keyword,</span></div>
+<div class="line"><a name="l03482"></a><span class="lineno"> 3482</span>   <span class="comment">// and add the keyword to the list of results.</span></div>
+<div class="line"><a name="l03483"></a><span class="lineno"> 3483</span>   addName(Keyword, <a class="code" href="stddef_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, <a class="code" href="stddef_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, <span class="keyword">true</span>);</div>
+<div class="line"><a name="l03484"></a><span class="lineno"> 3484</span> }</div>
+<div class="line"><a name="l03485"></a><span class="lineno"> 3485</span> </div>
+<div class="line"><a name="l03486"></a><span class="lineno"> 3486</span> <span class="keywordtype">void</span> TypoCorrectionConsumer::addName(StringRef Name, <a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *ND,</div>
+<div class="line"><a name="l03487"></a><span class="lineno"> 3487</span>                                      <a class="code" href="classclang_1_1NestedNameSpecifier.html" title="Represents a C++ nested name specifier, such as "\::std::vector<int>::".">NestedNameSpecifier</a> *NNS, <span class="keywordtype">bool</span> isKeyword) {</div>
+<div class="line"><a name="l03488"></a><span class="lineno"> 3488</span>   <span class="comment">// Use a simple length-based heuristic to determine the minimum possible</span></div>
+<div class="line"><a name="l03489"></a><span class="lineno"> 3489</span>   <span class="comment">// edit distance. If the minimum isn't good enough, bail out early.</span></div>
+<div class="line"><a name="l03490"></a><span class="lineno"> 3490</span>   <span class="keywordtype">unsigned</span> MinED = abs((<span class="keywordtype">int</span>)Name.size() - (int)<a class="code" href="CommentSema_8cpp.html#ace01d1978435b977e8a71c3196358cc1">Typo</a>.size());</div>
+<div class="line"><a name="l03491"></a><span class="lineno"> 3491</span>   <span class="keywordflow">if</span> (MinED && <a class="code" href="CommentSema_8cpp.html#ace01d1978435b977e8a71c3196358cc1">Typo</a>.size() / MinED < 3)</div>
+<div class="line"><a name="l03492"></a><span class="lineno"> 3492</span>     <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l03493"></a><span class="lineno"> 3493</span> </div>
+<div class="line"><a name="l03494"></a><span class="lineno"> 3494</span>   <span class="comment">// Compute an upper bound on the allowable edit distance, so that the</span></div>
+<div class="line"><a name="l03495"></a><span class="lineno"> 3495</span>   <span class="comment">// edit-distance algorithm can short-circuit.</span></div>
+<div class="line"><a name="l03496"></a><span class="lineno"> 3496</span>   <span class="keywordtype">unsigned</span> UpperBound = (<a class="code" href="CommentSema_8cpp.html#ace01d1978435b977e8a71c3196358cc1">Typo</a>.size() + 2) / 3 + 1;</div>
+<div class="line"><a name="l03497"></a><span class="lineno"> 3497</span>   <span class="keywordtype">unsigned</span> ED = <a class="code" href="CommentSema_8cpp.html#ace01d1978435b977e8a71c3196358cc1">Typo</a>.edit_distance(Name, <span class="keyword">true</span>, UpperBound);</div>
+<div class="line"><a name="l03498"></a><span class="lineno"> 3498</span>   <span class="keywordflow">if</span> (ED >= UpperBound) <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l03499"></a><span class="lineno"> 3499</span> </div>
+<div class="line"><a name="l03500"></a><span class="lineno"> 3500</span>   <a class="code" href="classclang_1_1TypoCorrection.html" title="Simple class containing the result of Sema::CorrectTypo.">TypoCorrection</a> TC(&SemaRef.<a class="code" href="classclang_1_1Sema.html#a3ccddacb1f4f71b084296175cc9e5b0e">Context</a>.<a class="code" href="classclang_1_1ASTContext.html#a4f95adb9958e22fbe55212ae6482feb4">Idents</a>.<a class="code" href="classclang_1_1IdentifierTable.html#aea14376d325400caa8a8183d14a02f39" title="Return the identifier token info for the specified named identifier.">get</a>(Name), ND, NNS, ED);</div>
+<div class="line"><a name="l03501"></a><span class="lineno"> 3501</span>   <span class="keywordflow">if</span> (isKeyword) TC.<a class="code" href="classclang_1_1TypoCorrection.html#afdd72fb62a95b1fbfd38f3dd713388cb" title="Mark this TypoCorrection as being a keyword. Since addCorrectionDeclsand setCorrectionDecl don't allo...">makeKeyword</a>();</div>
+<div class="line"><a name="l03502"></a><span class="lineno"> 3502</span>   addCorrection(TC);</div>
+<div class="line"><a name="l03503"></a><span class="lineno"> 3503</span> }</div>
+<div class="line"><a name="l03504"></a><span class="lineno"> 3504</span> </div>
+<div class="line"><a name="l03505"></a><span class="lineno"> 3505</span> <span class="keywordtype">void</span> TypoCorrectionConsumer::addCorrection(<a class="code" href="classclang_1_1TypoCorrection.html" title="Simple class containing the result of Sema::CorrectTypo.">TypoCorrection</a> Correction) {</div>
+<div class="line"><a name="l03506"></a><span class="lineno"> 3506</span>   StringRef Name = Correction.<a class="code" href="classclang_1_1TypoCorrection.html#a90d9076a464187b7492846d16e57f808">getCorrectionAsIdentifierInfo</a>()-><a class="code" href="classclang_1_1IdentifierInfo.html#a94caec6a16e508e8ca39eacd278bd2c5" title="Return the actual identifier string.">getName</a>();</div>
+<div class="line"><a name="l03507"></a><span class="lineno"> 3507</span>   TypoResultList &CList =</div>
+<div class="line"><a name="l03508"></a><span class="lineno"> 3508</span>       CorrectionResults[Correction.<a class="code" href="classclang_1_1TypoCorrection.html#a9b20a92d59687681b808f54aa8df7513" title="Gets the "edit distance" of the typo correction from the typo. If Normalized is true, scale the distance down by the CharDistanceWeight to return the edit distance in terms of single-character edits.">getEditDistance</a>(<span class="keyword">false</span>)][Name];</div>
+<div class="line"><a name="l03509"></a><span class="lineno"> 3509</span> </div>
+<div class="line"><a name="l03510"></a><span class="lineno"> 3510</span>   <span class="keywordflow">if</span> (!CList.empty() && !CList.back().isResolved())</div>
+<div class="line"><a name="l03511"></a><span class="lineno"> 3511</span>     CList.pop_back();</div>
+<div class="line"><a name="l03512"></a><span class="lineno"> 3512</span>   <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1NamedDecl.html">NamedDecl</a> *NewND = Correction.<a class="code" href="classclang_1_1TypoCorrection.html#a29de9b01d96527ae25ce1c2b7d45f7b6" title="Gets the pointer to the declaration of the typo correction.">getCorrectionDecl</a>()) {</div>
+<div class="line"><a name="l03513"></a><span class="lineno"> 3513</span>     std::string CorrectionStr = Correction.<a class="code" href="classclang_1_1TypoCorrection.html#a0559280d5421d76229fbc01970efb567">getAsString</a>(SemaRef.<a class="code" href="classclang_1_1Sema.html#a5f632d714a520550786bde65d3771228">getLangOpts</a>());</div>
+<div class="line"><a name="l03514"></a><span class="lineno"> 3514</span>     <span class="keywordflow">for</span> (TypoResultList::iterator RI = CList.begin(), RIEnd = CList.end();</div>
+<div class="line"><a name="l03515"></a><span class="lineno"> 3515</span>          RI != RIEnd; ++RI) {</div>
+<div class="line"><a name="l03516"></a><span class="lineno"> 3516</span>       <span class="comment">// If the Correction refers to a decl already in the result list,</span></div>
+<div class="line"><a name="l03517"></a><span class="lineno"> 3517</span>       <span class="comment">// replace the existing result if the string representation of Correction</span></div>
+<div class="line"><a name="l03518"></a><span class="lineno"> 3518</span>       <span class="comment">// comes before the current result alphabetically, then stop as there is</span></div>
+<div class="line"><a name="l03519"></a><span class="lineno"> 3519</span>       <span class="comment">// nothing more to be done to add Correction to the candidate set.</span></div>
+<div class="line"><a name="l03520"></a><span class="lineno"> 3520</span>       <span class="keywordflow">if</span> (RI->getCorrectionDecl() == NewND) {</div>
+<div class="line"><a name="l03521"></a><span class="lineno"> 3521</span>         <span class="keywordflow">if</span> (CorrectionStr < RI->getAsString(SemaRef.<a class="code" href="classclang_1_1Sema.html#a5f632d714a520550786bde65d3771228">getLangOpts</a>()))</div>
+<div class="line"><a name="l03522"></a><span class="lineno"> 3522</span>           *RI = Correction;</div>
+<div class="line"><a name="l03523"></a><span class="lineno"> 3523</span>         <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l03524"></a><span class="lineno"> 3524</span>       }</div>
+<div class="line"><a name="l03525"></a><span class="lineno"> 3525</span>     }</div>
+<div class="line"><a name="l03526"></a><span class="lineno"> 3526</span>   }</div>
+<div class="line"><a name="l03527"></a><span class="lineno"> 3527</span>   <span class="keywordflow">if</span> (CList.empty() || Correction.<a class="code" href="classclang_1_1TypoCorrection.html#a66458bef97c5de23910ff675260360d9">isResolved</a>())</div>
+<div class="line"><a name="l03528"></a><span class="lineno"> 3528</span>     CList.push_back(Correction);</div>
+<div class="line"><a name="l03529"></a><span class="lineno"> 3529</span> </div>
+<div class="line"><a name="l03530"></a><span class="lineno"> 3530</span>   <span class="keywordflow">while</span> (CorrectionResults.size() > MaxTypoDistanceResultSets)</div>
+<div class="line"><a name="l03531"></a><span class="lineno"> 3531</span>     erase(llvm::prior(CorrectionResults.end()));</div>
+<div class="line"><a name="l03532"></a><span class="lineno"> 3532</span> }</div>
+<div class="line"><a name="l03533"></a><span class="lineno"> 3533</span> </div>
+<div class="line"><a name="l03534"></a><span class="lineno"> 3534</span> <span class="comment">// Fill the supplied vector with the IdentifierInfo pointers for each piece of</span></div>
+<div class="line"><a name="l03535"></a><span class="lineno"> 3535</span> <span class="comment">// the given NestedNameSpecifier (i.e. given a NestedNameSpecifier "foo::bar::",</span></div>
+<div class="line"><a name="l03536"></a><span class="lineno"> 3536</span> <span class="comment">// fill the vector with the IdentifierInfo pointers for "foo" and "bar").</span></div>
+<div class="line"><a name="l03537"></a><span class="lineno"><a class="code" href="SemaLookup_8cpp.html#ade49feac2dbe1087a17b2201720f9d2d"> 3537</a></span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="SemaLookup_8cpp.html#ade49feac2dbe1087a17b2201720f9d2d">getNestedNameSpecifierIdentifiers</a>(</div>
+<div class="line"><a name="l03538"></a><span class="lineno"> 3538</span>     <a class="code" href="classclang_1_1NestedNameSpecifier.html" title="Represents a C++ nested name specifier, such as "\::std::vector<int>::".">NestedNameSpecifier</a> *NNS,</div>
+<div class="line"><a name="l03539"></a><span class="lineno"> 3539</span>     <a class="code" href="classllvm_1_1SmallVectorImpl.html">SmallVectorImpl<const IdentifierInfo*></a> &Identifiers) {</div>
+<div class="line"><a name="l03540"></a><span class="lineno"> 3540</span>   <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1NestedNameSpecifier.html" title="Represents a C++ nested name specifier, such as "\::std::vector<int>::".">NestedNameSpecifier</a> *Prefix = NNS-><a class="code" href="classclang_1_1NestedNameSpecifier.html#ab7181f33adf9c04fdf90c6bbd33bd3d8" title="Return the prefix of this nested name specifier.">getPrefix</a>())</div>
+<div class="line"><a name="l03541"></a><span class="lineno"> 3541</span>     <a class="code" href="SemaLookup_8cpp.html#ade49feac2dbe1087a17b2201720f9d2d">getNestedNameSpecifierIdentifiers</a>(Prefix, Identifiers);</div>
+<div class="line"><a name="l03542"></a><span class="lineno"> 3542</span>   <span class="keywordflow">else</span></div>
+<div class="line"><a name="l03543"></a><span class="lineno"> 3543</span>     Identifiers.clear();</div>
+<div class="line"><a name="l03544"></a><span class="lineno"> 3544</span> </div>
+<div class="line"><a name="l03545"></a><span class="lineno"> 3545</span>   <span class="keyword">const</span> <a class="code" href="classclang_1_1IdentifierInfo.html">IdentifierInfo</a> *II = <a class="code" href="stddef_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>;</div>
+<div class="line"><a name="l03546"></a><span class="lineno"> 3546</span> </div>
+<div class="line"><a name="l03547"></a><span class="lineno"> 3547</span>   <span class="keywordflow">switch</span> (NNS-><a class="code" href="classclang_1_1NestedNameSpecifier.html#a6b89f6bc0788753f977377a158b8d55d" title="Determine what kind of nested name specifier is stored.">getKind</a>()) {</div>
+<div class="line"><a name="l03548"></a><span class="lineno"> 3548</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1NestedNameSpecifier.html#ac707a113605ed4283684b8c05664eb6faa92d18857428e63813afa4e0a88def5a" title="An identifier, stored as an IdentifierInfo*.">NestedNameSpecifier::Identifier</a>:</div>
+<div class="line"><a name="l03549"></a><span class="lineno"> 3549</span>     II = NNS-><a class="code" href="classclang_1_1NestedNameSpecifier.html#ac2e2d7953cf0435a7c0bcbe1966446b1" title="Retrieve the identifier stored in this nested name specifier.">getAsIdentifier</a>();</div>
+<div class="line"><a name="l03550"></a><span class="lineno"> 3550</span>     <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l03551"></a><span class="lineno"> 3551</span> </div>
+<div class="line"><a name="l03552"></a><span class="lineno"> 3552</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1NestedNameSpecifier.html#ac707a113605ed4283684b8c05664eb6faf37ff4b711e0a555e2ae7f89ddecc8db" title="A namespace, stored as a NamespaceDecl*.">NestedNameSpecifier::Namespace</a>:</div>
+<div class="line"><a name="l03553"></a><span class="lineno"> 3553</span>     <span class="keywordflow">if</span> (NNS-><a class="code" href="classclang_1_1NestedNameSpecifier.html#afa7f841b1591c0e8155abc2aa0971cd6" title="Retrieve the namespace stored in this nested name specifier.">getAsNamespace</a>()-><a class="code" href="classclang_1_1NamespaceDecl.html#a42ebf818c71a0c064117a2a51ed25c42" title="Returns true if this is an anonymous namespace declaration.">isAnonymousNamespace</a>())</div>
+<div class="line"><a name="l03554"></a><span class="lineno"> 3554</span>       <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l03555"></a><span class="lineno"> 3555</span>     II = NNS-><a class="code" href="classclang_1_1NestedNameSpecifier.html#afa7f841b1591c0e8155abc2aa0971cd6" title="Retrieve the namespace stored in this nested name specifier.">getAsNamespace</a>()-><a class="code" href="classclang_1_1NamedDecl.html#a554752f8f43eea0e6288da7205167fe2">getIdentifier</a>();</div>
+<div class="line"><a name="l03556"></a><span class="lineno"> 3556</span>     <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l03557"></a><span class="lineno"> 3557</span> </div>
+<div class="line"><a name="l03558"></a><span class="lineno"> 3558</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1NestedNameSpecifier.html#ac707a113605ed4283684b8c05664eb6fa052c4102c633839bbabf6f043419bb6d" title="A namespace alias, stored as a NamespaceAliasDecl*.">NestedNameSpecifier::NamespaceAlias</a>:</div>
+<div class="line"><a name="l03559"></a><span class="lineno"> 3559</span>     II = NNS-><a class="code" href="classclang_1_1NestedNameSpecifier.html#acd728b7a0e0cc5f8d68645a7a8d17169" title="Retrieve the namespace alias stored in this nested name specifier.">getAsNamespaceAlias</a>()-><a class="code" href="classclang_1_1NamedDecl.html#a554752f8f43eea0e6288da7205167fe2">getIdentifier</a>();</div>
+<div class="line"><a name="l03560"></a><span class="lineno"> 3560</span>     <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l03561"></a><span class="lineno"> 3561</span> </div>
+<div class="line"><a name="l03562"></a><span class="lineno"> 3562</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1NestedNameSpecifier.html#ac707a113605ed4283684b8c05664eb6fa4216f217193417af58feacb7f446ce35" title="A type that was preceded by the 'template' keyword, stored as a Type*.">NestedNameSpecifier::TypeSpecWithTemplate</a>:</div>
+<div class="line"><a name="l03563"></a><span class="lineno"> 3563</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1NestedNameSpecifier.html#ac707a113605ed4283684b8c05664eb6fa1b66ddf448ef55a1d35777ca0324db3d" title="A type, stored as a Type*.">NestedNameSpecifier::TypeSpec</a>:</div>
+<div class="line"><a name="l03564"></a><span class="lineno"> 3564</span>     II = <a class="code" href="classclang_1_1QualType.html">QualType</a>(NNS-><a class="code" href="classclang_1_1NestedNameSpecifier.html#ad5d61e00e49398a1e05f7052c725cbc0" title="Retrieve the type stored in this nested name specifier.">getAsType</a>(), 0).getBaseTypeIdentifier();</div>
+<div class="line"><a name="l03565"></a><span class="lineno"> 3565</span>     <span class="keywordflow">break</span>;</div>
+<div class="line"><a name="l03566"></a><span class="lineno"> 3566</span> </div>
+<div class="line"><a name="l03567"></a><span class="lineno"> 3567</span>   <span class="keywordflow">case</span> <a class="code" href="classclang_1_1NestedNameSpecifier.html#ac707a113605ed4283684b8c05664eb6faae6e1e63c803f3852ba7b44c670fa292" title="The global specifier '::'. There is no stored value.">NestedNameSpecifier::Global</a>:</div>
+<div class="line"><a name="l03568"></a><span class="lineno"> 3568</span>     <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l03569"></a><span class="lineno"> 3569</span>   }</div>
+<div class="line"><a name="l03570"></a><span class="lineno"> 3570</span> </div>
+<div class="line"><a name="l03571"></a><span class="lineno"> 3571</span>   <span class="keywordflow">if</span> (II)</div>
+<div class="line"><a name="l03572"></a><span class="lineno"> 3572</span>     Identifiers.push_back(II);</div>
+<div class="line"><a name="l03573"></a><span class="lineno"> 3573</span> }</div>
+<div class="line"><a name="l03574"></a><span class="lineno"> 3574</span> </div>
+<div class="line"><a name="l03575"></a><span class="lineno"> 3575</span> <span class="keyword">namespace </span>{</div>
+<div class="line"><a name="l03576"></a><span class="lineno"> 3576</span> </div>
+<div class="line"><a name="l03577"></a><span class="lineno"> 3577</span> <span class="keyword">class </span>SpecifierInfo {</div>
+<div class="line"><a name="l03578"></a><span class="lineno"> 3578</span>  <span class="keyword">public</span>:</div>
+<div class="line"><a name="l03579"></a><span class="lineno"> 3579</span>   <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a>* DeclCtx;</div>
+<div class="line"><a name="l03580"></a><span class="lineno"> 3580</span>   <a class="code" href="classclang_1_1NestedNameSpecifier.html" title="Represents a C++ nested name specifier, such as "\::std::vector<int>::".">NestedNameSpecifier</a>* NameSpecifier;</div>
+<div class="line"><a name="l03581"></a><span class="lineno"> 3581</span>   <span class="keywordtype">unsigned</span> EditDistance;</div>
+<div class="line"><a name="l03582"></a><span class="lineno"> 3582</span> </div>
+<div class="line"><a name="l03583"></a><span class="lineno"> 3583</span>   SpecifierInfo(<a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *Ctx, <a class="code" href="classclang_1_1NestedNameSpecifier.html" title="Represents a C++ nested name specifier, such as "\::std::vector<int>::".">NestedNameSpecifier</a> *NNS, <span class="keywordtype">unsigned</span> ED)</div>
+<div class="line"><a name="l03584"></a><span class="lineno"> 3584</span>       : DeclCtx(Ctx), NameSpecifier(NNS), EditDistance(ED) {}</div>
+<div class="line"><a name="l03585"></a><span class="lineno"> 3585</span> };</div>
+<div class="line"><a name="l03586"></a><span class="lineno"> 3586</span> </div>
+<div class="line"><a name="l03587"></a><span class="lineno"> 3587</span> <span class="keyword">typedef</span> <a class="code" href="classllvm_1_1SmallVector.html">SmallVector<DeclContext*, 4></a> DeclContextList;</div>
+<div class="line"><a name="l03588"></a><span class="lineno"> 3588</span> <span class="keyword">typedef</span> <a class="code" href="classllvm_1_1SmallVector.html">SmallVector<SpecifierInfo, 16></a> SpecifierInfoList;</div>
+<div class="line"><a name="l03589"></a><span class="lineno"> 3589</span> </div>
+<div class="line"><a name="l03590"></a><span class="lineno"> 3590</span> <span class="keyword">class </span>NamespaceSpecifierSet {</div>
+<div class="line"><a name="l03591"></a><span class="lineno"> 3591</span>   <a class="code" href="classclang_1_1ASTContext.html" title="Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...">ASTContext</a> &<a class="code" href="ASTMatchFinder_8cpp.html#a779280869b9fac47a9bc391e7709171f">Context</a>;</div>
+<div class="line"><a name="l03592"></a><span class="lineno"> 3592</span>   DeclContextList CurContextChain;</div>
+<div class="line"><a name="l03593"></a><span class="lineno"> 3593</span>   std::string CurNameSpecifier;</div>
+<div class="line"><a name="l03594"></a><span class="lineno"> 3594</span>   <a class="code" href="classllvm_1_1SmallVector.html">SmallVector<const IdentifierInfo*, 4></a> CurContextIdentifiers;</div>
+<div class="line"><a name="l03595"></a><span class="lineno"> 3595</span>   <a class="code" href="classllvm_1_1SmallVector.html">SmallVector<const IdentifierInfo*, 4></a> CurNameSpecifierIdentifiers;</div>
+<div class="line"><a name="l03596"></a><span class="lineno"> 3596</span>   <span class="keywordtype">bool</span> isSorted;</div>
+<div class="line"><a name="l03597"></a><span class="lineno"> 3597</span> </div>
+<div class="line"><a name="l03598"></a><span class="lineno"> 3598</span>   SpecifierInfoList Specifiers;</div>
+<div class="line"><a name="l03599"></a><span class="lineno"> 3599</span>   llvm::SmallSetVector<unsigned, 4> Distances;</div>
+<div class="line"><a name="l03600"></a><span class="lineno"> 3600</span>   llvm::DenseMap<unsigned, SpecifierInfoList> DistanceMap;</div>
+<div class="line"><a name="l03601"></a><span class="lineno"> 3601</span> <span class="comment"></span></div>
+<div class="line"><a name="l03602"></a><span class="lineno"> 3602</span> <span class="comment">  /// \brief Helper for building the list of DeclContexts between the current</span></div>
+<div class="line"><a name="l03603"></a><span class="lineno"> 3603</span> <span class="comment">  /// context and the top of the translation unit</span></div>
+<div class="line"><a name="l03604"></a><span class="lineno"> 3604</span> <span class="comment"></span>  <span class="keyword">static</span> DeclContextList BuildContextChain(<a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *Start);</div>
+<div class="line"><a name="l03605"></a><span class="lineno"> 3605</span> </div>
+<div class="line"><a name="l03606"></a><span class="lineno"> 3606</span>   <span class="keywordtype">void</span> SortNamespaces();</div>
+<div class="line"><a name="l03607"></a><span class="lineno"> 3607</span> </div>
+<div class="line"><a name="l03608"></a><span class="lineno"> 3608</span>  <span class="keyword">public</span>:</div>
+<div class="line"><a name="l03609"></a><span class="lineno"> 3609</span>   NamespaceSpecifierSet(<a class="code" href="classclang_1_1ASTContext.html" title="Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...">ASTContext</a> &<a class="code" href="ASTMatchFinder_8cpp.html#a779280869b9fac47a9bc391e7709171f">Context</a>, <a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *CurContext,</div>
+<div class="line"><a name="l03610"></a><span class="lineno"> 3610</span>                         <a class="code" href="classclang_1_1CXXScopeSpec.html" title="Represents a C++ nested-name-specifier or a global scope specifier.">CXXScopeSpec</a> *CurScopeSpec)</div>
+<div class="line"><a name="l03611"></a><span class="lineno"> 3611</span>       : Context(Context), CurContextChain(BuildContextChain(CurContext)),</div>
+<div class="line"><a name="l03612"></a><span class="lineno"> 3612</span>         isSorted(<a class="code" href="stdbool_8h.html#a65e9886d74aaee76545e83dd09011727">false</a>) {</div>
+<div class="line"><a name="l03613"></a><span class="lineno"> 3613</span>     <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1NestedNameSpecifier.html" title="Represents a C++ nested name specifier, such as "\::std::vector<int>::".">NestedNameSpecifier</a> *NNS =</div>
+<div class="line"><a name="l03614"></a><span class="lineno"> 3614</span>             CurScopeSpec ? CurScopeSpec-><a class="code" href="classclang_1_1CXXScopeSpec.html#ae880473296a083a62b508203cf9c3f24" title="Retrieve the representation of the nested-name-specifier.">getScopeRep</a>() : 0) {</div>
+<div class="line"><a name="l03615"></a><span class="lineno"> 3615</span>       llvm::raw_string_ostream SpecifierOStream(CurNameSpecifier);</div>
+<div class="line"><a name="l03616"></a><span class="lineno"> 3616</span>       NNS->print(SpecifierOStream, Context.<a class="code" href="classclang_1_1ASTContext.html#aefd70c3135737fd07be3cb2cac251e16">getPrintingPolicy</a>());</div>
+<div class="line"><a name="l03617"></a><span class="lineno"> 3617</span> </div>
+<div class="line"><a name="l03618"></a><span class="lineno"> 3618</span>       <a class="code" href="SemaLookup_8cpp.html#ade49feac2dbe1087a17b2201720f9d2d">getNestedNameSpecifierIdentifiers</a>(NNS, CurNameSpecifierIdentifiers);</div>
+<div class="line"><a name="l03619"></a><span class="lineno"> 3619</span>     }</div>
+<div class="line"><a name="l03620"></a><span class="lineno"> 3620</span>     <span class="comment">// Build the list of identifiers that would be used for an absolute</span></div>
+<div class="line"><a name="l03621"></a><span class="lineno"> 3621</span>     <span class="comment">// (from the global context) NestedNameSpecifier referring to the current</span></div>
+<div class="line"><a name="l03622"></a><span class="lineno"> 3622</span>     <span class="comment">// context.</span></div>
+<div class="line"><a name="l03623"></a><span class="lineno"> 3623</span>     <span class="keywordflow">for</span> (DeclContextList::reverse_iterator C = CurContextChain.rbegin(),</div>
+<div class="line"><a name="l03624"></a><span class="lineno"> 3624</span>                                         CEnd = CurContextChain.rend();</div>
+<div class="line"><a name="l03625"></a><span class="lineno"> 3625</span>          C != CEnd; ++C) {</div>
+<div class="line"><a name="l03626"></a><span class="lineno"> 3626</span>       <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1NamespaceDecl.html" title="NamespaceDecl - Represent a C++ namespace.">NamespaceDecl</a> *ND = dyn_cast_or_null<NamespaceDecl>(*C))</div>
+<div class="line"><a name="l03627"></a><span class="lineno"> 3627</span>         CurContextIdentifiers.push_back(ND-><a class="code" href="classclang_1_1NamedDecl.html#a554752f8f43eea0e6288da7205167fe2">getIdentifier</a>());</div>
+<div class="line"><a name="l03628"></a><span class="lineno"> 3628</span>     }</div>
+<div class="line"><a name="l03629"></a><span class="lineno"> 3629</span> </div>
+<div class="line"><a name="l03630"></a><span class="lineno"> 3630</span>     <span class="comment">// Add the global context as a NestedNameSpecifier</span></div>
+<div class="line"><a name="l03631"></a><span class="lineno"> 3631</span>     Distances.insert(1);</div>
+<div class="line"><a name="l03632"></a><span class="lineno"> 3632</span>     DistanceMap[1].push_back(</div>
+<div class="line"><a name="l03633"></a><span class="lineno"> 3633</span>         SpecifierInfo(cast<DeclContext>(Context.<a class="code" href="classclang_1_1ASTContext.html#abd909fb01ef10cfd0244832a67b1dd64">getTranslationUnitDecl</a>()),</div>
+<div class="line"><a name="l03634"></a><span class="lineno"> 3634</span>                       <a class="code" href="classclang_1_1NestedNameSpecifier.html#aa503affed9f70f0243b2cd0028c7845f" title="Returns the nested name specifier representing the global scope.">NestedNameSpecifier::GlobalSpecifier</a>(Context), 1));</div>
+<div class="line"><a name="l03635"></a><span class="lineno"> 3635</span>   }</div>
+<div class="line"><a name="l03636"></a><span class="lineno"> 3636</span> <span class="comment"></span></div>
+<div class="line"><a name="l03637"></a><span class="lineno"> 3637</span> <span class="comment">  /// \brief Add the DeclContext (a namespace or record) to the set, computing</span></div>
+<div class="line"><a name="l03638"></a><span class="lineno"> 3638</span> <span class="comment">  /// the corresponding NestedNameSpecifier and its distance in the process.</span></div>
+<div class="line"><a name="l03639"></a><span class="lineno"> 3639</span> <span class="comment"></span>  <span class="keywordtype">void</span> AddNameSpecifier(<a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *Ctx);</div>
+<div class="line"><a name="l03640"></a><span class="lineno"> 3640</span> </div>
+<div class="line"><a name="l03641"></a><span class="lineno"> 3641</span>   <span class="keyword">typedef</span> SpecifierInfoList::iterator iterator;</div>
+<div class="line"><a name="l03642"></a><span class="lineno"> 3642</span>   iterator begin() {</div>
+<div class="line"><a name="l03643"></a><span class="lineno"> 3643</span>     <span class="keywordflow">if</span> (!isSorted) SortNamespaces();</div>
+<div class="line"><a name="l03644"></a><span class="lineno"> 3644</span>     <span class="keywordflow">return</span> Specifiers.begin();</div>
+<div class="line"><a name="l03645"></a><span class="lineno"> 3645</span>   }</div>
+<div class="line"><a name="l03646"></a><span class="lineno"> 3646</span>   iterator end() { <span class="keywordflow">return</span> Specifiers.end(); }</div>
+<div class="line"><a name="l03647"></a><span class="lineno"> 3647</span> };</div>
+<div class="line"><a name="l03648"></a><span class="lineno"> 3648</span> </div>
+<div class="line"><a name="l03649"></a><span class="lineno"> 3649</span> }</div>
+<div class="line"><a name="l03650"></a><span class="lineno"> 3650</span> </div>
+<div class="line"><a name="l03651"></a><span class="lineno"> 3651</span> DeclContextList NamespaceSpecifierSet::BuildContextChain(<a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *Start) {</div>
+<div class="line"><a name="l03652"></a><span class="lineno"> 3652</span>   assert(Start && <span class="stringliteral">"Building a context chain from a null context"</span>);</div>
+<div class="line"><a name="l03653"></a><span class="lineno"> 3653</span>   DeclContextList Chain;</div>
+<div class="line"><a name="l03654"></a><span class="lineno"> 3654</span>   <span class="keywordflow">for</span> (<a class="code" href="classclang_1_1DeclContext.html">DeclContext</a> *DC = Start-><a class="code" href="classclang_1_1DeclContext.html#ac3368ad7389098f8fed5c5d346b77445">getPrimaryContext</a>(); DC != <a class="code" href="stddef_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>;</div>
+<div class="line"><a name="l03655"></a><span class="lineno"> 3655</span>        DC = DC-><a class="code" href="classclang_1_1DeclContext.html#ad3f371a23f2b8f92275ef63817701e4e" title="Find the parent context of this context that will be used for unqualified name lookup.">getLookupParent</a>()) {</div>
+<div class="line"><a name="l03656"></a><span class="lineno"> 3656</span>     <a class="code" href="classclang_1_1NamespaceDecl.html" title="NamespaceDecl - Represent a C++ namespace.">NamespaceDecl</a> *ND = dyn_cast_or_null<NamespaceDecl>(DC);</div>
+<div class="line"><a name="l03657"></a><span class="lineno"> 3657</span>     <span class="keywordflow">if</span> (!DC-><a class="code" href="classclang_1_1DeclContext.html#a54029a957eb43fd8754a3865e1e41f04">isInlineNamespace</a>() && !DC-><a class="code" href="classclang_1_1DeclContext.html#abbf5a92a55d4faa4150ee8fd46a60345">isTransparentContext</a>() &&</div>
+<div class="line"><a name="l03658"></a><span class="lineno"> 3658</span>         !(ND && ND-><a class="code" href="classclang_1_1NamespaceDecl.html#a42ebf818c71a0c064117a2a51ed25c42" title="Returns true if this is an anonymous namespace declaration.">isAnonymousNamespace</a>()))</div>
+<div class="line"><a name="l03659"></a><span class="lineno"> 3659</span>       Chain.push_back(DC-><a class="code" href="classclang_1_1DeclContext.html#ac3368ad7389098f8fed5c5d346b77445">getPrimaryContext</a>());</div>
+<div class="line"><a name="l03660"></a><span class="lineno"> 3660</span>   }</div>
+<div class="line"><a name="l03661"></a><span class="lineno"> 3661</span>   <span class="keywordflow">return</span> Chain;</div>
+<div class="line"><a name="l03662"></a><span class="lineno"> 3662</span> }</div>
+<div class="line"><a name="l03663"></a><span class="lineno"> 3663</span> </div>
+<div class="line"><a name="l03664"></a><span class="lineno"> 3664</span> <span class="keywordtype">void</span> NamespaceSpecifierSet::SortNamespaces() {</div>
+<div class="line"><a name="l03665"></a><span class="lineno"> 3665</span>   <a class="code" href="classllvm_1_1SmallVector.html">SmallVector<unsigned, 4></a> sortedDistances;</div>
+<div class="line"><a name="l03666"></a><span class="lineno"> 3666</span>   sortedDistances.append(Distances.begin(), Distances.end());</div>
+<div class="line"><a name="l03667"></a><span class="lineno"> 3667</span> </div>
+<div class="line"><a name="l03668"></a><span class="lineno"> 3668</span>   <span class="keywordflow">if</span> (sortedDistances.size() > 1)</div>
+<div class="line"><a name="l03669"></a><span class="lineno"> 3669</span>     std::sort(sortedDistances.begin(), sortedDistances.end());</div>
+<div class="line"><a name="l03670"></a><span class="lineno"> 3670</span> </div>
+<div class="line"><a name="l03671"></a><span class="lineno"> 3671</span>   Specifiers.clear();</div>
+<div class="line"><a name="l03672"></a><span class="lineno"> 3672</span>   <span class="keywordflow">for</span> (<a class="code" href="classllvm_1_1SmallVectorImpl.html">SmallVectorImpl<unsigned>::iterator</a> DI = sortedDistances.begin(),</div>
+<div class="line"><a name="l03673"></a><span class="lineno"> 3673</span>                                         DIEnd = sortedDistances.end();</div>
+<div class="line"><a name="l03674"></a><span class="lineno"> 3674</span>        DI != DIEnd; ++DI) {</div>
+<div class="line"><a name="l03675"></a><span class="lineno"> 3675</span>     SpecifierInfoList &SpecList = DistanceMap[*DI];</div>
+<div class="line"><a name="l03676"></a><span class="lineno"> 3676</span>     Specifiers.append(SpecList.begin(), SpecList.end());</div>
+<div class="line"><a name="l03677"></a><span class="lineno"> 3677</span>   }</div>
+<div class="line"><a name="l03678"></a><span class="lineno"> 3678</span> </div>
+<div class="line"><a name="l03679"></a><span class="lineno"> 3679</span>   isSorted = <span class="keyword">true</span>;</div>
+<div class="line"><a name="l03680"></a><span class="lineno"> 3680</span> }</div>
+<div class="line"><a name="l03681"></a><span class="lineno"> 3681</span> </div>
+<div class="line"><a name="l03682"></a><span class="lineno"><a class="code" href="SemaLookup_8cpp.html#afe88d960acf15c5020d13ee2ebfe9184"> 3682</a></span> <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <a class="code" href="SemaLookup_8cpp.html#afe88d960acf15c5020d13ee2ebfe9184">BuildNestedNameSpecifier</a>(<a class="code" href="classclang_1_1ASTContext.html" title="Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...">ASTContext</a> &Context,</div>
+<div class="line"><a name="l03683"></a><span class="lineno"> 3683</span>                                          DeclContextList &DeclChain,</div>
+<div class="line"><a name="l03684"></a><span class="lineno"> 3684</span>                                          <a class="code" href="classclang_1_1NestedNameSpecifier.html" title="Represents a C++ nested name specifier, such as "\::std::vector<int>::".">NestedNameSpecifier</a> *&NNS) {</div>
+<div class="line"><a name="l03685"></a><span class="lineno"> 3685</span>   <span class="keywordtype">unsigned</span> NumSpecifiers = 0;</div>
+<div class="line"><a name="l03686"></a><span class="lineno"> 3686</span>   <span class="keywordflow">for</span> (DeclContextList::reverse_iterator C = DeclChain.rbegin(),</div>
+<div class="line"><a name="l03687"></a><span class="lineno"> 3687</span>                                       CEnd = DeclChain.rend();</div>
+<div class="line"><a name="l03688"></a><span class="lineno"> 3688</span>        C != CEnd; ++C) {</div>
+<div class="line"><a name="l03689"></a><span class="lineno"> 3689</span>     <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1NamespaceDecl.html" title="NamespaceDecl - Represent a C++ namespace.">NamespaceDecl</a> *ND = dyn_cast_or_null<NamespaceDecl>(*C)) {</div>
+<div class="line"><a name="l03690"></a><span class="lineno"> 3690</span>       NNS = <a class="code" href="classclang_1_1NestedNameSpecifier.html#af83fb904746e04c9069367ddcc964824" title="Builds a specifier combining a prefix and an identifier.">NestedNameSpecifier::Create</a>(Context, NNS, ND);</div>
+<div class="line"><a name="l03691"></a><span class="lineno"> 3691</span>       ++NumSpecifiers;</div>
+<div class="line"><a name="l03692"></a><span class="lineno"> 3692</span>     } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classclang_1_1RecordDecl.html">RecordDecl</a> *RD = dyn_cast_or_null<RecordDecl>(*C)) {</div>
+<div class="line"><a name="l03693"></a><span class="lineno"> 3693</span>       NNS = <a class="code" href="classclang_1_1NestedNameSpecifier.html#af83fb904746e04c9069367ddcc964824" title="Builds a specifier combining a prefix and an identifier.">NestedNameSpecifier::Create</a>(Context, NNS, RD->isTemplateDecl(),</div>
+<div class="line"><a name="l03694"></a><span class="lineno"> 3694</span>                                         RD->getTypeForDecl());</div>
+<div class="line"><a name="l03695"></a><span class="lineno"> 3695</span>       ++NumSpecifiers;</div>
+<div class="line"><a name="l03696">