Skip to content

Commit 6a05516

Browse files
Merge pull request #299 from correctcomputation/3c-rename
Rename CConv, etc. to 3C
2 parents 72ab4b0 + b941c8c commit 6a05516

File tree

489 files changed

+2388
-2388
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

489 files changed

+2388
-2388
lines changed

.github/workflows/main.yml

Lines changed: 55 additions & 55 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ wiki](https://github.com/Microsoft/checkedc-clang/wiki).
6666
|Debug X86 Windows| Checked C and clang regression tests|![Debug X86 Windows status](https://msresearch.visualstudio.com/_apis/public/build/definitions/f6454e27-a46c-49d9-8453-29d89d53d2f9/211/badge)|
6767
|Debug X64 Windows| Checked C and clang regression tests| ![Debug X64 Windows status](https://msresearch.visualstudio.com/_apis/public/build/definitions/f6454e27-a46c-49d9-8453-29d89d53d2f9/205/badge)|
6868
|Debug X64 Linux | Checked C and clang regression tests| ![Debug X64 Linux status](https://msresearch.visualstudio.com/_apis/public/build/definitions/f6454e27-a46c-49d9-8453-29d89d53d2f9/217/badge)|
69-
|Debug X64 Linux | cconv-standalone (Checked C Convert tool) nightly tests| ![Nightly Sanity Tests](https://github.com/correctcomputation/checkedc-clang/workflows/Nightly%20Sanity%20Tests/badge.svg?branch=master)|
69+
|Debug X64 Linux | 3C (Checked-C-Convert tool) nightly tests| ![Nightly Sanity Tests](https://github.com/correctcomputation/checkedc-clang/workflows/Nightly%20Sanity%20Tests/badge.svg?branch=master)|
7070
|Release X64 Linux| Checked C, clang, and LLVM nightly tests|![Release X64 Linux status](https://msresearch.visualstudio.com/_apis/public/build/definitions/f6454e27-a46c-49d9-8453-29d89d53d2f9/238/badge)|
7171

7272
## Contributing

clang-tools-extra/clangd/CConvertCommands.cpp renamed to clang-tools-extra/clangd/3CCommands.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
//=--CConvertCommands.cpp-----------------------------------------*- C++-*-===//
1+
//=--3CCommands.cpp-----------------------------------------------*- C++-*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
8-
// Implementation of CConv command helper methods.
8+
// Implementation of 3C command helper methods.
99
//===----------------------------------------------------------------------===//
1010

11-
#ifdef INTERACTIVECCCONV
12-
#include "CConvertCommands.h"
11+
#ifdef INTERACTIVE3C
12+
#include "3CCommands.h"
1313

1414
namespace clang {
1515
namespace clangd {
1616

17-
#define CCONVSOURCE "CConv_RealWild"
17+
#define _3CSOURCE "3C_RealWild"
1818

1919
static bool GetPtrIDFromDiagMessage(const Diagnostic &DiagMsg,
2020
unsigned long &PtrId) {
21-
if (DiagMsg.source.rfind(CCONVSOURCE, 0) == 0) {
21+
if (DiagMsg.source.rfind(_3CSOURCE, 0) == 0) {
2222
PtrId = atoi(DiagMsg.code.c_str());
2323
return true;
2424
}
@@ -29,40 +29,40 @@ void AsCCCommands(const Diagnostic &D, std::vector<Command> &OutCommands) {
2929
unsigned long PtrId;
3030
if (GetPtrIDFromDiagMessage(D, PtrId)) {
3131
Command AllPtrsCmd;
32-
CConvertManualFix PtrFix;
32+
_3CManualFix PtrFix;
3333
PtrFix.ptrID = PtrId;
34-
AllPtrsCmd.ccConvertManualFix = PtrFix;
34+
AllPtrsCmd._3CManualFix = PtrFix;
3535
Command SinglePtrCmd = AllPtrsCmd;
3636

37-
AllPtrsCmd.command = Command::CCONV_APPLY_FOR_ALL;
37+
AllPtrsCmd.command = Command::_3C_APPLY_FOR_ALL;
3838
AllPtrsCmd.title = "Make this pointer non-WILD and apply the "
3939
"same observation to all the pointers.";
4040

4141
OutCommands.push_back(AllPtrsCmd);
4242

43-
SinglePtrCmd.command = Command::CCONV_APPLY_ONLY_FOR_THIS;
43+
SinglePtrCmd.command = Command::_3C_APPLY_ONLY_FOR_THIS;
4444
SinglePtrCmd.title = "Make ONLY this pointer non-WILD.";
4545

4646
OutCommands.push_back(SinglePtrCmd);
4747
}
4848
}
4949

50-
bool IsCConvCommand(const ExecuteCommandParams &Params) {
51-
return (Params.command.rfind(Command::CCONV_APPLY_ONLY_FOR_THIS, 0) == 0) ||
52-
(Params.command.rfind(Command::CCONV_APPLY_FOR_ALL, 0) == 0);
50+
bool Is3CCommand(const ExecuteCommandParams &Params) {
51+
return (Params.command.rfind(Command::_3C_APPLY_ONLY_FOR_THIS, 0) == 0) ||
52+
(Params.command.rfind(Command::_3C_APPLY_FOR_ALL, 0) == 0);
5353
}
5454

5555
bool ExecuteCCCommand(const ExecuteCommandParams &Params,
5656
std::string &ReplyMessage,
57-
CConvInterface &CcInterface) {
57+
_3CInterface &CcInterface) {
5858
ReplyMessage = "Checked C Pointer Modified.";
59-
if (Params.command.rfind(Command::CCONV_APPLY_ONLY_FOR_THIS, 0) == 0) {
60-
int PtrId = Params.ccConvertManualFix->ptrID;
59+
if (Params.command.rfind(Command::_3C_APPLY_ONLY_FOR_THIS, 0) == 0) {
60+
int PtrId = Params._3CManualFix->ptrID;
6161
CcInterface.MakeSinglePtrNonWild(PtrId);
6262
return true;
6363
}
64-
if (Params.command.rfind(Command::CCONV_APPLY_FOR_ALL, 0) == 0) {
65-
int PtrId = Params.ccConvertManualFix->ptrID;
64+
if (Params.command.rfind(Command::_3C_APPLY_FOR_ALL, 0) == 0) {
65+
int PtrId = Params._3CManualFix->ptrID;
6666
CcInterface.InvalidateWildReasonGlobally(PtrId);
6767
return true;
6868
}
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
//=--CConvertCommands.h-------------------------------------------*- C++-*-===//
1+
//=--3CCommands.h-------------------------------------------------*- C++-*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
8-
// Helper methods used to handle CConv commands.
8+
// Helper methods used to handle 3C commands.
99
//===----------------------------------------------------------------------===//
1010

11-
#ifdef INTERACTIVECCCONV
12-
#ifndef LLVM_TOOLS_CLANG_TOOLS_EXTRA_CLANGD_CCONVERTCOMMANDS_H
13-
#define LLVM_TOOLS_CLANG_TOOLS_EXTRA_CLANGD_CCONVERTCOMMANDS_H
11+
#ifdef INTERACTIVE3C
12+
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_3CCOMMANDS_H
13+
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_3CCOMMANDS_H
1414

1515
#include "Protocol.h"
16-
#include "clang/CConv/CConv.h"
16+
#include "clang/3C/3C.h"
1717

1818
namespace clang {
1919
namespace clangd {
2020
// Convert the provided Diagnostic into Commands
2121
void AsCCCommands(const Diagnostic &D, std::vector<Command> &OutCommands);
22-
// Check if the execute command request from the client is a CConv command.
23-
bool IsCConvCommand(const ExecuteCommandParams &Params);
22+
// Check if the execute command request from the client is a 3C command.
23+
bool Is3CCommand(const ExecuteCommandParams &Params);
2424

25-
// Interpret the provided execute command request as CConv command
25+
// Interpret the provided execute command request as 3C command
2626
// and execute them.
2727
bool ExecuteCCCommand(const ExecuteCommandParams &Params,
2828
std::string &ReplyMessage,
29-
CConvInterface &CcInterface);
29+
_3CInterface &CcInterface);
3030
}
3131
}
32-
#endif //LLVM_TOOLS_CLANG_TOOLS_EXTRA_CLANGD_CCONVERTCOMMANDS_H
32+
#endif //LLVM_CLANG_TOOLS_EXTRA_CLANGD_3CCOMMANDS_H
3333
#endif

clang-tools-extra/clangd/CConvertDiagnostics.cpp renamed to clang-tools-extra/clangd/3CDiagnostics.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
//=--CConvertDiagnostics.cpp--------------------------------------*- C++-*-===//
1+
//=--3CDiagnostics.cpp--------------------------------------------*- C++-*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
8-
// Implementation of CConvertDiagnostics methods
8+
// Implementation of _3CDiagnostics methods
99
//===----------------------------------------------------------------------===//
1010

11-
#ifdef INTERACTIVECCCONV
12-
#include "CConvertDiagnostics.h"
11+
#ifdef INTERACTIVE3C
12+
#include "3CDiagnostics.h"
1313

1414
namespace clang {
1515
namespace clangd {
1616

1717
#define DEFAULT_PTRSIZE 4
1818

19-
void CConvertDiagnostics::ClearAllDiags() {
19+
void _3CDiagnostics::ClearAllDiags() {
2020
std::lock_guard<std::mutex> Lock(DiagMutex);
2121
AllFileDiagnostics.clear();
2222
}
@@ -26,7 +26,7 @@ static bool IsValidSourceFile(ConstraintsInfo &CCRes, std::string &FilePath) {
2626
}
2727

2828

29-
bool CConvertDiagnostics::PopulateDiagsFromConstraintsInfo(ConstraintsInfo &Line) {
29+
bool _3CDiagnostics::PopulateDiagsFromConstraintsInfo(ConstraintsInfo &Line) {
3030
std::lock_guard<std::mutex> Lock(DiagMutex);
3131
std::set<ConstraintKey> ProcessedCKeys;
3232
ProcessedCKeys.clear();
@@ -57,7 +57,7 @@ bool CConvertDiagnostics::PopulateDiagsFromConstraintsInfo(ConstraintsInfo &Line
5757
Diag NewDiag;
5858
NewDiag.Range = GetLocRange(PsInfo->getLineNo(), PsInfo->getColSNo(),
5959
PsInfo->getColENo());
60-
NewDiag.Source = Diag::CConvMain;
60+
NewDiag.Source = Diag::_3CMain;
6161
NewDiag.Severity = DiagnosticsEngine::Level::Error;
6262
NewDiag.code = std::to_string(WReason.first);
6363
NewDiag.Message = "Pointer is wild because of:" +
@@ -94,7 +94,7 @@ bool CConvertDiagnostics::PopulateDiagsFromConstraintsInfo(ConstraintsInfo &Line
9494
PsInfo->getColENo());
9595

9696
NewDiag.code = std::to_string(NonWildCk);
97-
NewDiag.Source = Diag::CConvSec;
97+
NewDiag.Source = Diag::_3CSec;
9898
NewDiag.Severity = DiagnosticsEngine::Level::Warning;
9999
NewDiag.Message = "Pointer is wild because it transitively "
100100
"depends on other pointer(s)";

clang-tools-extra/clangd/CConvertDiagnostics.h renamed to clang-tools-extra/clangd/3CDiagnostics.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
//=--CConvertDiagnostics.h----------------------------------------*- C++-*-===//
1+
//=--3CDiagnostics.h----------------------------------------------*- C++-*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
8-
// Class that handles CConv Diagnostic messages.
8+
// Class that handles 3C Diagnostic messages.
99
//===----------------------------------------------------------------------===//
1010

11-
#ifdef INTERACTIVECCCONV
12-
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_CCONVERTDIAGNOSTICS_H
13-
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_CCONVERTDIAGNOSTICS_H
11+
#ifdef INTERACTIVE3C
12+
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_3CDIAGNOSTICS_H
13+
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_3CDIAGNOSTICS_H
1414

1515
#include <set>
1616
#include "Diagnostics.h"
17-
#include "clang/CConv/CConv.h"
17+
#include "clang/3C/3C.h"
1818

1919
namespace clang {
2020
namespace clangd {
2121

22-
// Class that represents diagnostics messages specific to CConv.
23-
class CConvertDiagnostics {
22+
// Class that represents diagnostics messages specific to 3C.
23+
class _3CDiagnostics {
2424
public:
2525
std::mutex DiagMutex;
2626

clang-tools-extra/clangd/CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ endif()
3636

3737
add_clang_library(clangDaemon
3838
AST.cpp
39-
CConvertCommands.cpp
40-
CConvertDiagnostics.cpp
39+
3CCommands.cpp
40+
3CDiagnostics.cpp
4141
Cancellation.cpp
4242
ClangdLSPServer.cpp
4343
ClangdServer.cpp
@@ -140,10 +140,10 @@ add_clang_library(clangDaemon
140140
${CLANGD_ATOMIC_LIB}
141141
)
142142

143-
add_clang_library(cconvClangDaemon
143+
add_clang_library(3cClangDaemon
144144
AST.cpp
145-
CConvertCommands.cpp
146-
CConvertDiagnostics.cpp
145+
3CCommands.cpp
146+
3CDiagnostics.cpp
147147
Cancellation.cpp
148148
ClangdLSPServer.cpp
149149
ClangdServer.cpp
@@ -209,7 +209,7 @@ add_clang_library(cconvClangDaemon
209209
refactor/Tweak.cpp
210210

211211
LINK_LIBS
212-
CConv
212+
3C
213213
clangAST
214214
clangASTMatchers
215215
clangBasic
@@ -247,7 +247,7 @@ add_clang_library(cconvClangDaemon
247247
${CLANGD_ATOMIC_LIB}
248248
)
249249

250-
target_compile_definitions(obj.cconvClangDaemon PRIVATE INTERACTIVECCCONV=1)
250+
target_compile_definitions(obj.3cClangDaemon PRIVATE INTERACTIVE3C=1)
251251

252252
add_subdirectory(refactor/tweaks)
253253
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")

0 commit comments

Comments
 (0)