File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -3161,10 +3161,11 @@ bool Compiler<Emitter>::VisitExtVectorElementExpr(
3161
3161
3162
3162
template <class Emitter >
3163
3163
bool Compiler<Emitter>::VisitObjCBoxedExpr(const ObjCBoxedExpr *E) {
3164
+ const Expr *SubExpr = E->getSubExpr ();
3164
3165
if (!E->isExpressibleAsConstantInitializer ())
3165
- return this ->emitInvalid (E);
3166
+ return this ->discard (SubExpr) && this -> emitInvalid (E);
3166
3167
3167
- return this ->delegate (E-> getSubExpr () );
3168
+ return this ->delegate (SubExpr );
3168
3169
}
3169
3170
3170
3171
template <class Emitter >
Original file line number Diff line number Diff line change @@ -11,3 +11,28 @@ @interface NSString
11
11
@end
12
12
constexpr NSString *t0 = @" abc" ;
13
13
constexpr NSString *t1 = @(" abc" );
14
+
15
+
16
+ #if __LP64__
17
+ typedef unsigned long NSUInteger ;
18
+ typedef long NSInteger ;
19
+ #else
20
+ typedef unsigned int NSUInteger ;
21
+ typedef int NSInteger ;
22
+ #endif
23
+
24
+
25
+ @class NSNumber ;
26
+
27
+
28
+ @interface NSObject
29
+ + (NSObject *)nsobject ;
30
+ @end
31
+
32
+ @interface NSNumber : NSObject
33
+ + (NSNumber *)numberWithInt : (int )value ;
34
+ @end
35
+
36
+ int main (void ) {
37
+ NSNumber *bv = @(1391126400 * 1000 ); // both-warning {{overflow in expression; result is -443'003'904 with type 'int'}}
38
+ }
You can’t perform that action at this time.
0 commit comments