[PATCH] D141280: [clang][wip] Build UsingType for elaborated type specifiers.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 9 06:46:15 PST 2023


hokein created this revision.
Herald added a subscriber: kadircet.
Herald added a project: All.
hokein requested review of this revision.
Herald added projects: clang, clang-tools-extra.

This is a hacky prototype to support building UsingType for elaborated
type specifiers:

  namespace ns { class Foo {}; }
  
  using ns::Foo;
  
  // The TypeLoc of `Foo` below should be a ElaboratedTypeLoc with an
  inner UsingTypeLoc rather than the underlying `CXXRecordTypeLoc`
  class Foo foo;

It seems to work, and improves some diagnostics.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D141280

Files:
  clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp
  clang/include/clang/Sema/DeclSpec.h
  clang/include/clang/Sema/Sema.h
  clang/lib/Parse/ParseDecl.cpp
  clang/lib/Parse/ParseDeclCXX.cpp
  clang/lib/Sema/SemaDecl.cpp
  clang/lib/Sema/SemaType.cpp
  clang/test/CXX/drs/dr2xx.cpp
  clang/test/CXX/drs/dr4xx.cpp
  clang/test/SemaCXX/using-decl-1.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141280.487415.patch
Type: text/x-patch
Size: 9927 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230109/90aa6a5a/attachment.bin>


More information about the cfe-commits mailing list