blob: f4cea2e88a6d9de9e3f5744895c792e7a26c152b [file] [log] [blame]
John McCall7d384dd2009-11-18 07:57:50 +00001//===--- Lookup.h - Classes for name lookup ---------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file defines the LookupResult class, which is integral to
11// Sema's name-lookup subsystem.
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_CLANG_SEMA_LOOKUP_H
16#define LLVM_CLANG_SEMA_LOOKUP_H
17
18#include "Sema.h"
19
20namespace clang {
21
22/// @brief Represents the results of name lookup.
23///
24/// An instance of the LookupResult class captures the results of a
25/// single name lookup, which can return no result (nothing found),
26/// a single declaration, a set of overloaded functions, or an
27/// ambiguity. Use the getKind() method to determine which of these
28/// results occurred for a given lookup.
John McCall7d384dd2009-11-18 07:57:50 +000029class LookupResult {
30public:
31 enum LookupResultKind {
32 /// @brief No entity found met the criteria.
33 NotFound = 0,
34
Douglas Gregor7d3f5762010-01-15 01:44:47 +000035 /// @brief No entity found met the criteria within the current
36 /// instantiation,, but there were dependent base classes of the
37 /// current instantiation that could not be searched.
38 NotFoundInCurrentInstantiation,
39
John McCall7d384dd2009-11-18 07:57:50 +000040 /// @brief Name lookup found a single declaration that met the
John McCall51fa86f2009-12-02 08:47:38 +000041 /// criteria. getFoundDecl() will return this declaration.
John McCall7d384dd2009-11-18 07:57:50 +000042 Found,
43
44 /// @brief Name lookup found a set of overloaded functions that
John McCall51fa86f2009-12-02 08:47:38 +000045 /// met the criteria.
John McCall7d384dd2009-11-18 07:57:50 +000046 FoundOverloaded,
47
48 /// @brief Name lookup found an unresolvable value declaration
49 /// and cannot yet complete. This only happens in C++ dependent
50 /// contexts with dependent using declarations.
51 FoundUnresolvedValue,
52
53 /// @brief Name lookup results in an ambiguity; use
54 /// getAmbiguityKind to figure out what kind of ambiguity
55 /// we have.
56 Ambiguous
57 };
58
59 enum AmbiguityKind {
60 /// Name lookup results in an ambiguity because multiple
61 /// entities that meet the lookup criteria were found in
62 /// subobjects of different types. For example:
63 /// @code
64 /// struct A { void f(int); }
65 /// struct B { void f(double); }
66 /// struct C : A, B { };
67 /// void test(C c) {
68 /// c.f(0); // error: A::f and B::f come from subobjects of different
69 /// // types. overload resolution is not performed.
70 /// }
71 /// @endcode
72 AmbiguousBaseSubobjectTypes,
73
74 /// Name lookup results in an ambiguity because multiple
75 /// nonstatic entities that meet the lookup criteria were found
76 /// in different subobjects of the same type. For example:
77 /// @code
78 /// struct A { int x; };
79 /// struct B : A { };
80 /// struct C : A { };
81 /// struct D : B, C { };
82 /// int test(D d) {
83 /// return d.x; // error: 'x' is found in two A subobjects (of B and C)
84 /// }
85 /// @endcode
86 AmbiguousBaseSubobjects,
87
88 /// Name lookup results in an ambiguity because multiple definitions
89 /// of entity that meet the lookup criteria were found in different
90 /// declaration contexts.
91 /// @code
92 /// namespace A {
93 /// int i;
94 /// namespace B { int i; }
95 /// int test() {
96 /// using namespace B;
97 /// return i; // error 'i' is found in namespace A and A::B
98 /// }
99 /// }
100 /// @endcode
101 AmbiguousReference,
102
103 /// Name lookup results in an ambiguity because an entity with a
104 /// tag name was hidden by an entity with an ordinary name from
105 /// a different context.
106 /// @code
107 /// namespace A { struct Foo {}; }
108 /// namespace B { void Foo(); }
109 /// namespace C {
110 /// using namespace A;
111 /// using namespace B;
112 /// }
113 /// void test() {
114 /// C::Foo(); // error: tag 'A::Foo' is hidden by an object in a
115 /// // different namespace
116 /// }
117 /// @endcode
118 AmbiguousTagHiding
119 };
120
121 /// A little identifier for flagging temporary lookup results.
122 enum TemporaryToken {
123 Temporary
124 };
125
John McCalleec51cf2010-01-20 00:46:10 +0000126 typedef UnresolvedSetImpl::iterator iterator;
John McCall1d7c5282009-12-18 10:40:03 +0000127 typedef bool (*ResultFilter)(NamedDecl*, unsigned IDNS);
128
John McCall7d384dd2009-11-18 07:57:50 +0000129 LookupResult(Sema &SemaRef, DeclarationName Name, SourceLocation NameLoc,
130 Sema::LookupNameKind LookupKind,
131 Sema::RedeclarationKind Redecl = Sema::NotForRedeclaration)
132 : ResultKind(NotFound),
133 Paths(0),
John McCall92f88312010-01-23 00:46:32 +0000134 NamingClass(0),
John McCall7d384dd2009-11-18 07:57:50 +0000135 SemaRef(SemaRef),
136 Name(Name),
137 NameLoc(NameLoc),
138 LookupKind(LookupKind),
John McCall1d7c5282009-12-18 10:40:03 +0000139 IsAcceptableFn(0),
John McCall7d384dd2009-11-18 07:57:50 +0000140 IDNS(0),
141 Redecl(Redecl != Sema::NotForRedeclaration),
142 HideTags(true),
143 Diagnose(Redecl == Sema::NotForRedeclaration)
John McCall1d7c5282009-12-18 10:40:03 +0000144 {
145 configure();
146 }
John McCall7d384dd2009-11-18 07:57:50 +0000147
148 /// Creates a temporary lookup result, initializing its core data
149 /// using the information from another result. Diagnostics are always
150 /// disabled.
151 LookupResult(TemporaryToken _, const LookupResult &Other)
152 : ResultKind(NotFound),
153 Paths(0),
John McCall92f88312010-01-23 00:46:32 +0000154 NamingClass(0),
John McCall7d384dd2009-11-18 07:57:50 +0000155 SemaRef(Other.SemaRef),
156 Name(Other.Name),
157 NameLoc(Other.NameLoc),
158 LookupKind(Other.LookupKind),
John McCall1d7c5282009-12-18 10:40:03 +0000159 IsAcceptableFn(Other.IsAcceptableFn),
John McCall7d384dd2009-11-18 07:57:50 +0000160 IDNS(Other.IDNS),
161 Redecl(Other.Redecl),
162 HideTags(Other.HideTags),
163 Diagnose(false)
164 {}
165
166 ~LookupResult() {
167 if (Diagnose) diagnose();
168 if (Paths) deletePaths(Paths);
169 }
170
171 /// Gets the name to look up.
172 DeclarationName getLookupName() const {
173 return Name;
174 }
175
Douglas Gregor546be3c2009-12-30 17:04:44 +0000176 /// \brief Sets the name to look up.
177 void setLookupName(DeclarationName Name) {
178 this->Name = Name;
179 }
180
John McCall7d384dd2009-11-18 07:57:50 +0000181 /// Gets the kind of lookup to perform.
182 Sema::LookupNameKind getLookupKind() const {
183 return LookupKind;
184 }
185
186 /// True if this lookup is just looking for an existing declaration.
187 bool isForRedeclaration() const {
188 return Redecl;
189 }
190
191 /// Sets whether tag declarations should be hidden by non-tag
192 /// declarations during resolution. The default is true.
193 void setHideTags(bool Hide) {
194 HideTags = Hide;
195 }
196
John McCall7d384dd2009-11-18 07:57:50 +0000197 bool isAmbiguous() const {
198 return getResultKind() == Ambiguous;
199 }
200
John McCall68263142009-11-18 22:49:29 +0000201 /// Determines if this names a single result which is not an
202 /// unresolved value using decl. If so, it is safe to call
203 /// getFoundDecl().
204 bool isSingleResult() const {
205 return getResultKind() == Found;
206 }
207
John McCall7453ed42009-11-22 00:44:51 +0000208 /// Determines if the results are overloaded.
209 bool isOverloadedResult() const {
210 return getResultKind() == FoundOverloaded;
211 }
212
John McCall129e2df2009-11-30 22:42:35 +0000213 bool isUnresolvableResult() const {
214 return getResultKind() == FoundUnresolvedValue;
215 }
216
John McCall7d384dd2009-11-18 07:57:50 +0000217 LookupResultKind getResultKind() const {
218 sanity();
219 return ResultKind;
220 }
221
222 AmbiguityKind getAmbiguityKind() const {
223 assert(isAmbiguous());
224 return Ambiguity;
225 }
226
John McCalleec51cf2010-01-20 00:46:10 +0000227 iterator begin() const { return iterator(Decls.begin()); }
228 iterator end() const { return iterator(Decls.end()); }
John McCall7d384dd2009-11-18 07:57:50 +0000229
230 /// \brief Return true if no decls were found
231 bool empty() const { return Decls.empty(); }
232
233 /// \brief Return the base paths structure that's associated with
234 /// these results, or null if none is.
235 CXXBasePaths *getBasePaths() const {
236 return Paths;
237 }
238
John McCall1d7c5282009-12-18 10:40:03 +0000239 /// \brief Tests whether the given declaration is acceptable.
240 bool isAcceptableDecl(NamedDecl *D) const {
241 assert(IsAcceptableFn);
242 return IsAcceptableFn(D, IDNS);
243 }
244
245 /// \brief Returns the identifier namespace mask for this lookup.
246 unsigned getIdentifierNamespace() const {
247 return IDNS;
248 }
249
John McCall92f88312010-01-23 00:46:32 +0000250 /// \brief Returns whether these results arose from performing a
251 /// lookup into a class.
252 bool isClassLookup() const {
253 return NamingClass != 0;
254 }
255
256 /// \brief Returns the 'naming class' for this lookup, i.e. the
257 /// class which was looked into to find these results.
258 ///
259 /// C++0x [class.access.base]p5:
260 /// The access to a member is affected by the class in which the
261 /// member is named. This naming class is the class in which the
262 /// member name was looked up and found. [Note: this class can be
263 /// explicit, e.g., when a qualified-id is used, or implicit,
264 /// e.g., when a class member access operator (5.2.5) is used
265 /// (including cases where an implicit "this->" is added). If both
266 /// a class member access operator and a qualified-id are used to
267 /// name the member (as in p->T::m), the class naming the member
268 /// is the class named by the nested-name-specifier of the
269 /// qualified-id (that is, T). -- end note ]
270 ///
271 /// This is set by the lookup routines when they find results in a class.
272 CXXRecordDecl *getNamingClass() const {
273 return NamingClass;
274 }
275
276 /// \brief Sets the 'naming class' for this lookup.
277 void setNamingClass(CXXRecordDecl *Record) {
278 NamingClass = Record;
279 }
280
John McCall46460a62010-01-20 21:53:11 +0000281 /// \brief Add a declaration to these results with its natural access.
John McCalleec51cf2010-01-20 00:46:10 +0000282 /// Does not test the acceptance criteria.
John McCall7d384dd2009-11-18 07:57:50 +0000283 void addDecl(NamedDecl *D) {
John McCall46460a62010-01-20 21:53:11 +0000284 addDecl(D, D->getAccess());
285 }
286
287 /// \brief Add a declaration to these results with the given access.
288 /// Does not test the acceptance criteria.
289 void addDecl(NamedDecl *D, AccessSpecifier AS) {
290 Decls.addDecl(D, AS);
John McCall7d384dd2009-11-18 07:57:50 +0000291 ResultKind = Found;
292 }
293
294 /// \brief Add all the declarations from another set of lookup
295 /// results.
296 void addAllDecls(const LookupResult &Other) {
John McCalleec51cf2010-01-20 00:46:10 +0000297 Decls.append(Other.Decls.begin(), Other.Decls.end());
John McCall7d384dd2009-11-18 07:57:50 +0000298 ResultKind = Found;
299 }
300
Douglas Gregor7d3f5762010-01-15 01:44:47 +0000301 /// \brief Determine whether no result was found because we could not
302 /// search into dependent base classes of the current instantiation.
303 bool wasNotFoundInCurrentInstantiation() const {
304 return ResultKind == NotFoundInCurrentInstantiation;
305 }
306
307 /// \brief Note that while no result was found in the current instantiation,
308 /// there were dependent base classes that could not be searched.
309 void setNotFoundInCurrentInstantiation() {
310 assert(ResultKind == NotFound && Decls.empty());
311 ResultKind = NotFoundInCurrentInstantiation;
312 }
313
John McCall68263142009-11-18 22:49:29 +0000314 /// \brief Resolves the result kind of the lookup, possibly hiding
315 /// decls.
John McCall7d384dd2009-11-18 07:57:50 +0000316 ///
317 /// This should be called in any environment where lookup might
318 /// generate multiple lookup results.
319 void resolveKind();
320
John McCall68263142009-11-18 22:49:29 +0000321 /// \brief Re-resolves the result kind of the lookup after a set of
322 /// removals has been performed.
323 void resolveKindAfterFilter() {
Douglas Gregor7d3f5762010-01-15 01:44:47 +0000324 if (Decls.empty()) {
325 if (ResultKind != NotFoundInCurrentInstantiation)
326 ResultKind = NotFound;
327 } else {
John McCall68263142009-11-18 22:49:29 +0000328 ResultKind = Found;
329 resolveKind();
330 }
331 }
332
John McCallba135432009-11-21 08:51:07 +0000333 template <class DeclClass>
334 DeclClass *getAsSingle() const {
335 if (getResultKind() != Found) return 0;
336 return dyn_cast<DeclClass>(getFoundDecl());
337 }
338
John McCall7d384dd2009-11-18 07:57:50 +0000339 /// \brief Fetch the unique decl found by this lookup. Asserts
340 /// that one was found.
341 ///
342 /// This is intended for users who have examined the result kind
343 /// and are certain that there is only one result.
344 NamedDecl *getFoundDecl() const {
345 assert(getResultKind() == Found
346 && "getFoundDecl called on non-unique result");
John McCalleec51cf2010-01-20 00:46:10 +0000347 return (*begin())->getUnderlyingDecl();
John McCall7d384dd2009-11-18 07:57:50 +0000348 }
349
John McCall68263142009-11-18 22:49:29 +0000350 /// Fetches a representative decl. Useful for lazy diagnostics.
351 NamedDecl *getRepresentativeDecl() const {
352 assert(!Decls.empty() && "cannot get representative of empty set");
John McCalleec51cf2010-01-20 00:46:10 +0000353 return *begin();
John McCall68263142009-11-18 22:49:29 +0000354 }
355
John McCall7d384dd2009-11-18 07:57:50 +0000356 /// \brief Asks if the result is a single tag decl.
357 bool isSingleTagDecl() const {
358 return getResultKind() == Found && isa<TagDecl>(getFoundDecl());
359 }
360
361 /// \brief Make these results show that the name was found in
362 /// base classes of different types.
363 ///
364 /// The given paths object is copied and invalidated.
365 void setAmbiguousBaseSubobjectTypes(CXXBasePaths &P);
366
367 /// \brief Make these results show that the name was found in
368 /// distinct base classes of the same type.
369 ///
370 /// The given paths object is copied and invalidated.
371 void setAmbiguousBaseSubobjects(CXXBasePaths &P);
372
373 /// \brief Make these results show that the name was found in
374 /// different contexts and a tag decl was hidden by an ordinary
375 /// decl in a different context.
376 void setAmbiguousQualifiedTagHiding() {
377 setAmbiguous(AmbiguousTagHiding);
378 }
379
380 /// \brief Clears out any current state.
381 void clear() {
382 ResultKind = NotFound;
383 Decls.clear();
384 if (Paths) deletePaths(Paths);
385 Paths = NULL;
386 }
387
388 /// \brief Clears out any current state and re-initializes for a
389 /// different kind of lookup.
390 void clear(Sema::LookupNameKind Kind) {
391 clear();
392 LookupKind = Kind;
John McCall1d7c5282009-12-18 10:40:03 +0000393 configure();
John McCall7d384dd2009-11-18 07:57:50 +0000394 }
395
396 void print(llvm::raw_ostream &);
397
398 /// Suppress the diagnostics that would normally fire because of this
399 /// lookup. This happens during (e.g.) redeclaration lookups.
400 void suppressDiagnostics() {
401 Diagnose = false;
402 }
403
404 /// Sets a 'context' source range.
405 void setContextRange(SourceRange SR) {
406 NameContextRange = SR;
407 }
408
409 /// Gets the source range of the context of this name; for C++
410 /// qualified lookups, this is the source range of the scope
411 /// specifier.
412 SourceRange getContextRange() const {
413 return NameContextRange;
414 }
415
416 /// Gets the location of the identifier. This isn't always defined:
417 /// sometimes we're doing lookups on synthesized names.
418 SourceLocation getNameLoc() const {
419 return NameLoc;
420 }
421
Douglas Gregor546be3c2009-12-30 17:04:44 +0000422 /// \brief Get the Sema object that this lookup result is searching
423 /// with.
424 Sema &getSema() const { return SemaRef; }
425
John McCall68263142009-11-18 22:49:29 +0000426 /// A class for iterating through a result set and possibly
427 /// filtering out results. The results returned are possibly
428 /// sugared.
429 class Filter {
430 LookupResult &Results;
John McCalleec51cf2010-01-20 00:46:10 +0000431 LookupResult::iterator I;
John McCallf7a1a742009-11-24 19:00:30 +0000432 bool Changed;
John McCall68263142009-11-18 22:49:29 +0000433#ifndef NDEBUG
434 bool CalledDone;
435#endif
436
437 friend class LookupResult;
438 Filter(LookupResult &Results)
John McCalleec51cf2010-01-20 00:46:10 +0000439 : Results(Results), I(Results.begin()), Changed(false)
John McCall68263142009-11-18 22:49:29 +0000440#ifndef NDEBUG
441 , CalledDone(false)
442#endif
443 {}
444
445 public:
446#ifndef NDEBUG
447 ~Filter() {
448 assert(CalledDone &&
449 "LookupResult::Filter destroyed without done() call");
450 }
451#endif
452
453 bool hasNext() const {
John McCalleec51cf2010-01-20 00:46:10 +0000454 return I != Results.end();
John McCall68263142009-11-18 22:49:29 +0000455 }
456
457 NamedDecl *next() {
John McCalleec51cf2010-01-20 00:46:10 +0000458 assert(I != Results.end() && "next() called on empty filter");
459 return *I++;
John McCall68263142009-11-18 22:49:29 +0000460 }
461
462 /// Erase the last element returned from this iterator.
463 void erase() {
John McCalleec51cf2010-01-20 00:46:10 +0000464 Results.Decls.erase(--I);
John McCallf7a1a742009-11-24 19:00:30 +0000465 Changed = true;
466 }
467
John McCalleec51cf2010-01-20 00:46:10 +0000468 /// Replaces the current entry with the given one, preserving the
469 /// access bits.
John McCallf7a1a742009-11-24 19:00:30 +0000470 void replace(NamedDecl *D) {
John McCalleec51cf2010-01-20 00:46:10 +0000471 Results.Decls.replace(I-1, D);
472 Changed = true;
473 }
474
475 /// Replaces the current entry with the given one.
476 void replace(NamedDecl *D, AccessSpecifier AS) {
477 Results.Decls.replace(I-1, D, AS);
John McCallf7a1a742009-11-24 19:00:30 +0000478 Changed = true;
John McCall68263142009-11-18 22:49:29 +0000479 }
480
481 void done() {
482#ifndef NDEBUG
483 assert(!CalledDone && "done() called twice");
484 CalledDone = true;
485#endif
486
John McCallf7a1a742009-11-24 19:00:30 +0000487 if (Changed)
John McCall68263142009-11-18 22:49:29 +0000488 Results.resolveKindAfterFilter();
489 }
490 };
491
492 /// Create a filter for this result set.
493 Filter makeFilter() {
494 return Filter(*this);
495 }
496
John McCall7d384dd2009-11-18 07:57:50 +0000497private:
498 void diagnose() {
499 if (isAmbiguous())
500 SemaRef.DiagnoseAmbiguousLookup(*this);
John McCall92f88312010-01-23 00:46:32 +0000501 else if (isClassLookup() && SemaRef.getLangOptions().AccessControl)
502 SemaRef.CheckAccess(*this);
John McCall7d384dd2009-11-18 07:57:50 +0000503 }
504
505 void setAmbiguous(AmbiguityKind AK) {
506 ResultKind = Ambiguous;
507 Ambiguity = AK;
508 }
509
510 void addDeclsFromBasePaths(const CXXBasePaths &P);
John McCall1d7c5282009-12-18 10:40:03 +0000511 void configure();
John McCall7d384dd2009-11-18 07:57:50 +0000512
513 // Sanity checks.
514 void sanity() const {
515 assert(ResultKind != NotFound || Decls.size() == 0);
516 assert(ResultKind != Found || Decls.size() == 1);
John McCall7453ed42009-11-22 00:44:51 +0000517 assert(ResultKind != FoundOverloaded || Decls.size() > 1 ||
John McCall97d9e212009-11-22 20:57:36 +0000518 (Decls.size() == 1 &&
John McCalleec51cf2010-01-20 00:46:10 +0000519 isa<FunctionTemplateDecl>((*begin())->getUnderlyingDecl())));
John McCall7453ed42009-11-22 00:44:51 +0000520 assert(ResultKind != FoundUnresolvedValue || sanityCheckUnresolved());
521 assert(ResultKind != Ambiguous || Decls.size() > 1 ||
522 (Decls.size() == 1 && Ambiguity == AmbiguousBaseSubobjects));
John McCall7d384dd2009-11-18 07:57:50 +0000523 assert((Paths != NULL) == (ResultKind == Ambiguous &&
524 (Ambiguity == AmbiguousBaseSubobjectTypes ||
525 Ambiguity == AmbiguousBaseSubobjects)));
526 }
527
John McCall7453ed42009-11-22 00:44:51 +0000528 bool sanityCheckUnresolved() const {
John McCalleec51cf2010-01-20 00:46:10 +0000529 for (iterator I = begin(), E = end(); I != E; ++I)
John McCall7453ed42009-11-22 00:44:51 +0000530 if (isa<UnresolvedUsingValueDecl>(*I))
531 return true;
532 return false;
533 }
534
John McCall7d384dd2009-11-18 07:57:50 +0000535 static void deletePaths(CXXBasePaths *);
536
537 // Results.
538 LookupResultKind ResultKind;
539 AmbiguityKind Ambiguity; // ill-defined unless ambiguous
John McCalleec51cf2010-01-20 00:46:10 +0000540 UnresolvedSet<8> Decls;
John McCall7d384dd2009-11-18 07:57:50 +0000541 CXXBasePaths *Paths;
John McCall92f88312010-01-23 00:46:32 +0000542 CXXRecordDecl *NamingClass;
John McCall7d384dd2009-11-18 07:57:50 +0000543
544 // Parameters.
545 Sema &SemaRef;
546 DeclarationName Name;
547 SourceLocation NameLoc;
548 SourceRange NameContextRange;
549 Sema::LookupNameKind LookupKind;
John McCall1d7c5282009-12-18 10:40:03 +0000550 ResultFilter IsAcceptableFn; // set by configure()
551 unsigned IDNS; // set by configure()
552
John McCall7d384dd2009-11-18 07:57:50 +0000553 bool Redecl;
554
555 /// \brief True if tag declarations should be hidden if non-tags
556 /// are present
557 bool HideTags;
558
559 bool Diagnose;
560};
561
Douglas Gregor546be3c2009-12-30 17:04:44 +0000562 /// \brief Consumes visible declarations found when searching for
563 /// all visible names within a given scope or context.
564 ///
565 /// This abstract class is meant to be subclassed by clients of \c
566 /// Sema::LookupVisibleDecls(), each of which should override the \c
567 /// FoundDecl() function to process declarations as they are found.
568 class VisibleDeclConsumer {
569 public:
570 /// \brief Destroys the visible declaration consumer.
571 virtual ~VisibleDeclConsumer();
572
573 /// \brief Invoked each time \p Sema::LookupVisibleDecls() finds a
574 /// declaration visible from the current scope or context.
575 ///
576 /// \param ND the declaration found.
577 ///
578 /// \param Hiding a declaration that hides the declaration \p ND,
579 /// or NULL if no such declaration exists.
Douglas Gregor0cc84042010-01-14 15:47:35 +0000580 ///
581 /// \param InBaseClass whether this declaration was found in base
582 /// class of the context we searched.
583 virtual void FoundDecl(NamedDecl *ND, NamedDecl *Hiding,
584 bool InBaseClass) = 0;
Douglas Gregor546be3c2009-12-30 17:04:44 +0000585 };
John McCall7d384dd2009-11-18 07:57:50 +0000586}
587
588#endif