llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.23k stars 11.66k forks source link

Question about alignment of binary operators #91066

Open manos-msdn opened 4 months ago

manos-msdn commented 4 months ago

I am trying this config file using vscode and the Microsoft C++ extension https://github.com/Microsoft/vscode-cpptools

---
Language: Cpp
Standard: Latest
BasedOnStyle: LLVM 
AlignOperands: Align
BreakBeforeBinaryOperators: None
...

I'd expect this formatted output with the && operators at the end of each line and each one followed by a new line like this:

image

but it's not happening, I am getting them all in one line, is there anything else I need to include to get this result? Thanks

image

In my local c_cpp_properties.json file I have set up the compiler to be the gcc.exe (using windows 10) - not sure if that matters about formatting

  "compilerPath": "C:\\msys64\\ucrt64\\bin\\gcc.exe",
  "intelliSenseMode": "gcc-x64"
llvmbot commented 4 months ago

@llvm/issue-subscribers-clang-format

Author: Manos (manos-msdn)

I am trying this config file: ``` --- Language: Cpp Standard: Latest BasedOnStyle: LLVM AlignOperands: Align BreakBeforeBinaryOperators: None ... ``` I'd expect this formatted output with the && operators at the end of each line and each one followed by a new line like this: ![image](https://github.com/llvm/llvm-project/assets/42238751/3e1a9906-8f1d-4c28-a81d-5c0d915c23c5) but it's not happening, I am getting them all in one line, is there anything else I need to include to get this result? Thanks ![image](https://github.com/llvm/llvm-project/assets/42238751/174020e9-f1c5-4a8b-8b42-eb7d9f18ba61)
manos-msdn commented 4 months ago

Closed by accident

owenca commented 2 months ago

See #95013.