[all-commits] [llvm/llvm-project] 15e76e: [clang] Add [is|set]Nested methods to NamespaceDecl

Nathan James via All-commits all-commits at lists.llvm.org
Thu Nov 24 04:44:53 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 15e76eed0c7662f8a4bce849a58637070d3b0a75
      https://github.com/llvm/llvm-project/commit/15e76eed0c7662f8a4bce849a58637070d3b0a75
  Author: Nathan James <n.james93 at hotmail.co.uk>
  Date:   2022-11-24 (Thu, 24 Nov 2022)

  Changed paths:
    M clang/include/clang/AST/Decl.h
    M clang/include/clang/Sema/Sema.h
    M clang/lib/AST/ASTContext.cpp
    M clang/lib/AST/ASTImporter.cpp
    M clang/lib/AST/DeclCXX.cpp
    M clang/lib/AST/ItaniumMangle.cpp
    M clang/lib/AST/JSONNodeDumper.cpp
    M clang/lib/AST/TextNodeDumper.cpp
    M clang/lib/Parse/ParseDeclCXX.cpp
    M clang/lib/Sema/HLSLExternalSemaSource.cpp
    M clang/lib/Sema/SemaDeclCXX.cpp
    M clang/lib/Serialization/ASTReaderDecl.cpp
    M clang/lib/Serialization/ASTWriterDecl.cpp
    M clang/test/AST/ast-dump-decl.cpp
    M clang/test/AST/ast-dump-namespace-json.cpp
    M clang/unittests/Sema/ExternalSemaSourceTest.cpp

  Log Message:
  -----------
  [clang] Add [is|set]Nested methods to NamespaceDecl

Adds support for NamespaceDecl to inform if its part of a nested namespace.
This flag only corresponds to the inner namespaces in a nested namespace declaration.
In this example:
namespace <X>::<Y>::<Z> {}
Only <Y> and <Z> will be classified as nested.

This flag isn't meant for assisting in building the AST, more for static analysis and refactorings.

Reviewed By: aaron.ballman

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




More information about the All-commits mailing list