llvm-project/clang/lib/AST
Douglas Gregor 5253768ada Introduce a representation for types that we referred to via a
qualified name, e.g., 

  foo::x

so that we retain the nested-name-specifier as written in the source
code and can reproduce that qualified name when printing the types
back (e.g., in diagnostics). This is PR3493, which won't be complete
until finished the other tasks mentioned near the end of this commit.

The parser's representation of nested-name-specifiers, CXXScopeSpec,
is now a bit fatter, because it needs to contain the scopes that
precede each '::' and keep track of whether the global scoping
operator '::' was at the beginning. For example, we need to keep track
of the leading '::', 'foo', and 'bar' in
 
  ::foo::bar::x

The Action's CXXScopeTy * is no longer a DeclContext *. It's now the
opaque version of the new NestedNameSpecifier, which contains a single
component of a nested-name-specifier (either a DeclContext * or a Type
*, bitmangled). 

The new sugar type QualifiedNameType composes a sequence of
NestedNameSpecifiers with a representation of the type we're actually
referring to. At present, we only build QualifiedNameType nodes within
Sema::getTypeName. This will be extended to other type-constructing
actions (e.g., ActOnClassTemplateId).

Also on the way: QualifiedDeclRefExprs will also store a sequence of
NestedNameSpecifiers, so that we can print out the property
nested-name-specifier. I expect to also use this for handling
dependent names like Fibonacci<I - 1>::value.

llvm-svn: 67265
2009-03-19 00:18:19 +00:00
..
APValue.cpp Remove some now-unneeded calls to llvm::errs().flush(). 2009-03-10 18:00:19 +00:00
ASTConsumer.cpp Remove unused ASTConsumer::HandleTopLevelDeclaration 2008-07-25 22:39:30 +00:00
ASTContext.cpp Introduce a representation for types that we referred to via a 2009-03-19 00:18:19 +00:00
Builtins.cpp Almost complete implementation of rvalue references. One bug, and a few unclear areas. Maybe Doug can shed some light on some of the fixmes. 2009-03-16 23:22:08 +00:00
CFG.cpp Fixup spacing. 2009-02-26 08:00:25 +00:00
CMakeLists.txt Introduce a representation for types that we referred to via a 2009-03-19 00:18:19 +00:00
Decl.cpp BlockDecl::Destroy now deallocates BlockDecl's array of ParmVarDecl*. 2009-03-13 23:17:24 +00:00
DeclBase.cpp rename PrettyStackTraceDecl -> PrettyStackTraceActionsDecl. 2009-03-05 08:00:35 +00:00
DeclCXX.cpp Almost complete implementation of rvalue references. One bug, and a few unclear areas. Maybe Doug can shed some light on some of the fixmes. 2009-03-16 23:22:08 +00:00
DeclGroup.cpp Remove DeclGroupOwningRef, since we intend for declarations to be owned 2009-02-13 19:06:18 +00:00
DeclObjC.cpp Fix <rdar://problem/6619539> incompatible pointer types sending 'XCElementSpacer *', expected 'XCElement *' (not handling protocol signatures correctly?). 2009-03-01 16:12:44 +00:00
DeclSerialization.cpp Refactor FieldDecls to be ValueDecls instead of NamedDecls. 2009-02-10 20:06:48 +00:00
DeclTemplate.cpp Implement template instantiation for ClassTemplateSpecializationTypes, 2009-03-09 23:48:35 +00:00
DeclarationName.cpp Remove dead DeclarationName constructors that involving knowing about the 2009-03-14 00:27:40 +00:00
Expr.cpp Almost complete implementation of rvalue references. One bug, and a few unclear areas. Maybe Doug can shed some light on some of the fixmes. 2009-03-16 23:22:08 +00:00
ExprCXX.cpp Implement template instantiation for several more kinds of expressions: 2009-03-13 21:01:28 +00:00
ExprConstant.cpp Almost complete implementation of rvalue references. One bug, and a few unclear areas. Maybe Doug can shed some light on some of the fixmes. 2009-03-16 23:22:08 +00:00
InheritViz.cpp [LLVM up] Update for raw_fd_ostream change. This fixes a FIXME that 2008-11-13 05:09:21 +00:00
Makefile Build system changes to use TableGen to generate the various 2009-03-16 23:06:59 +00:00
NestedNameSpecifier.cpp Introduce a representation for types that we referred to via a 2009-03-19 00:18:19 +00:00
ParentMap.cpp Dead stores checker: Fix <rdar://problem/6506065> by being more selective when say that a store is dead even though the computed value is used in the enclosing expression. 2009-01-20 00:47:45 +00:00
Stmt.cpp add some spaces :) 2009-03-11 23:09:16 +00:00
StmtDumper.cpp Semantic analysis, ASTs, and unqualified name lookup support for C++ 2009-02-03 19:21:40 +00:00
StmtIterator.cpp Fix StmtIterator bug reported in PR 3780 where a VLA within a DeclGroup would 2009-03-11 18:17:16 +00:00
StmtPrinter.cpp Remove some now-unneeded calls to llvm::errs().flush(). 2009-03-10 18:00:19 +00:00
StmtSerialization.cpp Implement template instantiation for several more kinds of expressions: 2009-03-13 21:01:28 +00:00
StmtViz.cpp Migrate DeclStmt over to using a DeclGroup instead of a pointer to a ScopedDecl*. 2008-10-07 23:09:49 +00:00
TranslationUnit.cpp fix long lines. 2009-02-16 22:33:34 +00:00
Type.cpp Introduce a representation for types that we referred to via a 2009-03-19 00:18:19 +00:00
TypeSerialization.cpp Introduce a representation for types that we referred to via a 2009-03-19 00:18:19 +00:00