[all-commits] [llvm/llvm-project] 345c48: [libTooling] Fix `getFileRangeForEdit` for inner n...

Alexey Bataev via All-commits all-commits at lists.llvm.org
Fri Apr 5 11:18:54 PDT 2024


  Branch: refs/heads/users/alexey-bataev/spr/slpimprove-minbitwidth-analysis-for-abssminsmaxuminumax
  Home:   https://github.com/llvm/llvm-project
  Commit: 345c4822e4db2aa734b9f8a0b106308288ddc702
      https://github.com/llvm/llvm-project/commit/345c4822e4db2aa734b9f8a0b106308288ddc702
  Author: Eric Li <li.zhe.hua at gmail.com>
  Date:   2024-04-05 (Fri, 05 Apr 2024)

  Changed paths:
    M clang/lib/Tooling/Transformer/SourceCode.cpp
    M clang/unittests/Tooling/SourceCodeTest.cpp

  Log Message:
  -----------
  [libTooling] Fix `getFileRangeForEdit` for inner nested template types (#87673)

When there is `>>` in source from the right brackets of a nested
template, the end location of the inner template points into a scratch
space with a single `>` token. This prevents the lexer from seeing the
`>>` token in the original source.

However, this causes the range to appear to be partially in a macro, and
is problematic if we are trying to avoid ranges with any macro
expansions.

This change detects these split tokens in token ranges, converting it to the
corresponding character range without the expansion.


  Commit: 68b939f9311aaacd4a4fb6e41f86d81857d5c86e
      https://github.com/llvm/llvm-project/commit/68b939f9311aaacd4a4fb6e41f86d81857d5c86e
  Author: Cassie Jones <cassie_jones at apple.com>
  Date:   2024-04-05 (Fri, 05 Apr 2024)

  Changed paths:
    M clang/lib/Driver/Driver.cpp
    A clang/test/Driver/version-build-config.test
    M llvm/CMakeLists.txt
    M llvm/include/llvm/Config/config.h.cmake
    M llvm/include/llvm/Support/CommandLine.h
    M llvm/lib/Support/CommandLine.cpp

  Log Message:
  -----------
  [driver] Make --version show if assertions, etc. are enabled (#87585)

It's useful to have some significant build options visible in the
version when investigating problems with a specific compiler artifact.
This makes it easy to see if assertions, expensive checks, sanitizers,
etc. are enabled when checking a compiler version.

Example config line output:
Build configuration: +unoptimized, +assertions, +asan, +ubsan


  Commit: b7593b2e925fc005fc6248cd8e1a3f019e124c6b
      https://github.com/llvm/llvm-project/commit/b7593b2e925fc005fc6248cd8e1a3f019e124c6b
  Author: Jakub Chlanda <jakub at codeplay.com>
  Date:   2024-04-05 (Fri, 05 Apr 2024)

  Changed paths:
    M llvm/docs/NewPassManager.rst

  Log Message:
  -----------
  [NFC][Doc] Fix typo in new pass manager snippet (#87765)

Add missing closing parenthesis and re-flow the snippet to what clang
format would generate.


  Commit: 30f6eafaa978b4e0211368976fe60f15fa9f0067
      https://github.com/llvm/llvm-project/commit/30f6eafaa978b4e0211368976fe60f15fa9f0067
  Author: Erich Keane <ekeane at nvidia.com>
  Date:   2024-04-05 (Fri, 05 Apr 2024)

  Changed paths:
    M clang/include/clang/AST/ASTNodeTraverser.h
    M clang/include/clang/AST/JSONNodeDumper.h
    A clang/include/clang/AST/OpenACCClause.h
    M clang/include/clang/AST/RecursiveASTVisitor.h
    M clang/include/clang/AST/StmtOpenACC.h
    M clang/include/clang/AST/TextNodeDumper.h
    M clang/include/clang/Serialization/ASTRecordReader.h
    M clang/include/clang/Serialization/ASTRecordWriter.h
    M clang/lib/AST/CMakeLists.txt
    M clang/lib/AST/JSONNodeDumper.cpp
    A clang/lib/AST/OpenACCClause.cpp
    M clang/lib/AST/StmtOpenACC.cpp
    M clang/lib/AST/StmtPrinter.cpp
    M clang/lib/AST/StmtProfile.cpp
    M clang/lib/AST/TextNodeDumper.cpp
    M clang/lib/Sema/SemaOpenACC.cpp
    M clang/lib/Serialization/ASTReader.cpp
    M clang/lib/Serialization/ASTReaderStmt.cpp
    M clang/lib/Serialization/ASTWriter.cpp
    M clang/lib/Serialization/ASTWriterStmt.cpp

  Log Message:
  -----------
  [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (#87675)

As a first step in adding clause support for OpenACC to Semantic
Analysis, this patch adds the 'base' AST nodes required for clauses.

This patch has no functional effect at the moment, but followup patches
will add the semantic analysis of clauses (plus individual clauses).


  Commit: 0cd0aa029647c8d1dba5c3d62f92325576796fa2
      https://github.com/llvm/llvm-project/commit/0cd0aa029647c8d1dba5c3d62f92325576796fa2
  Author: Ian Anderson <iana at apple.com>
  Date:   2024-04-05 (Fri, 05 Apr 2024)

  Changed paths:
    M clang/include/clang/Lex/HeaderSearch.h
    M clang/lib/Lex/HeaderSearch.cpp
    M clang/lib/Serialization/ASTReader.cpp
    M clang/test/Modules/builtin-import.mm
    M clang/test/Modules/import-textual-noguard.mm
    M clang/test/Modules/import-textual.mm
    A clang/test/Modules/multiple-import.m

  Log Message:
  -----------
  [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (#83660)

Once a file has been `#import`'ed, it gets stamped as if it was `#pragma
once` and will not be re-entered, even on #include. This means that any
errant #import of a file designed to be included multiple times, such as
<assert.h>, will incorrectly mark it as include-once and break the
multiple include functionality. Normally this isn't a big problem, e.g.
<assert.h> can't have its NDEBUG mode changed after the first #import,
but it is still mostly functional. However, when clang modules are
involved, this can cause the header to be hidden entirely.

Objective-C code most often uses #import for everything, because it's
required for most Objective-C headers to prevent double inclusion and
redeclaration errors. (It's rare for Objective-C headers to use macro
guards or `#pragma once`.) The problem arises when a submodule includes
a multiple-include header. The "already included" state is global across
all modules (which is necessary so that non-modular headers don't get
compiled into multiple translation units and cause redeclaration
errors). If another module or the main file #import's the same header,
it becomes invisible from then on. If the original submodule is not
imported, the include of the header will effectively do nothing and the
header will be invisible. The only way to actually get the header's
declarations is to somehow figure out which submodule consumed the
header, and import that instead. That's basically impossible since it
depends on exactly which modules were built in which order.

#import is a poor indicator of whether a header is actually
include-once, as the #import is external to the header it applies to,
and requires that all inclusions correctly and consistently use #import
vs #include. When modules are enabled, consider a header marked
`textual` in its module as a stronger indicator of multiple-include than
#import's indication of include-once. This will allow headers like
<assert.h> to always be included when modules are enabled, even if
#import is erroneously used somewhere.


  Commit: c7eede5d4c1c8e0c20337f3f3c9003f59fe5ccd5
      https://github.com/llvm/llvm-project/commit/c7eede5d4c1c8e0c20337f3f3c9003f59fe5ccd5
  Author: Argyrios Kyrtzidis <kyrtzidis at apple.com>
  Date:   2024-04-05 (Fri, 05 Apr 2024)

  Changed paths:
    M clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
    M clang/test/ClangScanDeps/Inputs/removed-args/cdb.json.template
    M clang/test/ClangScanDeps/removed-args.c

  Log Message:
  -----------
  [clang][deps] Remove pgo profile flags from modules (#87724)

These are not necessary when not performing codegen.


  Commit: 0e60cf7f4b66312c09df9412be3efd1e9c891e85
      https://github.com/llvm/llvm-project/commit/0e60cf7f4b66312c09df9412be3efd1e9c891e85
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2024-04-05 (Fri, 05 Apr 2024)

  Changed paths:
    M llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn

  Log Message:
  -----------
  [gn build] Manually port 68b939f9


  Commit: 666fd665e98df1e5c8e8d5be1eb08bf102c0691c
      https://github.com/llvm/llvm-project/commit/666fd665e98df1e5c8e8d5be1eb08bf102c0691c
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2024-04-05 (Fri, 05 Apr 2024)

  Changed paths:
    M llvm/utils/gn/secondary/clang/lib/AST/BUILD.gn

  Log Message:
  -----------
  [gn build] Port 30f6eafaa978


  Commit: 6411aaf99cbfddafdeecb73d9fd7388fcae32293
      https://github.com/llvm/llvm-project/commit/6411aaf99cbfddafdeecb73d9fd7388fcae32293
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2024-04-05 (Fri, 05 Apr 2024)

  Changed paths:
    M llvm/utils/gn/secondary/llvm/unittests/ADT/BUILD.gn

  Log Message:
  -----------
  [gn build] Port e84a757222aa


  Commit: 965e053eb3ba336b6174e6753f138cabc0ea92c2
      https://github.com/llvm/llvm-project/commit/965e053eb3ba336b6174e6753f138cabc0ea92c2
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2024-04-05 (Fri, 05 Apr 2024)

  Changed paths:
    M llvm/utils/gn/secondary/libcxx/include/BUILD.gn

  Log Message:
  -----------
  [gn build] Port f5960c168dfe


  Commit: 5772fc890f7ebda04029ba82af32c9072a1c44b6
      https://github.com/llvm/llvm-project/commit/5772fc890f7ebda04029ba82af32c9072a1c44b6
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2024-04-05 (Fri, 05 Apr 2024)

  Changed paths:
    M llvm/utils/gn/secondary/llvm/lib/TextAPI/BinaryReader/BUILD.gn

  Log Message:
  -----------
  [gn build] Add missing dependency


  Commit: e915b7d8166a870834868bcf7de85cb5e96a08ec
      https://github.com/llvm/llvm-project/commit/e915b7d8166a870834868bcf7de85cb5e96a08ec
  Author: Fangrui Song <i at maskray.me>
  Date:   2024-04-05 (Fri, 05 Apr 2024)

  Changed paths:
    A lld/test/ELF/aarch64-reloc-implicit-addend.test

  Log Message:
  -----------
  [ELF,test] Add test for R_AARCH64_* implicit addends

to support certain static relocations in the REL format. See #87328 for
the armasm need.

Note: `R_AARCH64_{ABS64,PREL32,PREL64}` have been implemented by https://reviews.llvm.org/D120535

Pull Request: https://github.com/llvm/llvm-project/pull/87733


  Commit: 2d42de382c358286cb4f30b06ee0557f66f2e677
      https://github.com/llvm/llvm-project/commit/2d42de382c358286cb4f30b06ee0557f66f2e677
  Author: Alexey Bataev <a.bataev at outlook.com>
  Date:   2024-04-05 (Fri, 05 Apr 2024)

  Changed paths:
    M clang/include/clang/AST/ASTNodeTraverser.h
    M clang/include/clang/AST/JSONNodeDumper.h
    A clang/include/clang/AST/OpenACCClause.h
    M clang/include/clang/AST/RecursiveASTVisitor.h
    M clang/include/clang/AST/StmtOpenACC.h
    M clang/include/clang/AST/TextNodeDumper.h
    M clang/include/clang/Lex/HeaderSearch.h
    M clang/include/clang/Serialization/ASTRecordReader.h
    M clang/include/clang/Serialization/ASTRecordWriter.h
    M clang/lib/AST/CMakeLists.txt
    M clang/lib/AST/JSONNodeDumper.cpp
    A clang/lib/AST/OpenACCClause.cpp
    M clang/lib/AST/StmtOpenACC.cpp
    M clang/lib/AST/StmtPrinter.cpp
    M clang/lib/AST/StmtProfile.cpp
    M clang/lib/AST/TextNodeDumper.cpp
    M clang/lib/Driver/Driver.cpp
    M clang/lib/Lex/HeaderSearch.cpp
    M clang/lib/Sema/SemaOpenACC.cpp
    M clang/lib/Serialization/ASTReader.cpp
    M clang/lib/Serialization/ASTReaderStmt.cpp
    M clang/lib/Serialization/ASTWriter.cpp
    M clang/lib/Serialization/ASTWriterStmt.cpp
    M clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
    M clang/lib/Tooling/Transformer/SourceCode.cpp
    M clang/test/ClangScanDeps/Inputs/removed-args/cdb.json.template
    M clang/test/ClangScanDeps/removed-args.c
    A clang/test/Driver/version-build-config.test
    M clang/test/Modules/builtin-import.mm
    M clang/test/Modules/import-textual-noguard.mm
    M clang/test/Modules/import-textual.mm
    A clang/test/Modules/multiple-import.m
    M clang/unittests/Tooling/SourceCodeTest.cpp
    A lld/test/ELF/aarch64-reloc-implicit-addend.test
    M llvm/CMakeLists.txt
    M llvm/docs/NewPassManager.rst
    M llvm/include/llvm/Config/config.h.cmake
    M llvm/include/llvm/Support/CommandLine.h
    M llvm/lib/Support/CommandLine.cpp
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/utils/gn/secondary/clang/lib/AST/BUILD.gn
    M llvm/utils/gn/secondary/libcxx/include/BUILD.gn
    M llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/TextAPI/BinaryReader/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/ADT/BUILD.gn

  Log Message:
  -----------
  Rebase, address comments

Created using spr 1.3.5


Compare: https://github.com/llvm/llvm-project/compare/13f8f33c7279...2d42de382c35

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list