aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2022-08-08 09:12:46 -0700
committerFangrui Song <i@maskray.me>2022-08-08 09:12:46 -0700
commit3f18f7c0072b642f5fe88d2fb7bb8ccf69a6c6f5 (patch)
tree2ed06fc833ad0fee4f6de6904ee1b828c14a7d48 /clang/lib/Parse/ParseDecl.cpp
parent521a5c11acb45fe4672ed63e3f6aa1f22b0e9fbe (diff)
downloadllvm-3f18f7c0072b642f5fe88d2fb7bb8ccf69a6c6f5.zip
llvm-3f18f7c0072b642f5fe88d2fb7bb8ccf69a6c6f5.tar.gz
llvm-3f18f7c0072b642f5fe88d2fb7bb8ccf69a6c6f5.tar.bz2
[clang] LLVM_FALLTHROUGH => [[fallthrough]]. NFC
With C++17 there is no Clang pedantic warning or MSVC C5051. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D131346
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index fa19c6a0c..72d4804 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -2802,7 +2802,7 @@ bool Parser::ParseImplicitInt(DeclSpec &DS, CXXScopeSpec *SS,
}
}
// Fall through.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
}
case tok::comma:
case tok::equal:
@@ -4240,13 +4240,13 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS,
isInvalid = true;
break;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::kw_private:
// It's fine (but redundant) to check this for __generic on the
// fallthrough path; we only form the __generic token in OpenCL mode.
if (!getLangOpts().OpenCL)
goto DoneWithDeclSpec;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::kw___private:
case tok::kw___global:
case tok::kw___local:
@@ -5161,7 +5161,7 @@ bool Parser::isTypeSpecifierQualifier() {
case tok::identifier: // foo::bar
if (TryAltiVecVectorToken())
return true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::kw_typename: // typename T::type
// Annotate typenames and C++ scope specifiers. If we get one, just
// recurse to handle whatever we get.
@@ -5304,7 +5304,7 @@ bool Parser::isDeclarationSpecifier(bool DisambiguatingWithExpression) {
return false;
if (TryAltiVecVectorToken())
return true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::kw_decltype: // decltype(T())::type
case tok::kw_typename: // typename T::type
// Annotate typenames and C++ scope specifiers. If we get one, just
@@ -5719,7 +5719,7 @@ void Parser::ParseTypeQualifierListOpt(
case tok::kw_private:
if (!getLangOpts().OpenCL)
goto DoneWithTypeQuals;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::kw___private:
case tok::kw___global:
case tok::kw___local:
@@ -5743,7 +5743,7 @@ void Parser::ParseTypeQualifierListOpt(
if (TryKeywordIdentFallback(false))
continue;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::kw___sptr:
case tok::kw___w64:
case tok::kw___ptr64:
@@ -5794,7 +5794,7 @@ void Parser::ParseTypeQualifierListOpt(
continue; // do *not* consume the next token!
}
// otherwise, FALL THROUGH!
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
default:
DoneWithTypeQuals:
// If this is not a type-qualifier token, we're done reading type