[all-commits] [llvm/llvm-project] df2a4e: [clang] Expose CoawaitExpr's operand in the AST

Nathan Ridge via All-commits all-commits at lists.llvm.org
Tue May 17 05:14:31 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: df2a4eae6b190806c0b96ef3312975e1c97dbda0
      https://github.com/llvm/llvm-project/commit/df2a4eae6b190806c0b96ef3312975e1c97dbda0
  Author: Nathan Ridge <zeratul976 at hotmail.com>
  Date:   2022-05-17 (Tue, 17 May 2022)

  Changed paths:
    M clang-tools-extra/clangd/unittests/FindTargetTests.cpp
    M clang/include/clang/AST/ExprCXX.h
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Sema/SemaChecking.cpp
    M clang/lib/Sema/SemaCoroutine.cpp
    M clang/lib/Sema/TreeTransform.h
    M clang/test/AST/coroutine-locals-cleanup-exp-namespace.cpp
    M clang/test/AST/coroutine-locals-cleanup.cpp
    M clang/test/AST/coroutine-source-location-crash-exp-namespace.cpp
    M clang/test/AST/coroutine-source-location-crash.cpp
    A clang/test/SemaCXX/co_await-ast.cpp

  Log Message:
  -----------
  [clang] Expose CoawaitExpr's operand in the AST

Previously the Expr returned by getOperand() was actually the
subexpression common to the "ready", "suspend", and "resume"
expressions, which often isn't just the operand but e.g.
await_transform() called on the operand.

It's important for the AST to expose the operand as written
in the source for traversals and tools like clangd to work
correctly.

Fixes https://github.com/clangd/clangd/issues/939

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




More information about the All-commits mailing list