@@ -24,16 +24,13 @@ namespace strcmp {
24
24
static_assert (__builtin_strcmp(" abab" , " abab\0 banana" ) == 0 , " " );
25
25
static_assert (__builtin_strcmp(" abab\0 banana" , " abab\0 canada" ) == 0 , " " );
26
26
static_assert (__builtin_strcmp(0 , " abab" ) == 0 , " " ); // both-error {{not an integral constant}} \
27
- // both-note {{dereferenced null}} \
28
- // expected-note {{in call to}}
27
+ // both-note {{dereferenced null}}
29
28
static_assert (__builtin_strcmp(" abab" , 0 ) == 0 , " " ); // both-error {{not an integral constant}} \
30
- // both-note {{dereferenced null}} \
31
- // expected-note {{in call to}}
29
+ // both-note {{dereferenced null}}
32
30
33
31
static_assert (__builtin_strcmp(kFoobar , kFoobazfoobar ) == -1 , " " );
34
32
static_assert (__builtin_strcmp(kFoobar , kFoobazfoobar + 6 ) == 0 , " " ); // both-error {{not an integral constant}} \
35
- // both-note {{dereferenced one-past-the-end}} \
36
- // expected-note {{in call to}}
33
+ // both-note {{dereferenced one-past-the-end}}
37
34
38
35
// / Used to assert because we're passing a dummy pointer to
39
36
// / __builtin_strcmp() when evaluating the return statement.
@@ -72,14 +69,11 @@ constexpr const char *a = "foo\0quux";
72
69
static_assert (check(c), " " );
73
70
74
71
constexpr int over1 = __builtin_strlen(a + 9 ); // both-error {{constant expression}} \
75
- // both-note {{one-past-the-end}} \
76
- // expected-note {{in call to}}
72
+ // both-note {{one-past-the-end}}
77
73
constexpr int over2 = __builtin_strlen(b + 9 ); // both-error {{constant expression}} \
78
- // both-note {{one-past-the-end}} \
79
- // expected-note {{in call to}}
74
+ // both-note {{one-past-the-end}}
80
75
constexpr int over3 = __builtin_strlen(c + 9 ); // both-error {{constant expression}} \
81
- // both-note {{one-past-the-end}} \
82
- // expected-note {{in call to}}
76
+ // both-note {{one-past-the-end}}
83
77
84
78
constexpr int under1 = __builtin_strlen(a - 1 ); // both-error {{constant expression}} \
85
79
// both-note {{cannot refer to element -1}}
@@ -90,8 +84,7 @@ constexpr const char *a = "foo\0quux";
90
84
91
85
constexpr char d[] = { ' f' , ' o' , ' o' }; // no nul terminator.
92
86
constexpr int bad = __builtin_strlen(d); // both-error {{constant expression}} \
93
- // both-note {{one-past-the-end}} \
94
- // expected-note {{in call to}}
87
+ // both-note {{one-past-the-end}}
95
88
}
96
89
97
90
namespace nan {
@@ -114,8 +107,7 @@ namespace nan {
114
107
// / FIXME: Current interpreter misses diagnostics.
115
108
constexpr char f2[] = {' 0' , ' x' , ' A' , ' E' }; // / No trailing 0 byte.
116
109
constexpr double NaN7 = __builtin_nan(f2); // both-error {{must be initialized by a constant expression}} \
117
- // expected-note {{read of dereferenced one-past-the-end pointer}} \
118
- // expected-note {{in call to}}
110
+ // expected-note {{read of dereferenced one-past-the-end pointer}}
119
111
static_assert (!__builtin_issignaling(__builtin_nan(" " )), " " );
120
112
static_assert (__builtin_issignaling(__builtin_nans(" " )), " " );
121
113
}
0 commit comments