diff options
| author | 2017-01-14 19:55:43 +0000 | |
|---|---|---|
| committer | 2017-01-14 19:55:43 +0000 | |
| commit | bd3306aecb3a15e8967143b8cdbbccf2b1b19b74 (patch) | |
| tree | 309a8132b44564b9e634c0da6815187ce8eab27c /gnu/llvm/tools/clang/lib/Sema/SemaExceptionSpec.cpp | |
| parent | killp -a should not kill the window if only one pane. (diff) | |
| download | wireguard-openbsd-bd3306aecb3a15e8967143b8cdbbccf2b1b19b74.tar.xz wireguard-openbsd-bd3306aecb3a15e8967143b8cdbbccf2b1b19b74.zip | |
Import LLVM 3.9.1 including clang and lld.
Diffstat (limited to 'gnu/llvm/tools/clang/lib/Sema/SemaExceptionSpec.cpp')
| -rw-r--r-- | gnu/llvm/tools/clang/lib/Sema/SemaExceptionSpec.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/gnu/llvm/tools/clang/lib/Sema/SemaExceptionSpec.cpp b/gnu/llvm/tools/clang/lib/Sema/SemaExceptionSpec.cpp index f12bf2415db..4a21eb308fe 100644 --- a/gnu/llvm/tools/clang/lib/Sema/SemaExceptionSpec.cpp +++ b/gnu/llvm/tools/clang/lib/Sema/SemaExceptionSpec.cpp @@ -110,11 +110,17 @@ bool Sema::CheckSpecifiedExceptionType(QualType &T, SourceRange Range) { // A type denoted in an exception-specification shall not denote a // pointer or reference to an incomplete type, other than (cv) void* or a // pointer or reference to a class currently being defined. + // In Microsoft mode, downgrade this to a warning. + unsigned DiagID = diag::err_incomplete_in_exception_spec; + bool ReturnValueOnError = true; + if (getLangOpts().MicrosoftExt) { + DiagID = diag::ext_incomplete_in_exception_spec; + ReturnValueOnError = false; + } if (!(PointeeT->isRecordType() && PointeeT->getAs<RecordType>()->isBeingDefined()) && - RequireCompleteType(Range.getBegin(), PointeeT, - diag::err_incomplete_in_exception_spec, Kind, Range)) - return true; + RequireCompleteType(Range.getBegin(), PointeeT, DiagID, Kind, Range)) + return ReturnValueOnError; return false; } @@ -995,6 +1001,10 @@ CanThrowResult Sema::canThrow(const Expr *E) { return mergeCanThrow(CT, canSubExprsThrow(*this, E)); } + case Expr::CXXInheritedCtorInitExprClass: + return canCalleeThrow(*this, E, + cast<CXXInheritedCtorInitExpr>(E)->getConstructor()); + case Expr::LambdaExprClass: { const LambdaExpr *Lambda = cast<LambdaExpr>(E); CanThrowResult CT = CT_Cannot; @@ -1136,6 +1146,7 @@ CanThrowResult Sema::canThrow(const Expr *E) { case Expr::ObjCIndirectCopyRestoreExprClass: case Expr::ObjCProtocolExprClass: case Expr::ObjCSelectorExprClass: + case Expr::ObjCAvailabilityCheckExprClass: case Expr::OffsetOfExprClass: case Expr::PackExpansionExprClass: case Expr::PseudoObjectExprClass: |
