Skip to content

[clang][dataflow] Fix a missing break from a switch case -Wimplicit-fallthrough #120739

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 20, 2024

Conversation

jvoung
Copy link
Contributor

@jvoung jvoung commented Dec 20, 2024

Missed when changing code in #120102

Copy link

github-actions bot commented Dec 20, 2024

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

@jvoung jvoung marked this pull request as ready for review December 20, 2024 14:38
@jvoung jvoung requested a review from ymand December 20, 2024 14:38
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:dataflow Clang Dataflow Analysis framework - https://clang.llvm.org/docs/DataFlowAnalysisIntro.html clang:analysis labels Dec 20, 2024
@llvmbot
Copy link
Member

llvmbot commented Dec 20, 2024

@llvm/pr-subscribers-clang-analysis

Author: Jan Voung (jvoung)

Changes

Missed when changing code in #120102


Full diff: https://github.com/llvm/llvm-project/pull/120739.diff

1 Files Affected:

  • (modified) clang/lib/Analysis/FlowSensitive/SmartPointerAccessorCaching.cpp (+1-1)
diff --git a/clang/lib/Analysis/FlowSensitive/SmartPointerAccessorCaching.cpp b/clang/lib/Analysis/FlowSensitive/SmartPointerAccessorCaching.cpp
index 546f128531df3c..a0c81aa933da8e 100644
--- a/clang/lib/Analysis/FlowSensitive/SmartPointerAccessorCaching.cpp
+++ b/clang/lib/Analysis/FlowSensitive/SmartPointerAccessorCaching.cpp
@@ -71,7 +71,7 @@ bool hasSmartPointerClassShape(const CXXRecordDecl &RD, bool &HasGet,
                                 ->getCanonicalTypeUnqualified();
         }
       }
-    }
+    } break;
     default:
       break;
     }

@llvmbot
Copy link
Member

llvmbot commented Dec 20, 2024

@llvm/pr-subscribers-clang

Author: Jan Voung (jvoung)

Changes

Missed when changing code in #120102


Full diff: https://github.com/llvm/llvm-project/pull/120739.diff

1 Files Affected:

  • (modified) clang/lib/Analysis/FlowSensitive/SmartPointerAccessorCaching.cpp (+1-1)
diff --git a/clang/lib/Analysis/FlowSensitive/SmartPointerAccessorCaching.cpp b/clang/lib/Analysis/FlowSensitive/SmartPointerAccessorCaching.cpp
index 546f128531df3c..a0c81aa933da8e 100644
--- a/clang/lib/Analysis/FlowSensitive/SmartPointerAccessorCaching.cpp
+++ b/clang/lib/Analysis/FlowSensitive/SmartPointerAccessorCaching.cpp
@@ -71,7 +71,7 @@ bool hasSmartPointerClassShape(const CXXRecordDecl &RD, bool &HasGet,
                                 ->getCanonicalTypeUnqualified();
         }
       }
-    }
+    } break;
     default:
       break;
     }

@DavidSpickett DavidSpickett changed the title Fix a missing break from a switch case -Wimplicit-fallthrough [clang][dataflow] Fix a missing break from a switch case -Wimplicit-fallthrough Dec 20, 2024
@DavidSpickett
Copy link
Collaborator

Thanks for the fix!

@DavidSpickett DavidSpickett merged commit 2d5dc5c into llvm:main Dec 20, 2024
10 of 13 checks passed
@jvoung
Copy link
Contributor Author

jvoung commented Dec 20, 2024

Thanks for the fix!

Thanks for helping merge! And sorry again about the breakage!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:analysis clang:dataflow Clang Dataflow Analysis framework - https://clang.llvm.org/docs/DataFlowAnalysisIntro.html clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants