diff options
author | Yaxun Liu <Yaxun.Liu@amd.com> | 2016-12-16 21:23:55 +0000 |
---|---|---|
committer | Yaxun Liu <Yaxun.Liu@amd.com> | 2016-12-16 21:23:55 +0000 |
commit | 35f6d66b0d4da029fbd2d6f97cd9121d59d20322 (patch) | |
tree | 5f5a561a7cd7ef8f164bcdb3431e13f8a9de677b /clang/lib/Sema/SemaDecl.cpp | |
parent | 40281846a1972e69c0a1bc12c0584fa88391c942 (diff) | |
download | bcm5719-llvm-35f6d66b0d4da029fbd2d6f97cd9121d59d20322.tar.gz bcm5719-llvm-35f6d66b0d4da029fbd2d6f97cd9121d59d20322.zip |
Revert r289979 due to regressions
llvm-svn: 289991
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index c32757565dd..7878355fc19 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -4838,9 +4838,6 @@ Decl *Sema::ActOnDeclarator(Scope *S, Declarator &D) { Dcl && Dcl->getDeclContext()->isFileContext()) Dcl->setTopLevelDeclInObjCContainer(); - if (getLangOpts().OpenCL) - setCurrentOpenCLExtensionForDecl(Dcl); - return Dcl; } @@ -5942,7 +5939,7 @@ NamedDecl *Sema::ActOnVariableDeclarator( NR = NR->getPointeeType(); } - if (!getOpenCLOptions().isEnabled("cl_khr_fp16")) { + if (!getOpenCLOptions().cl_khr_fp16) { // OpenCL v1.2 s6.1.1.1: reject declaring variables of the half and // half array type (unless the cl_khr_fp16 extension is enabled). if (Context.getBaseElementType(R)->isHalfType()) { @@ -6912,7 +6909,7 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) { // OpenCL v1.2 s6.8 - The static qualifier is valid only in program // scope. if (getLangOpts().OpenCLVersion == 120 && - !getOpenCLOptions().isEnabled("cl_clang_storage_class_specifiers") && + !getOpenCLOptions().cl_clang_storage_class_specifiers && NewVD->isStaticLocal()) { Diag(NewVD->getLocation(), diag::err_static_function_scope); NewVD->setInvalidDecl(); @@ -7620,7 +7617,7 @@ static OpenCLParamType getOpenCLKernelParameterType(Sema &S, QualType PT) { // OpenCL extension spec v1.2 s9.5: // This extension adds support for half scalar and vector types as built-in // types that can be used for arithmetic operations, conversions etc. - if (!S.getOpenCLOptions().isEnabled("cl_khr_fp16") && PT->isHalfType()) + if (!S.getOpenCLOptions().cl_khr_fp16 && PT->isHalfType()) return InvalidKernelParam; if (PT->isRecordType()) |