Skip to content

Commit

Permalink
Remove LLVM_C_FALLTHROUGH instances that cause warnings on clang-12 (m…
Browse files Browse the repository at this point in the history
…icrosoft#6134)

The clang-12 warning is:

error: fallthrough annotation in unreachable code
[-Werror,-Wimplicit-fallthrough]

These LLVM_C_FALLTHROUGH were originally added to silence GCC warnings,
but the GCC PR validation build is has succeeded, so it looks like they
are not needed.
  • Loading branch information
hekota authored Jan 8, 2024
1 parent 79f55f2 commit eb4cec4
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions tools/clang/lib/Sema/SemaCodeComplete.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3063,18 +3063,15 @@ CXCursorKind clang::getCursorKindForDecl(const Decl *D) {
switch (cast<ObjCPropertyImplDecl>(D)->getPropertyImplementation()) {
case ObjCPropertyImplDecl::Dynamic:
return CXCursor_ObjCDynamicDecl;
LLVM_C_FALLTHROUGH; //HLSL Change: avoid fallthrough warning

case ObjCPropertyImplDecl::Synthesize:
return CXCursor_ObjCSynthesizeDecl;
}

case Decl::Import:
return CXCursor_ModuleImportDecl;
LLVM_C_FALLTHROUGH; //HLSL Change: avoid fallthrough warning

case Decl::ObjCTypeParam: return CXCursor_TemplateTypeParameter;
LLVM_C_FALLTHROUGH; //HLSL Change: avoid fallthrough warning

default:
if (const TagDecl *TD = dyn_cast<TagDecl>(D)) {
Expand Down

0 comments on commit eb4cec4

Please sign in to comment.