[clang] [Clang][Sema] Fix Wswitch-default bad warning in template (PR #76007)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 21 04:32:45 PST 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 92f17714e8410986ebfd7b3ebbc48529d6449253 d6c5cfe089b283b35660a48c5d056f44c65e2be4 -- clang/test/Sema/switch-default.cpp clang/lib/Sema/SemaStmt.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp
index f12a0af774..f0b03db690 100644
--- a/clang/lib/Sema/SemaStmt.cpp
+++ b/clang/lib/Sema/SemaStmt.cpp
@@ -1272,7 +1272,8 @@ Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, Stmt *Switch,
bool CaseListIsErroneous = false;
// FIXME: We'd better diagnose missing or duplicate default labels even
- // in the dependent case. Because default labels themselves are never dependent.
+ // in the dependent case. Because default labels themselves are never
+ // dependent.
for (SwitchCase *SC = SS->getSwitchCaseList(); SC && !HasDependentValue;
SC = SC->getNextSwitchCase()) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/76007
More information about the cfe-commits
mailing list