[all-commits] [llvm/llvm-project] 3e66a1: Reland [clang][DeclPrinter] Fix missing semicolon ...

Timo Stripf via All-commits all-commits at lists.llvm.org
Mon Aug 7 15:17:15 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3e66a174dfd2144672cb7e23afb33df109abadd1
      https://github.com/llvm/llvm-project/commit/3e66a174dfd2144672cb7e23afb33df109abadd1
  Author: Timo Stripf <timo.stripf at emmtrix.com>
  Date:   2023-08-07 (Mon, 07 Aug 2023)

  Changed paths:
    M clang/lib/AST/DeclPrinter.cpp
    M clang/test/AST/ast-print-method-decl.cpp

  Log Message:
  -----------
  Reland [clang][DeclPrinter] Fix missing semicolon in AST print for methods that are definitions without having a body

DeclPrinter used FunctionDecl::isThisDeclarationADefinition to decide if the decl requires a semicolon at the end. However, there are several methods without body (that require a semicolon) that are definitions.

Fixes https://github.com/llvm/llvm-project/issues/62996

Initial commit had a failing test case on targets not supporting `__attribute__((alias))`. Added `-triple i386-linux-gnu` to the specific test case.

Reviewed By: aaron.ballman

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




More information about the All-commits mailing list