Commit 95f213f
authored
[clang] Add unreachable after fully covered switches, avoid GCC warnings. NFC. (#159330)
This avoids the following warnings:
../../clang/lib/AST/ExprConstant.cpp: In member function ‘bool {anonymous}::IntExprEvaluator::VisitBuiltinCallExpr(const clang::CallExpr*, unsigned int)’:
../../clang/lib/AST/ExprConstant.cpp:14104:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
14104 | }
| ^
../../clang/lib/AST/ExprConstant.cpp:14105:3: note: here
14105 | case Builtin::BIstrlen:
| ^~~~
../../clang/lib/Driver/ToolChains/CommonArgs.cpp: In function ‘std::string clang::driver::tools::complexRangeKindToStr(clang::LangOptionsBase::ComplexRangeKind ’:
../../clang/lib/Driver/ToolChains/CommonArgs.cpp:3523:1: warning: control reaches end of non-void function [-Wreturn-type]
3523 | }
| ^1 parent 1c5fcb1 commit 95f213f
File tree
2 files changed
+2
-0
lines changed- clang/lib
- AST
- Driver/ToolChains
2 files changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14102 | 14102 | | |
14103 | 14103 | | |
14104 | 14104 | | |
| 14105 | + | |
14105 | 14106 | | |
14106 | 14107 | | |
14107 | 14108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3520 | 3520 | | |
3521 | 3521 | | |
3522 | 3522 | | |
| 3523 | + | |
3523 | 3524 | | |
3524 | 3525 | | |
3525 | 3526 | | |
| |||
0 commit comments