aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/DeclSpec.cpp
diff options
context:
space:
mode:
authorGousemoodhin Nadaf <nadafgouse5@gmail.com>2020-08-20 18:07:46 -0700
committerRichard Smith <richard@metafoo.co.uk>2020-08-20 18:15:43 -0700
commitfe86dbb32da21e1c8c6eb4864a00f61ed3d003a3 (patch)
treeb0aec34f6b9eb19d720d0ad556788d091d1cbc6f /clang/lib/Sema/DeclSpec.cpp
parent95e18b2d9d5f93c209ea81df79c2e18ef77de506 (diff)
downloadllvm-fe86dbb32da21e1c8c6eb4864a00f61ed3d003a3.zip
llvm-fe86dbb32da21e1c8c6eb4864a00f61ed3d003a3.tar.gz
llvm-fe86dbb32da21e1c8c6eb4864a00f61ed3d003a3.tar.bz2
[clang]: Remove assertion which checks explicit declaration
explicit keyword is declared outside of class is invalid, invalid explicit declaration is handled inside DiagnoseFunctionSpecifiers() function. To avoid compiler crash in case of invalid explicit declaration, remove assertion. Reviewed By: rsmith Differential Revision: https://reviews.llvm.org/D83929
Diffstat (limited to 'clang/lib/Sema/DeclSpec.cpp')
-rw-r--r--clang/lib/Sema/DeclSpec.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/clang/lib/Sema/DeclSpec.cpp b/clang/lib/Sema/DeclSpec.cpp
index f553b5c..a3f770b 100644
--- a/clang/lib/Sema/DeclSpec.cpp
+++ b/clang/lib/Sema/DeclSpec.cpp
@@ -1014,9 +1014,6 @@ bool DeclSpec::setFunctionSpecExplicit(SourceLocation Loc,
const char *&PrevSpec, unsigned &DiagID,
ExplicitSpecifier ExplicitSpec,
SourceLocation CloseParenLoc) {
- assert((ExplicitSpec.getKind() == ExplicitSpecKind::ResolvedTrue ||
- ExplicitSpec.getExpr()) &&
- "invalid ExplicitSpecifier");
// 'explicit explicit' is ok, but warn as this is likely not what the user
// intended.
if (hasExplicitSpecifier()) {