llvm-project/clang/lib/Format
mydeveloperday c2ec5dd209 [clang-format] Left/Right alignment fixer can cause false positive replacements when they don't actually change anything
Earlier during the development of {D69764} I felt it was no longer necessary to
ensure we were not trying to change code which didn't need to change
and we felt this could be removed, however I'd like to bring this back for now
as I am seeing some false positives in terms of the "replacements"

What I see is the generation of a replacement which is a "No Op" on the original
code, I think this comes about because of the merging of replacements:

```
static const a;
->
const static a;
->
static const a;
```

The replacements don't really merge, in such a way as to identify when we have gone
back to the original

Also remove the Penalty as I'm not using it (and it became marked as set and no used,
I'd rather get rid of it if it means nothing)

I think we need to do this step for now, as many people use the --output-replacements-xml
to identify that the file "needs a clang-format"

The same can be seen with the -n or --dry-run option as this uses the replacements
to drive the error/warning output.

Reviewed By: HazardyKnusperkeks

Differential Revision: https://reviews.llvm.org/D110392
2021-09-25 17:35:41 +01:00
..
AffectedRangeManager.cpp
AffectedRangeManager.h
BreakableToken.cpp [clang-format] Fix MSVC "unsafe use of type 'bool' in operation" warning (NFC) 2021-02-03 10:50:59 +08:00
BreakableToken.h [clang-format] Add option to control the spaces in a line comment 2021-02-01 22:48:50 +01:00
CMakeLists.txt [clang-format] Add Left/Right Const fixer capability 2021-09-23 20:00:33 +01:00
ContinuationIndenter.cpp [clang] Fix a few comment typos to cycle bots 2021-09-20 18:48:34 -04:00
ContinuationIndenter.h [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set 2020-05-15 16:40:31 +02:00
Encoding.h [clang-format][PR41964] Fix crash with SIGFPE when TabWidth is set to 0 and line starts with tab 2019-09-18 18:57:09 +00:00
Format.cpp [clang-format] Add Left/Right Const fixer capability 2021-09-23 20:00:33 +01:00
FormatInternal.h Move clang/Tooling/Core/Lookup.h to clang/Tooling/Refactoring/Lookup.h 2020-10-20 10:13:28 +01:00
FormatToken.cpp [Clang] Add __ibm128 type to represent ppc_fp128 2021-09-06 18:00:58 +08:00
FormatToken.h [clang-format] Support TypeScript override keyword 2021-08-25 14:11:50 +02:00
FormatTokenLexer.cpp [clang-format] Add IfMacros option 2021-06-23 08:51:53 -07:00
FormatTokenLexer.h [clang-format] Add more support for C# 8 nullables 2021-05-06 11:58:38 +02:00
MacroExpander.cpp [clang] Fix a few comment typos to cycle bots 2021-09-20 18:48:34 -04:00
Macros.h [llvm][clang][NFC] updates inline licence info 2021-08-11 02:48:53 +00:00
NamespaceEndCommentsFixer.cpp [clang-format][PR47290] Add ShortNamespaceLines format option 2021-03-01 21:28:14 +01:00
NamespaceEndCommentsFixer.h
QualifierAlignmentFixer.cpp [clang-format] Left/Right alignment fixer can cause false positive replacements when they don't actually change anything 2021-09-25 17:35:41 +01:00
QualifierAlignmentFixer.h [clang-format] Add Left/Right Const fixer capability 2021-09-23 20:00:33 +01:00
SortJavaScriptImports.cpp [clang] Rename StringRef _lower() method calls to _insensitive() 2021-06-25 00:22:01 +03:00
SortJavaScriptImports.h
TokenAnalyzer.cpp Hand Allocator and IdentifierTable into FormatTokenLexer. 2020-07-07 11:56:34 +02:00
TokenAnalyzer.h
TokenAnnotator.cpp [clang] Fix a few comment typos to cycle bots 2021-09-20 18:48:34 -04:00
TokenAnnotator.h [Clang-Format] Add ReferenceAlignment directive 2021-06-24 22:27:45 +02:00
UnwrappedLineFormatter.cpp [clang] Fix a few comment typos to cycle bots 2021-09-20 18:48:34 -04:00
UnwrappedLineFormatter.h [clang-format] Fix the issue that empty lines being removed at the beginning of namespace 2021-06-27 15:59:21 +01:00
UnwrappedLineParser.cpp [clang-format] Top-level unwrapped lines don't follow a left brace 2021-09-15 14:52:07 -07:00
UnwrappedLineParser.h [clang-format] Break an unwrapped line at a K&R C parameter decl 2021-07-19 13:30:38 -07:00
UsingDeclarationsSorter.cpp [clang] Rename StringRef _lower() method calls to _insensitive() 2021-06-25 00:22:01 +03:00
UsingDeclarationsSorter.h
WhitespaceManager.cpp [clang-format] Fix aligning with linebreaks #2 2021-07-29 08:43:41 +02:00
WhitespaceManager.h [clang] Fix a few comment typos to cycle bots 2021-09-20 18:48:34 -04:00