Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Sredneva Anastasiya. Lab 1. Var 3. #67

Merged
merged 11 commits into from
May 11, 2024

Conversation

nastosimys
Copy link

No description provided.

@nastosimys nastosimys requested a review from m-ly4 April 1, 2024 12:51
bool ParseArgs(const CompilerInstance &CI,
const std::vector<std::string> &args) override {
for (const auto &arg : args) {
if (arg == "-error") {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a test with this option specified?

@nastosimys nastosimys requested a review from m-ly4 May 7, 2024 12:36
Comment on lines 17 to 27
if (isWarning) {
diagnID = diagn.getCustomDiagID(DiagnosticsEngine::Warning,
"The function name has 'deprecated'");
diagn.Report(fDecl->getLocation(), diagnID)
<< fDecl->getNameInfo().getAsString();
} else {
diagnID = diagn.getCustomDiagID(DiagnosticsEngine::Error,
"The function name has 'deprecated'");
diagn.Report(fDecl->getLocation(), diagnID)
<< fDecl->getNameInfo().getAsString();
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a tip. It is your choice to apply it or not.

Suggested change
if (isWarning) {
diagnID = diagn.getCustomDiagID(DiagnosticsEngine::Warning,
"The function name has 'deprecated'");
diagn.Report(fDecl->getLocation(), diagnID)
<< fDecl->getNameInfo().getAsString();
} else {
diagnID = diagn.getCustomDiagID(DiagnosticsEngine::Error,
"The function name has 'deprecated'");
diagn.Report(fDecl->getLocation(), diagnID)
<< fDecl->getNameInfo().getAsString();
}
diagnID = diagn.getCustomDiagID(
isWarning ? DiagnosticsEngine::Warning : DiagnosticsEngine::Error,
"The function name has 'deprecated'");
diagn.Report(fDecl->getLocation(), diagnID)
<< fDecl->getNameInfo().getAsString();

@nastosimys nastosimys requested a review from m-ly4 May 7, 2024 18:20
@m-ly4 m-ly4 merged commit 0c15109 into NN-complr-tech:course-spring-2024 May 11, 2024
5 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants