[PATCH] D85157: [Sema] Add casting check for integer to fixed point conversions

2020-08-03 Thread Bjorn Pettersson via Phabricator via cfe-commits
bjope added inline comments. Comment at: clang/lib/Sema/SemaCast.cpp:2660 return; + if (SrcType->isIntegerType() && DestType->isFixedPointType()) +return; vabridgers wrote: > bjope wrote: > > Is this really the intention with the patch? > > > > It does

[PATCH] D85157: [Sema] Add casting check for integer to fixed point conversions

2020-08-03 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers added inline comments. Comment at: clang/test/Sema/warn-bad-function-cast.c:49 +#ifdef FIXED_POINT + (void)(_Fract) if1(); // no warning +#endif bjope wrote: > bjope wrote: > > bjope wrote: > > > This should be added before the line saying `/* All fol

[PATCH] D85157: [Sema] Add casting check for integer to fixed point conversions

2020-08-03 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers updated this revision to Diff 282776. vabridgers marked 2 inline comments as done. vabridgers added a comment. remove -DFIXED_POINT from lit test, since it's not needed in this casting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85157/n

[PATCH] D85157: [Sema] Add casting check for integer to fixed point conversions

2020-08-03 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers marked 5 inline comments as done. vabridgers added a comment. I updated the commit header with more details since the first submission was obviously too terse. @bjope, I believe the update should address your comments. Comment at: clang/lib/Sema/SemaCast.cpp:2660

[PATCH] D85157: [Sema] Add casting check for integer to fixed point conversions

2020-08-03 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers updated this revision to Diff 282775. vabridgers added a comment. improve the commit message detail Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85157/new/ https://reviews.llvm.org/D85157 Files: clang/lib/Sema/SemaCast.cpp clang/te

[PATCH] D85157: [Sema] Add casting check for integer to fixed point conversions

2020-08-03 Thread Bjorn Pettersson via Phabricator via cfe-commits
bjope added inline comments. Comment at: clang/test/Sema/warn-bad-function-cast.c:49 +#ifdef FIXED_POINT + (void)(_Fract) if1(); // no warning +#endif bjope wrote: > bjope wrote: > > This should be added before the line saying `/* All following casts issue > >

[PATCH] D85157: [Sema] Add casting check for integer to fixed point conversions

2020-08-03 Thread Bjorn Pettersson via Phabricator via cfe-commits
bjope added inline comments. Comment at: clang/lib/Sema/SemaCast.cpp:2660 return; + if (SrcType->isIntegerType() && DestType->isFixedPointType()) +return; Is this really the intention with the patch? It does match the "summary" above, but isn't the war

[PATCH] D85157: [Sema] Add casting check for integer to fixed point conversions

2020-08-03 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. vabridgers requested review of this revision. This change squelches the warning for a cast from integer to fixed point conversions. Repository: rG LLVM Github Monorepo https://reviews.llvm