mirror of
https://github.com/intel/llvm.git
synced 2026-01-24 00:20:25 +08:00
using "-parse-ast -verify". Updated all test cases (using a sed script) that invoked -parse-ast-check to now use -parse-ast -verify. Fixed a bug where using "-verify" instead of "-parse-ast-check" would not correctly create the DiagClient needed to accumulate diagnostics. llvm-svn: 42365
18 lines
501 B
C++
18 lines
501 B
C++
// RUN: clang -parse-ast -verify %s
|
|
|
|
extern char *bork;
|
|
char *& bar = bork;
|
|
|
|
void foo(int &a) {
|
|
}
|
|
|
|
typedef int & A;
|
|
|
|
void g(const A aref) {
|
|
}
|
|
|
|
int & const X; // expected-error {{'const' qualifier may not be applied to a reference}}
|
|
int & volatile Y; // expected-error {{'volatile' qualifier may not be applied to a reference}}
|
|
int & const volatile Z; /* expected-error {{'const' qualifier may not be applied}} \
|
|
expected-error {{'volatile' qualifier may not be applied}} */
|