Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
Qt Creator 4.5.2, Qt Creator 4.11.1
-
None
Description
It seems like whenever you use C++17 structured binding syntax, the indentation for the whole FILE beginning at that line breaks badly. Whenever you press enter, the cursor would be indented to a fixed (and unreasonable) position. The issue persists even after the end of the function containing the offending statement.
I attached two screenshots, demonstrating the buggy cursor position when you press enter after the offending statement, and one when you press enter at the end of the file.
It is especially annoying since the bug affects the whole file, not only the line immediately after it or the scope containing the statement, and it basically breaks all the user experience as an IDE...
Plugins: I have C++ beautifier, ClangCodeModel, ClangRefactoring, ClassView and CppEditor turned on, but I tried turning off each one and it doesn't help. When I turned on ClangFormat this specific issue is fixed but it introduced a lot of new issues elsewhere (the indentation gets added or removed randomly as you type, not sure if it is intentional or not), so I decided to not use it. It would be nice that this bug could be fixed without forcing users to turn on ClangFormat.
Attachments
Issue Links
- duplicates
-
QTCREATORBUG-23959 Autoindent parser fails to correctly indent c++14 code.
- Closed
- is duplicated by
-
QTCREATORBUG-23941 Incorrect indents with structured bindings
- Closed