summaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2019-02-08 18:02:25 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2019-02-08 18:02:25 +0000
commita03305e04cab8922eb52a61636e1112c4fc3fb48 (patch)
tree5e82e3aac2197c13f986e107fe3de91d2bc2a74f /lib/Sema/SemaExpr.cpp
parent494c7e87ffb0fc7fb0741c4c814d72c2b407dc8c (diff)
downloadclang-a03305e04cab8922eb52a61636e1112c4fc3fb48.tar.gz
[OPENMP]Delay emission of the error messages for the exceptions.
Fixed diagnostic emission for the exceptions support in case of the compilation of OpenMP code for the devices. From now on, it uses delayed diagnostics mechanism, previously used for CUDA only. It allow to diagnose not allowed used of exceptions only in functions that are going to be codegen'ed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@353542 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index b675986f56..4d9a8df26f 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -14896,6 +14896,9 @@ void Sema::MarkFunctionReferenced(SourceLocation Loc, FunctionDecl *Func,
}
Func->markUsed(Context);
+
+ if (LangOpts.OpenMP && LangOpts.OpenMPIsDevice)
+ checkOpenMPDeviceFunction(Loc, Func);
}
static void