hokein added a comment.

though this is a hack implementation, the result seems promising to me, so I 
post it for initial thoughts.



================
Comment at: clang/include/clang/Sema/Sema.h:3307
 
   Decl *ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK,
                  SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name,
----------------
This is the key place where it returns the underlying decl.

Alternatively, we could return the UsingDecl as the result (there are only 4 
places using it, might be possible to check/verify/adjust all caller place, I 
feel a bit scary about it, as the name indicates, caller might assume the 
return Decl is a `TagDecl`, e.g. the 
[case](https://github.com/llvm/llvm-project/blob/main/clang/lib/Sema/SemaTemplate.cpp#L10195))


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141280/new/

https://reviews.llvm.org/D141280

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to