llvm-project/clang/unittests
mydeveloperday e8ea35e63f [clang-format] [PR44345] Long namespace closing comment is duplicated endlessly
Summary:
https://bugs.llvm.org/show_bug.cgi?id=44345

When namespaces get long the namespace end comment wraps onto the next line

```
namespace would:🇮🇹:save::you:🅰️:lot::of::time::if_::i::just::gave:🆙:and_::
    went::mad::now {
void foo();
void bar();
} // namespace
  // would:🇮🇹:save::you:🅰️:lot::of::time::if_::i::just::gave:🆙:and_::went::mad::now
```

If clang-format it applied successively it will duplicate the end comment

```
namespace would:🇮🇹:save::you:🅰️:lot::of::time::if_::i::just::gave:🆙:and_::
    went::mad::now {
void foo();
void bar();
} // namespace
  // would:🇮🇹:save::you:🅰️:lot::of::time::if_::i::just::gave:🆙:and_::went::mad::now
  // would:🇮🇹:save::you:🅰️:lot::of::time::if_::i::just::gave:🆙:and_::went::mad::now
```

This revision checks to ensure the end comment is not on the next line before adding yet another comment

Reviewed By: krasimir

Subscribers: cfe-commits

Tags: #clang, #clang-format

Differential Revision: https://reviews.llvm.org/D79935
2020-05-15 21:00:55 +01:00
..
AST [clang] [unittest/AST] Fix linking to LLVMTestingSupport 2020-05-01 21:22:51 +02:00
ASTMatchers [ASTMatchers] Fix isDerivedFrom for recursive templates 2020-04-15 12:49:01 -07:00
Analysis std::isspace -> llvm::isSpace (where locale should be ignored) 2020-05-02 15:36:04 +02:00
Basic [clang][Preprocessor] Replace the slow translateFile call by a new, faster isMainFile check 2020-05-14 14:13:34 -07:00
CodeGen Remove CompositeType class. 2020-03-18 13:53:17 -07:00
CrossTU Revert "[analyzer] On-demand parsing capability for CTU" 2020-04-27 14:27:04 +02:00
DirectoryWatcher [DirectoryWatcher] Fix misuse of FSEvents API and data race 2020-02-11 09:25:38 -08:00
Driver Remove unused Endian.h includes, NFC 2020-03-11 15:45:34 -07:00
Format [clang-format] [PR44345] Long namespace closing comment is duplicated endlessly 2020-05-15 21:00:55 +01:00
Frontend Avoid including FileManager.h from SourceManager.h 2020-03-11 13:53:12 -07:00
Index [clang][Index] Visit the default parameter arguements in libindex. 2020-02-17 16:45:04 +01:00
Lex [clang] Make sure argument expansion locations are correct in presence of predefined buffer 2020-04-22 21:01:52 +02:00
Rename [OpenMP] "UnFix" layering problem with FrontendOpenMP 2020-04-07 14:41:18 -05:00
Rewrite [Rewrite][NFC] Add FIXMEs and tests for RemoveLineIfEmpty bug 2019-08-15 21:17:48 +00:00
Sema [OpenMP] "UnFix" layering problem with FrontendOpenMP 2020-04-07 14:41:18 -05:00
Serialization Revert "[modules] Do not cache invalid state for modules that we attempted to load." 2020-03-10 10:59:26 -07:00
StaticAnalyzer [OpenMP] "UnFix" layering problem with FrontendOpenMP 2020-04-07 14:41:18 -05:00
Tooling Strip -showIncludes in getClangStripDependencyFileAdjuster() 2020-04-27 11:20:08 -07:00
libclang Revert "Revert "Reland "[Support] make report_fatal_error `abort` instead of `exit`""" 2020-02-13 10:16:06 -08:00
CMakeLists.txt [clang] [unittest] Import LLVMTestingSupport if necessary 2019-09-12 13:06:12 +00:00