This repository has been archived by the owner on Mar 28, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
24 tests have been updated for C++11 compatibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266387 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Charles Li
committed
Apr 14, 2016
1 parent
d077ad4
commit 234233d
Showing
24 changed files
with
529 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
// RUN: %clang_cc1 -fsyntax-only -verify %s | ||
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s | ||
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s | ||
|
||
struct B0; | ||
|
||
class A { | ||
friend class B {}; // expected-error {{cannot define a type in a friend declaration}} | ||
friend int; // expected-warning {{non-class friend type 'int' is a C++11 extension}} | ||
friend B0; // expected-warning {{specify 'struct' to befriend 'B0'}} | ||
friend int; | ||
#if __cplusplus <= 199711L | ||
// expected-warning@-2 {{non-class friend type 'int' is a C++11 extension}} | ||
#endif | ||
friend B0; | ||
#if __cplusplus <= 199711L | ||
// expected-warning@-2 {{unelaborated friend declaration is a C++11 extension; specify 'struct' to befriend 'B0'}} | ||
#endif | ||
friend class C; // okay | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.