[clang] [analyzer] Workaround for unintended slowdown (scope increase) (PR #136720)
DonĂ¡t Nagy via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 23 07:33:11 PDT 2025
================
@@ -81,10 +81,6 @@ class FunctionSummariesTy {
I->second.MayInline = 0;
}
- void markReachedMaxBlockCount(const Decl *D) {
- markShouldNotInline(D);
- }
----------------
NagyDonat wrote:
I agree that it's OK to write code like
```c++
if (<reached condition X>)
markReachedConditionX(Args);
```
where every effect is grouped into a single function, I just say that it's a bad pattern to hide a function with this kind of generic name in a large block of mixed effects:
```c++
if (<reached condition X>) {
doSomething();
markReachedConditionX(Args);
if (InnerCondition) {
makeFoo();
return conjureBar();
} else {
//...
}
}
```
https://github.com/llvm/llvm-project/pull/136720
More information about the cfe-commits
mailing list