[all-commits] [llvm/llvm-project] acc80e: [AST] Cleanup on getting the underlying decl of us...

Haojian Wu via All-commits all-commits at lists.llvm.org
Mon May 16 04:58:26 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: acc80ea71bac51458df9d75552651e7c161db64b
      https://github.com/llvm/llvm-project/commit/acc80ea71bac51458df9d75552651e7c161db64b
  Author: Haojian Wu <hokein.wu at gmail.com>
  Date:   2022-05-16 (Mon, 16 May 2022)

  Changed paths:
    M clang/lib/AST/Decl.cpp
    M clang/lib/AST/DeclCXX.cpp

  Log Message:
  -----------
  [AST] Cleanup on getting the underlying decl of using-shdow decl.

This should be a NFC cleanup. It removes a unnecessary loop to get the underlying
decl, and add an assertion.

The underlying decl of a using-shadow decl is always the original declaration
has been brought into the scope, clang never builds a nested using-shadow
decl (see Sema::BuildUsingShadowDecl).

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D123422




More information about the All-commits mailing list