diff options
| author | David Majnemer <david.majnemer@gmail.com> | 2013-10-09 00:22:23 +0000 |
|---|---|---|
| committer | David Majnemer <david.majnemer@gmail.com> | 2013-10-09 00:22:23 +0000 |
| commit | 767c1f84283acd1256ff3391b7e40da6289301f2 (patch) | |
| tree | 2f4814676123c01db4e6f9e33aaa55c706915412 /clang/test | |
| parent | e4e12d045583adbf1d4c1a11c21747066ba46f15 (diff) | |
| download | bcm5719-llvm-767c1f84283acd1256ff3391b7e40da6289301f2.tar.gz bcm5719-llvm-767c1f84283acd1256ff3391b7e40da6289301f2.zip | |
Make wording for certain invalid unary expressions more consistent.
An invalid decltype expression like 'decltype int' gives:
error: expected '(' after 'decltype'
This makes it so 'sizeof int' gives a similar one:
error: expected parentheses around type name in sizeof expression
llvm-svn: 192258
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p7.cpp | 2 | ||||
| -rw-r--r-- | clang/test/CXX/expr/expr.unary/expr.sizeof/p1.cpp | 2 | ||||
| -rw-r--r-- | clang/test/Parser/expressions.c | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p7.cpp b/clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p7.cpp index 0f8f5f5e75d..81e2ca5f1e4 100644 --- a/clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p7.cpp +++ b/clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p7.cpp @@ -16,5 +16,5 @@ static_assert(alignof(Y<char, int, sizeof(int)>) == alignof(int), ""); static_assert(alignof(Y<int, char, 1>) == alignof(int), ""); // expected-note {{in instantiation of}} void pr16992 () { - int x = alignof int; // expected-error{{missed parentheses around type name in alignof}} + int x = alignof int; // expected-error {{expected parentheses around type name in alignof expression}} } diff --git a/clang/test/CXX/expr/expr.unary/expr.sizeof/p1.cpp b/clang/test/CXX/expr/expr.unary/expr.sizeof/p1.cpp index c8a91892a93..aa76b3a7346 100644 --- a/clang/test/CXX/expr/expr.unary/expr.sizeof/p1.cpp +++ b/clang/test/CXX/expr/expr.unary/expr.sizeof/p1.cpp @@ -31,7 +31,7 @@ namespace pr16992 { template<typename T> struct ABC { int func () { - return sizeof T; //expected-error{{missed parentheses around type name in sizeof}} + return sizeof T; // expected-error {{expected parentheses around type name in sizeof expression}} } }; diff --git a/clang/test/Parser/expressions.c b/clang/test/Parser/expressions.c index dfc8f6c712b..95d6fb354f3 100644 --- a/clang/test/Parser/expressions.c +++ b/clang/test/Parser/expressions.c @@ -62,8 +62,8 @@ void test7() { struct pr16992 { int x; }; void func_16992 () { - int x1 = sizeof int; // expected-error{{missed parentheses around type name in sizeof}} - int x2 = sizeof struct pr16992; // expected-error{{missed parentheses around type name in sizeof}} - int x3 = __alignof int; // expected-error{{missed parentheses around type name in __alignof}} - int x4 = _Alignof int; // expected-error{{missed parentheses around type name in _Alignof}} + int x1 = sizeof int; // expected-error {{expected parentheses around type name in sizeof expression}} + int x2 = sizeof struct pr16992; // expected-error {{expected parentheses around type name in sizeof expression}} + int x3 = __alignof int; // expected-error {{expected parentheses around type name in __alignof expression}} + int x4 = _Alignof int; // expected-error {{expected parentheses around type name in _Alignof expression}} } |

