[all-commits] [llvm/llvm-project] 369c64: [clang] Implement the using_if_exists attribute

Erik Pilkington via All-commits all-commits at lists.llvm.org
Wed Jun 2 07:31:20 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 369c64839946d89cf5697550b6feeea031b2f270
      https://github.com/llvm/llvm-project/commit/369c64839946d89cf5697550b6feeea031b2f270
  Author: Erik Pilkington <erik.pilkington at gmail.com>
  Date:   2021-06-02 (Wed, 02 Jun 2021)

  Changed paths:
    M clang/include/clang/AST/DeclCXX.h
    M clang/include/clang/AST/RecursiveASTVisitor.h
    M clang/include/clang/Basic/Attr.td
    M clang/include/clang/Basic/AttrDocs.td
    M clang/include/clang/Basic/DeclNodes.td
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Sema/Sema.h
    M clang/include/clang/Serialization/ASTBitCodes.h
    M clang/lib/AST/DeclBase.cpp
    M clang/lib/AST/DeclCXX.cpp
    M clang/lib/CodeGen/CGDecl.cpp
    M clang/lib/Sema/SemaDecl.cpp
    M clang/lib/Sema/SemaDeclAttr.cpp
    M clang/lib/Sema/SemaDeclCXX.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
    M clang/lib/Sema/TreeTransform.h
    M clang/lib/Serialization/ASTCommon.cpp
    M clang/lib/Serialization/ASTReaderDecl.cpp
    M clang/lib/Serialization/ASTWriterDecl.cpp
    A clang/test/Parser/using-if-exists-attr.cpp
    M clang/test/SemaCXX/attr-deprecated.cpp
    A clang/test/SemaCXX/using-if-exists.cpp
    M clang/tools/libclang/CIndex.cpp

  Log Message:
  -----------
  [clang] Implement the using_if_exists attribute

This attribute applies to a using declaration, and permits importing a
declaration without knowing if that declaration exists. This is useful
for libc++ C wrapper headers that re-export declarations in std::, in
cases where the base C library doesn't provide all declarations.

This attribute was proposed in http://lists.llvm.org/pipermail/cfe-dev/2020-June/066038.html.

rdar://69313357

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




More information about the All-commits mailing list