Mercurial > hg > CbC > CbC_llvm
comparison clang/test/SemaObjCXX/const-cast.mm @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
147:c2174574ed3a | 150:1d019706d866 |
---|---|
1 // RUN: %clang_cc1 -fsyntax-only -verify %s | |
2 | |
3 @class Foo; | |
4 | |
5 void test() { | |
6 const Foo *foo1 = 0; | |
7 Foo *foo2 = foo1; // expected-error {{cannot initialize}} | |
8 } | |
9 | |
10 void test1() { | |
11 const Foo *foo1 = 0; | |
12 Foo *foo2 = const_cast<Foo*>(foo1); | |
13 } |