Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[clang-format] Regression in clang-format version 17 #72785

Closed
prj- opened this issue Nov 19, 2023 · 4 comments · Fixed by #72791 or llvm/llvm-project-release-prs#781
Closed

[clang-format] Regression in clang-format version 17 #72785

prj- opened this issue Nov 19, 2023 · 4 comments · Fixed by #72791 or llvm/llvm-project-release-prs#781

Comments

@prj-
Copy link

prj- commented Nov 19, 2023

$ cat regression.c 
#if defined(PETSC_HAVE_CUDA) || defined(PETSC_HAVE_KOKKOS) || defined(PETSC_HAVE_HIP)
  /* Free memory and set ptr to NULL when succeeded */
  #define PetscSFFree(sf, mtype, ptr) ((PetscErrorCode)((ptr) && ((*(sf)->ops->Free)(mtype, ptr) || ((ptr) = NULL, PETSC_SUCCESS))))
#else
  /* If pure host code, do with less indirection */
  #define PetscSFMalloc(sf, mtype, sz, ptr) PetscMalloc(sz, ptr)
#endif
$ clang-format --style=file:clang-format.txt regression.c
#if defined(PETSC_HAVE_CUDA) || defined(PETSC_HAVE_KOKKOS) || defined(PETSC_HAVE_HIP)
  /* Free memory and set ptr to NULL when succeeded */
  #define PetscSFFree(sf, mtype, ptr) ((PetscErrorCode)((ptr) && ((*(sf)->ops->Free)(mtype, ptr) || ((ptr) = NULL, PETSC_SUCCESS))))
#else
/* If pure host code, do with less indirection */
  #define PetscSFMalloc(sf, mtype, sz, ptr) PetscMalloc(sz, ptr)
#endif
$ clang-format --version
clang-format version 17.0.5

clang-format.txt

@owenca owenca self-assigned this Nov 19, 2023
@owenca
Copy link
Contributor

owenca commented Nov 19, 2023

Bisected to 293e4da.

@owenca
Copy link
Contributor

owenca commented Nov 19, 2023

/cherry-pick 5860d24

@llvmbot
Copy link
Member

llvmbot commented Nov 19, 2023

/branch llvm/llvm-project-release-prs/issue72785

@llvmbot
Copy link
Member

llvmbot commented Nov 19, 2023

/pull-request llvm/llvm-project-release-prs#781

@tru tru moved this from Needs Triage to Needs Review in LLVM Release Status Nov 20, 2023
sr-tream pushed a commit to sr-tream/llvm-project that referenced this issue Nov 20, 2023
tru pushed a commit that referenced this issue Nov 20, 2023
zahiraam pushed a commit to zahiraam/llvm-project that referenced this issue Nov 20, 2023
@tru tru moved this from Needs Review to Done in LLVM Release Status Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment