Skip to content

Commit 0042db4

Browse files
Add all readability-identifier-naming suppressions for the _3C prefix.
This and the upcoming bulk clang-tidy work will include the unmaintained clangd3c code because it seems that a modest amount of additional work can avoid adding many more breakages on top of the ones it already has (mostly from the upcoming bulk rename).
1 parent e2ef1e1 commit 0042db4

File tree

8 files changed

+48
-0
lines changed

8 files changed

+48
-0
lines changed

clang-tools-extra/clangd/3CDiagnostics.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ namespace clang {
2020
namespace clangd {
2121

2222
// Class that represents diagnostics messages specific to 3C.
23+
//
24+
// See clang/docs/checkedc/3C/clang-tidy.md#_3c-name-prefix
25+
// NOLINTNEXTLINE(readability-identifier-naming)
2326
class _3CDiagnostics {
2427
public:
2528
std::mutex DiagMutex;

clang-tools-extra/clangd/ClangdLSPServer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ class ClangdLSPServer : private DiagnosticsConsumer {
203203
llvm::Optional<ClangdServer> Server;
204204
llvm::Optional<OffsetEncoding> NegotiatedOffsetEncoding;
205205
#ifdef INTERACTIVE3C
206+
// See clang/docs/checkedc/3C/clang-tidy.md#_3c-name-prefix
207+
// NOLINTNEXTLINE(readability-identifier-naming)
206208
_3CInterface &_3CInterface;
207209
#endif
208210
};

clang-tools-extra/clangd/ClangdServer.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ ClangdServer::ClangdServer(const GlobalCompilationDatabase &CDB,
9999
const FileSystemProvider &FSProvider,
100100
DiagnosticsConsumer &DiagConsumer,
101101
#ifdef INTERACTIVE3C
102+
// See
103+
// clang/docs/checkedc/3C/clang-tidy.md#_3c-name-prefix
104+
// NOLINTNEXTLINE(readability-identifier-naming)
102105
const Options &Opts, _3CInterface &_3CInterface)
103106
#else
104107
const Options &Opts)

clang-tools-extra/clangd/ClangdServer.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,12 @@ class DiagnosticsConsumer {
6161
};
6262

6363
#ifdef INTERACTIVE3C
64+
// See clang/docs/checkedc/3C/clang-tidy.md#_3c-name-prefix
65+
// NOLINTNEXTLINE(readability-identifier-naming)
6466
class _3CLSPCallBack {
6567
public:
68+
// See clang/docs/checkedc/3C/clang-tidy.md#_3c-name-prefix
69+
// NOLINTNEXTLINE(readability-identifier-naming)
6670
virtual void _3CResultsReady(std::string FileName,
6771
bool ClearDiags = false) = 0;
6872
virtual void send3CMessage(std::string MsgStr) = 0;
@@ -170,6 +174,8 @@ class ClangdServer {
170174
const FileSystemProvider &FSProvider,
171175
#ifdef INTERACTIVE3C
172176
DiagnosticsConsumer &DiagConsumer, const Options &Opts,
177+
// See clang/docs/checkedc/3C/clang-tidy.md#_3c-name-prefix
178+
// NOLINTNEXTLINE(readability-identifier-naming)
173179
_3CInterface &_3CInterface);
174180
#else
175181
DiagnosticsConsumer &DiagConsumer, const Options &Opts);
@@ -312,10 +318,16 @@ class ClangdServer {
312318

313319
void execute3CCommand(ExecuteCommandParams Params, _3CLSPCallBack *ConvCB);
314320

321+
// See clang/docs/checkedc/3C/clang-tidy.md#_3c-name-prefix
322+
// NOLINTNEXTLINE(readability-identifier-naming)
315323
void _3CCollectAndBuildInitialConstraints(_3CLSPCallBack *ConvCB);
316324

325+
// See clang/docs/checkedc/3C/clang-tidy.md#_3c-name-prefix
326+
// NOLINTNEXTLINE(readability-identifier-naming)
317327
_3CDiagnostics _3CDiagInfo;
318328

329+
// See clang/docs/checkedc/3C/clang-tidy.md#_3c-name-prefix
330+
// NOLINTNEXTLINE(readability-identifier-naming)
319331
void _3CCloseDocument(std::string FileName);
320332
#endif
321333

@@ -369,6 +381,8 @@ class ClangdServer {
369381
// ClangdServer.
370382
TUScheduler WorkScheduler;
371383
#ifdef INTERACTIVE3C
384+
// See clang/docs/checkedc/3C/clang-tidy.md#_3c-name-prefix
385+
// NOLINTNEXTLINE(readability-identifier-naming)
372386
_3CInterface &_3CInter;
373387
#endif
374388
};

clang-tools-extra/clangd/Protocol.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,9 @@ llvm::json::Value toJSON(const WorkspaceEdit &WE);
724724

725725
#ifdef INTERACTIVE3C
726726
/// Data corresponding to the manual fix
727+
//
728+
// See clang/docs/checkedc/3C/clang-tidy.md#_3c-name-prefix
729+
// NOLINTNEXTLINE(readability-identifier-naming)
727730
struct _3CManualFix {
728731
int ptrID;
729732
};
@@ -762,8 +765,14 @@ struct ExecuteCommandParams {
762765
const static llvm::StringLiteral CLANGD_APPLY_TWEAK;
763766
#ifdef INTERACTIVE3C
764767
// Command to apply the change for this pointer only
768+
//
769+
// See clang/docs/checkedc/3C/clang-tidy.md#_3c-name-prefix
770+
// NOLINTNEXTLINE(readability-identifier-naming)
765771
const static llvm::StringLiteral _3C_APPLY_ONLY_FOR_THIS;
766772
// Command to apply the change for all pointers with same reason
773+
//
774+
// See clang/docs/checkedc/3C/clang-tidy.md#_3c-name-prefix
775+
// NOLINTNEXTLINE(readability-identifier-naming)
767776
const static llvm::StringLiteral _3C_APPLY_FOR_ALL;
768777
#endif
769778

@@ -773,6 +782,8 @@ struct ExecuteCommandParams {
773782
// Arguments
774783
llvm::Optional<WorkspaceEdit> workspaceEdit;
775784
#ifdef INTERACTIVE3C
785+
// See clang/docs/checkedc/3C/clang-tidy.md#_3c-name-prefix
786+
// NOLINTNEXTLINE(readability-identifier-naming)
776787
llvm::Optional<_3CManualFix> _3CManualFix;
777788
#endif
778789
llvm::Optional<TweakArgs> tweakArgs;

clang-tools-extra/clangd/tool/ClangdMain.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,8 @@ static llvm::cl::list<std::string> TweakList(
280280
llvm::cl::Hidden, llvm::cl::CommaSeparated);
281281

282282
#ifdef INTERACTIVE3C
283+
// See clang/docs/checkedc/3C/clang-tidy.md#_3c-name-prefix
284+
// NOLINTNEXTLINE(readability-identifier-naming)
283285
static llvm::cl::OptionCategory _3CCategory("3C", "This is "
284286
"an interactive version "
285287
"of 3C "
@@ -481,6 +483,8 @@ int main(int argc, char *argv[]) {
481483
} else
482484
CcOptions.AllocatorFunctions = {};
483485

486+
// See clang/docs/checkedc/3C/clang-tidy.md#_3c-name-prefix
487+
// NOLINTNEXTLINE(readability-identifier-naming)
484488
_3CInterface _3CInterface(CcOptions, OptionsParser.getSourcePathList(),
485489
&(OptionsParser.getCompilations()));
486490
#else

clang/include/clang/3C/3C.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
#include <mutex>
2424

2525
// Options used to initialize 3C tool.
26+
//
27+
// See clang/docs/checkedc/3C/clang-tidy.md#_3c-name-prefix
28+
// NOLINTNEXTLINE(readability-identifier-naming)
2629
struct _3COptions {
2730
bool DumpIntermediate;
2831

@@ -65,6 +68,9 @@ struct _3COptions {
6568
};
6669

6770
// The main interface exposed by the 3C to interact with the tool.
71+
//
72+
// See clang/docs/checkedc/3C/clang-tidy.md#_3c-name-prefix
73+
// NOLINTNEXTLINE(readability-identifier-naming)
6874
class _3CInterface {
6975

7076
public:

clang/tools/3c/3CStandalone.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ using namespace clang::driver;
1919
using namespace clang::tooling;
2020
using namespace clang;
2121
using namespace llvm;
22+
// See clang/docs/checkedc/3C/clang-tidy.md#_3c-name-prefix
23+
// NOLINTNEXTLINE(readability-identifier-naming)
2224
static cl::OptionCategory _3CCategory("3C options");
2325
static cl::extrahelp CommonHelp(CommonOptionsParser::HelpMessage);
2426
static cl::extrahelp MoreHelp("");
@@ -182,6 +184,9 @@ int main(int argc, const char **argv) {
182184
CcOptions.AllocatorFunctions = {};
183185

184186
// Create 3C Interface.
187+
//
188+
// See clang/docs/checkedc/3C/clang-tidy.md#_3c-name-prefix
189+
// NOLINTNEXTLINE(readability-identifier-naming)
185190
_3CInterface _3CInterface(CcOptions, OptionsParser.getSourcePathList(),
186191
&(OptionsParser.getCompilations()));
187192

0 commit comments

Comments
 (0)