aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
diff options
context:
space:
mode:
authorFrancois Ferrand <thetypz@gmail.com>2018-06-15 14:22:23 +0200
committerFrancois Ferrand <francois.ferrand@faurecia.com>2020-04-22 17:36:33 +0200
commit5daa25fd7a184524759b6ad065a8bd7e95aa149a (patch)
tree299cc02753575c307f22ec3203590395d1ecf080 /lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
parentd7ab9e7c9b309ebac094bba209f7c15ad5f01768 (diff)
downloadllvm-5daa25fd7a184524759b6ad065a8bd7e95aa149a.zip
llvm-5daa25fd7a184524759b6ad065a8bd7e95aa149a.tar.gz
llvm-5daa25fd7a184524759b6ad065a8bd7e95aa149a.tar.bz2
clang-format: support aligned nested conditionals formatting
When multiple ternary operators are chained, e.g. like an if/else-if/ else-if/.../else sequence, clang-format will keep aligning the colon with the question mark, which increases the indent for each conditionals: int a = condition1 ? result1 : condition2 ? result2 : condition3 ? result3 : result4; This patch detects the situation (e.g. conditionals used in false branch of another conditional), to avoid indenting in that case: int a = condition1 ? result1 : condition2 ? result2 : condition3 ? result3 : result4; When BreakBeforeTernaryOperators is false, this will format like this: int a = condition1 ? result1 : condition2 ? result2 : conditino3 ? result3 : result4;
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h')
0 files changed, 0 insertions, 0 deletions