SuccessChanges

Summary

  1. [clangd] Index refs to main-file symbols as well (details)
  2. [clang] Fix visitation of ConceptSpecializationExpr in constrained-parameter (details)
  3. [Attributor][FIX] Handle function pointers properly in AANonNull (details)
  4. [Attributor][NFC] Directly return proper type to avoid casts (details)
  5. [Attributor] We (should) keep the CG updated so we can mark it as preserved (details)
  6. [Attributor] Bail early if AAMemoryLocation cannot derive anything (details)
  7. DebugInfo: Emit class template parameters first, before members (details)
  8. PR44685: DebugInfo: Handle address-use-invalid type units referencing non-type units (details)
Commit 15673d748acd8f26bdeee18c0aa18f44c775d738 by zeratul976
[clangd] Index refs to main-file symbols as well

Summary: This will be needed to support call hierarchy

Reviewers: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D83536
The file was modifiedclang-tools-extra/clangd/ClangdServer.cpp
The file was modifiedclang-tools-extra/clangd/index/SymbolCollector.cpp
The file was modifiedclang-tools-extra/clangd/ClangdServer.h
The file was modifiedclang-tools-extra/clangd/index/FileIndex.cpp
The file was modifiedclang-tools-extra/clangd/index/SymbolCollector.h
The file was modifiedclang-tools-extra/clangd/index/FileIndex.h
The file was modifiedclang-tools-extra/clangd/index/Background.h
The file was modifiedclang-tools-extra/clangd/tool/ClangdMain.cpp
The file was modifiedclang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp
The file was modifiedclang-tools-extra/clangd/index/Background.cpp
The file was modifiedclang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp
Commit 00d7b7d014f90aaaacaef6f9c778614b09356bf0 by zeratul976
[clang] Fix visitation of ConceptSpecializationExpr in constrained-parameter

Summary: RecursiveASTVisitor needs to traverse TypeConstraint::ImmediatelyDeclaredConstraint

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D84136
The file was addedclang/unittests/Tooling/RecursiveASTVisitorTests/Concept.cpp
The file was modifiedclang/include/clang/AST/RecursiveASTVisitor.h
The file was modifiedclang/unittests/Tooling/CMakeLists.txt
The file was modifiedclang-tools-extra/clangd/unittests/FindTargetTests.cpp
Commit b27bdf955a74e1050645ef5482498a834e9dfc1e by johannes
[Attributor][FIX] Handle function pointers properly in AANonNull

Before we tired to create a dominator tree for a declaration when we
wanted to determine if the function pointer is `nonnull`. We now avoid
looking at global values if `Value::getPointerDereferenceableBytes` not
already determined `nonnull`.
The file was modifiedllvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll
The file was modifiedllvm/test/Transforms/Attributor/nonnull.ll
The file was modifiedllvm/test/Transforms/Attributor/callbacks.ll
The file was modifiedllvm/test/Transforms/Attributor/misc.ll
The file was modifiedllvm/lib/Transforms/IPO/AttributorAttributes.cpp
The file was modifiedllvm/test/Transforms/Attributor/liveness.ll
Commit 858c75f7d19c14002eb81bcbc747bf708f92b1a9 by johannes
[Attributor][NFC] Directly return proper type to avoid casts
The file was modifiedllvm/include/llvm/Transforms/IPO/Attributor.h
The file was modifiedllvm/lib/Transforms/IPO/AttributorAttributes.cpp
Commit 1d99c3d7073888517e3557c1b522ed273bbe188c by johannes
[Attributor] We (should) keep the CG updated so we can mark it as preserved
The file was modifiedllvm/lib/Transforms/IPO/Attributor.cpp
Commit 8abd69aa9e8c21b9958f531b03ad9801ec850154 by johannes
[Attributor] Bail early if AAMemoryLocation cannot derive anything

Before this change we looked through all memory operations in a function
even if the first was an unknown call that could do anything. This did
cost a lot of time but there is little use to do so. We also avoid
creating AAs for things that we would have looked at in case no other AA
will; that is the reason for the test changes.

Running only the attributor-cgscc pass on a IR version of
`llvm-test-suite/MultiSource/Applications/SPASS/clause.c` reduced the
time we spend in `AAMemoryLocation::update` from 4% total to
0.9% (disclaimer: no accurate measurements).
The file was modifiedllvm/test/Transforms/Attributor/dereferenceable-1.ll
The file was modifiedllvm/test/Transforms/Attributor/noreturn_async.ll
The file was modifiedllvm/test/Transforms/Attributor/heap_to_stack.ll
The file was modifiedllvm/lib/Transforms/IPO/AttributorAttributes.cpp
The file was modifiedllvm/test/Transforms/Attributor/liveness.ll
Commit 24c3dabef4436ec6436fb80e0672577ec52159ba by dblaikie
DebugInfo: Emit class template parameters first, before members

This reads more like what you'd expect the DWARF to look like (from the
lexical order of C++ - template parameters come before members, etc),
and also happens to make it easier to tickle (& thus test) a bug related
to type units and Split DWARF I'm about to fix.
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
The file was modifiedllvm/test/DebugInfo/Generic/template-recursive-void.ll
Commit be3ef93bf58aa5546c7baadfb21d43b75fbb4e24 by dblaikie
PR44685: DebugInfo: Handle address-use-invalid type units referencing non-type units

Theory was that we should never reach a non-type unit (eg: type in an
anonymous namespace) when we're already in the invalid "encountered an
address-use, so stop emitting types for now, until we throw out the
whole type tree to restart emitting in non-type unit" state. But that's
not the case (prior commit cleaned up one reason this wasn't exposed
sooner - but also makes it easier to test/demonstrate this issue)
The file was addedllvm/test/DebugInfo/X86/addr-tu-to-non-tu.ll
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AddressPool.h
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.h