Skip to content

Conversation

@zeyi2
Copy link
Member

@zeyi2 zeyi2 commented Nov 29, 2025

Closes #156151

@zeyi2 zeyi2 marked this pull request as draft November 29, 2025 17:08
}

void ClangTidyProfiling::storeProfileData(llvm::TimerGroup &TG) {
assert(Storage && "We should have a filename.");
Copy link
Member Author

@zeyi2 zeyi2 Nov 29, 2025

Choose a reason for hiding this comment

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

Will fix the removal of this assert soon.

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

@zeyi2 zeyi2 force-pushed the open-unchecked-optional-access branch from 1b736ad to 11e86d6 Compare December 3, 2025 16:32
@zeyi2 zeyi2 marked this pull request as ready for review December 3, 2025 16:34
Comment on lines 98 to +100
assert(Scale && "Unknown scale encountered");
if (!Scale)
continue;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we then remove first assert if we still check via if later? (but preserve comment)

Copy link
Contributor

Choose a reason for hiding this comment

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

It feels weird that dataflow framework didn't count it as "validation", could it be a FP?
Later, you used assert(BestConversion && "text"); for the same purpose of validation

Comment on lines -1347 to -1350
if (SK == SK_Invalid || !NamingStyles[SK])
if (SK == SK_Invalid)
return std::nullopt;

const IdentifierNamingCheck::NamingStyle &Style = *NamingStyles[SK];
Copy link
Contributor

Choose a reason for hiding this comment

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

So dataflow couldn't handle checking for multiple optional values in one go? Seems like FP.

Comment on lines +610 to +612
Context.getOptions().HeaderFilterRegex
? StringRef(*Context.getOptions().HeaderFilterRegex)
: StringRef(""));
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't we use .value_or() here? (and later)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[clang-tidy] Enable 'bugprone-unchecked-optional-access' check in clang-tidy config.

2 participants