[all-commits] [llvm/llvm-project] 6f19f9: [lldb][Test] Replace expect() with expect_expr() i...

Michael137 via All-commits all-commits at lists.llvm.org
Mon Aug 22 05:28:11 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6f19f98710f897ecaf148f42da6eec9d14631449
      https://github.com/llvm/llvm-project/commit/6f19f98710f897ecaf148f42da6eec9d14631449
  Author: Michael Buch <michaelbuch12 at gmail.com>
  Date:   2022-08-22 (Mon, 22 Aug 2022)

  Changed paths:
    M lldb/test/API/lang/cpp/namespace/TestNamespaceLookup.py

  Log Message:
  -----------
  [lldb][Test] Replace expect() with expect_expr() in TestNamespaceLookup.py

This will be useful in preparation for some reshuffling
of assertions in this file since we won't have to
adjust the persitent variable names during the process.

sed commands:
```
s/expect("expr -- /expect_expr("/g
s/startstr="(int) [$0-9]* = /result_type="int", result_value="/g
```

**Testing**

* API tests still pass

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


  Commit: 09f608fda51ca9dd2d88c2985bad1cfc1e36251e
      https://github.com/llvm/llvm-project/commit/09f608fda51ca9dd2d88c2985bad1cfc1e36251e
  Author: Michael Buch <michaelbuch12 at gmail.com>
  Date:   2022-08-22 (Mon, 22 Aug 2022)

  Changed paths:
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
    M lldb/test/API/lang/cpp/namespace/TestNamespaceLookup.py

  Log Message:
  -----------
  [lldb][ClangExpression] Remove storage-class check when creating AsmLabel

This check was put in place to prevent static functions
from translation units outside the one that the current
expression is evaluated from taking precedence over functions
in the global namespace. However, this is really a different
bug. LLDB lumps functions from all CUs into a single AST and
ends up picking the file-static even when C++ context rules
wouldn't allow that to happen.

This patch removes the check so we apply the AsmLabel to all
FunctionDecls we create from DWARF if we have a linkage name
available. This makes the code-path easier to reason about and
allows calling static functions in contexts where we previously
would've chosen the wrong function.

We also flip the XFAILs in the API test to reflect what effect
this change has.

**Testing**

* Fixed API tests and added XFAIL

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


Compare: https://github.com/llvm/llvm-project/compare/494b6c46d6aa...09f608fda51c


More information about the All-commits mailing list