[all-commits] [llvm/llvm-project] ec483c: [clang][ASTMatcher] Add matcher for 'MacroQualifie...

Ding Fei via All-commits all-commits at lists.llvm.org
Wed Aug 16 03:03:45 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ec483c29a95cbaef460e3c8523af91ee1cc43e55
      https://github.com/llvm/llvm-project/commit/ec483c29a95cbaef460e3c8523af91ee1cc43e55
  Author: dingfei <fding at feysh.com>
  Date:   2023-08-16 (Wed, 16 Aug 2023)

  Changed paths:
    M clang/docs/LibASTMatchersReference.html
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/ASTMatchers/ASTMatchers.h
    M clang/lib/ASTMatchers/ASTMatchersInternal.cpp
    M clang/lib/ASTMatchers/Dynamic/Registry.cpp
    M clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp

  Log Message:
  -----------
  [clang][ASTMatcher] Add matcher for 'MacroQualifiedType'

Add matcher for 'MacroQualifiedType'

Reviewed By: aaron.ballman

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


  Commit: 3b0eeb6cdbd7d8f662f12c4d90bdaee7a01a6354
      https://github.com/llvm/llvm-project/commit/3b0eeb6cdbd7d8f662f12c4d90bdaee7a01a6354
  Author: dingfei <fding at feysh.com>
  Date:   2023-08-16 (Wed, 16 Aug 2023)

  Changed paths:
    M clang/lib/AST/ASTImporter.cpp
    M clang/unittests/AST/ASTImporterTest.cpp

  Log Message:
  -----------
  [clang][ASTImporter] Add import of 'MacroQualifiedType'

Add import of 'MacroQualifiedType'.

Reviewed By: balazske

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


  Commit: eabc7add1f96e0b580cf4acf4f42ed3eb99df47b
      https://github.com/llvm/llvm-project/commit/eabc7add1f96e0b580cf4acf4f42ed3eb99df47b
  Author: dingfei <fding at feysh.com>
  Date:   2023-08-16 (Wed, 16 Aug 2023)

  Changed paths:
    M clang/lib/AST/ASTImporter.cpp
    M clang/unittests/AST/ASTImporterTest.cpp

  Log Message:
  -----------
  [clang][ASTImporter] Remove extra FunctionTemplateDecl introduced by templated friend

An extranous FunctionTemplateDecl is introduced in the following testcase:

  template <typename T> struct A {
    template <typename U> friend void f();
  };

"To" Context:

  ClassTemplateDecl 0x55dae7116618 <input.cc:1:1, col:73> col:30 A
  |-TemplateTypeParmDecl 0x55dae7116490 <col:11, col:20> col:20 typename depth 0 index 0 T
  `-CXXRecordDecl 0x55dae7116550 <col:23, col:73> col:30 struct A definition
    |-DefinitionData empty aggregate standard_layout trivially_copyable pod trivial literal has_constexpr_non_copy_move_ctor can_const_default_init
    | |-DefaultConstructor exists trivial constexpr needs_implicit defaulted_is_constexpr
    | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param
    | |-MoveConstructor exists simple trivial needs_implicit
    | |-CopyAssignment simple trivial has_const_param needs_implicit implicit_has_const_param
    | |-MoveAssignment exists simple trivial needs_implicit
    | `-Destructor simple irrelevant trivial needs_implicit
    |-FunctionTemplateDecl 0x55dae7116a38 parent 0x55dae6fa2b68 <col:35, col:71> col:69 f                            // extranous node
    | |-TemplateTypeParmDecl 0x55dae7116860 <col:45, col:54> col:54 typename depth 1 index 0 U
    | `-FunctionDecl 0x55dae7116968 parent 0x55dae6fa2b68 <col:57, col:71> col:69 f 'void ()'
    |-FriendDecl 0x55dae7116aa0 <col:35, col:71> col:69
    | `-FunctionTemplateDecl 0x55dae7116a38 parent 0x55dae6fa2b68 <col:35, col:71> col:69 f
    |   |-TemplateTypeParmDecl 0x55dae7116860 <col:45, col:54> col:54 typename depth 1 index 0 U
    |   `-FunctionDecl 0x55dae7116968 parent 0x55dae6fa2b68 <col:57, col:71> col:69 f 'void ()'
    `-CXXRecordDecl 0x55dae7116ae0 <col:23, col:30> col:30 implicit struct A

Reviewed By: balazske

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


Compare: https://github.com/llvm/llvm-project/compare/983185d3c71d...eabc7add1f96


More information about the All-commits mailing list