Skip to content

Commit

Permalink
Fixes for clang tests related to address spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
yuri91 committed Oct 3, 2023
1 parent 6648fdd commit 47f1971
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions clang/lib/Sema/SemaExprCXX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3724,6 +3724,7 @@ Sema::ActOnCXXDelete(SourceLocation StartLoc, bool UseGlobal,
QualType PointeeElem = Context.getBaseElementType(Pointee);

if (Pointee.getAddressSpace() != LangAS::Default &&
Context.getTargetInfo().isByteAddressable() &&
!getLangOpts().OpenCLCPlusPlus)
return Diag(Ex.get()->getBeginLoc(),
diag::err_address_space_qualified_delete)
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Cheerp/client/catch-client.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: not %clang_cc1 -triple cheerp-leaningtech-webbrowser-genericjs -fexceptions -fcxx-exceptions %s 2>&1 | FileCheck %s

// CHECK: error: Cheerp: Pointer to type 'client::Object' declared in the client namespace cannot be caught directly. Use 'cheerp::JSException' to capture foreign exceptions.
// CHECK: error: Cheerp: Pointer to type 'client_as client::Object' declared in the client namespace cannot be caught directly. Use 'cheerp::JSException' to capture foreign exceptions.

namespace [[cheerp::genericjs]] client
{
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Cheerp/client/throw-client.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: not %clang_cc1 -triple cheerp-leaningtech-webbrowser-genericjs -fexceptions -fcxx-exceptions %s 2>&1 | FileCheck %s

// CHECK: error: Cheerp: Pointer to type 'client::Object' declared in the client namespace cannot be thrown
// CHECK: error: Cheerp: Pointer to type 'client_as client::Object' declared in the client namespace cannot be thrown

namespace [[cheerp::genericjs]] client
{
Expand Down

0 comments on commit 47f1971

Please sign in to comment.