llvm-project/clang/lib/Format
Francois Ferrand e8a301f87f clang-format: better handle namespace macros
Summary:
Other macros are used to declare namespaces, and should thus be handled
similarly. This is the case for crpcut's TESTSUITE macro, or for
unittest-cpp's SUITE macro:

      TESTSUITE(Foo) {
      TEST(MyFirstTest) {
        assert(0);
      }
      } // TESTSUITE(Foo)

This patch deals with this cases by introducing a new option to specify
lists of namespace macros. Internally, it re-uses the system already in
place for foreach and statement macros, to ensure there is no impact on
performance.

Reviewers: krasimir, djasper, klimek

Reviewed By: klimek

Subscribers: acoomans, cfe-commits, klimek

Tags: #clang

Differential Revision: https://reviews.llvm.org/D37813

llvm-svn: 362740
2019-06-06 20:06:23 +00:00
..
AffectedRangeManager.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AffectedRangeManager.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
BreakableToken.cpp [clang-format] Fix bug in block comment reflow that joins * and / 2019-05-03 23:15:40 +00:00
BreakableToken.h [clang-format] Fix bug in block comment reflow that joins * and / 2019-05-03 23:15:40 +00:00
CMakeLists.txt Reland "Move #include manipulation code to new lib/Tooling/Inclusions." 2018-06-04 09:04:12 +00:00
ContinuationIndenter.cpp [clang-format] Fix bug in reflow of block comments containing CR/LF 2019-04-23 20:29:46 +00:00
ContinuationIndenter.h [clang-format] Fix indent of trailing raw string param after newline 2019-04-18 17:14:05 +00:00
Encoding.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Format.cpp clang-format: better handle namespace macros 2019-06-06 20:06:23 +00:00
FormatInternal.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FormatToken.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FormatToken.h clang-format: better handle namespace macros 2019-06-06 20:06:23 +00:00
FormatTokenLexer.cpp clang-format: better handle namespace macros 2019-06-06 20:06:23 +00:00
FormatTokenLexer.h [clang-format] Add basic support for formatting C# files 2019-03-21 13:09:22 +00:00
NamespaceEndCommentsFixer.cpp clang-format: better handle namespace macros 2019-06-06 20:06:23 +00:00
NamespaceEndCommentsFixer.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SortJavaScriptImports.cpp Use llvm::stable_sort 2019-04-24 14:43:05 +00:00
SortJavaScriptImports.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TokenAnalyzer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TokenAnalyzer.h [clang-format] Remove unused Environment constructor. 2019-04-18 00:36:51 +00:00
TokenAnnotator.cpp clang-format: better handle namespace macros 2019-06-06 20:06:23 +00:00
TokenAnnotator.h clang-format: better handle namespace macros 2019-06-06 20:06:23 +00:00
UnwrappedLineFormatter.cpp clang-format: better handle namespace macros 2019-06-06 20:06:23 +00:00
UnwrappedLineFormatter.h [clang-format] [NFC] clang-format the Format library 2019-03-01 09:09:54 +00:00
UnwrappedLineParser.cpp clang-format: better handle namespace macros 2019-06-06 20:06:23 +00:00
UnwrappedLineParser.h [clang-format] [NFC] clang-format the Format library 2019-03-01 09:09:54 +00:00
UsingDeclarationsSorter.cpp Use llvm::stable_sort 2019-04-24 14:43:05 +00:00
UsingDeclarationsSorter.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
WhitespaceManager.cpp [clang-format] Fix a bug in AlignConsecutiveDeclarations. 2019-05-01 18:23:44 +00:00
WhitespaceManager.h [clang-format] Fix bug in reflow of block comments containing CR/LF 2019-04-23 20:29:46 +00:00