[cfe-users] Clang compilation options to solve the comaptible issue?

2019-10-31 Thread Guofeng Zhang via cfe-users
Hi, I just stat using clang 8 not long ago. I need to compile our old c++ source without changing it. It is compiled with Visual Studio before. Now I want to migrate to clang as the compiler. The following code segement can be compiled by clang: 1) for (int i = 0 ; i < 6 ; i++ ) {

Re: [cfe-users] clang-tidy bug?

2019-10-31 Thread Aaron Ballman via cfe-users
On Wed, Oct 30, 2019 at 9:23 PM David Blaikie wrote: > > Two separate issues here > > 1) the fixit hint, as one of a set of alternatives, isn't likely to be > removed/changed - the (albeit quirky) convention of using extra () to > indicate an intentional assignment in a condition has been around

Re: [cfe-users] clang-tidy bug?

2019-10-31 Thread David Blaikie via cfe-users
On Thu, Oct 31, 2019 at 8:45 AM Aaron Ballman wrote: > On Wed, Oct 30, 2019 at 9:23 PM David Blaikie wrote: > > > > Two separate issues here > > > > 1) the fixit hint, as one of a set of alternatives, isn't likely to be > removed/changed - the (albeit quirky) convention of using extra () to > in

Re: [cfe-users] Clang9 UBSan and GMP

2019-10-31 Thread David Blaikie via cfe-users
On Thu, Oct 31, 2019 at 2:30 AM Hans Åberg wrote: > > > On 31 Oct 2019, at 01:53, David Blaikie wrote: > > > >> Yes, but assuming that the GMP adheres to the C standard, there should > be no difference in the arithmetical values produced. > > > > Not necessarily - C (well, I don't know the C sta

Re: [cfe-users] clang-tidy bug?

2019-10-31 Thread Aaron Ballman via cfe-users
On Thu, Oct 31, 2019 at 1:31 PM David Blaikie wrote: > > > > On Thu, Oct 31, 2019 at 8:45 AM Aaron Ballman wrote: >> >> On Wed, Oct 30, 2019 at 9:23 PM David Blaikie wrote: >> > >> > Two separate issues here >> > >> > 1) the fixit hint, as one of a set of alternatives, isn't likely to be >> > r

Re: [cfe-users] clang-tidy bug?

2019-10-31 Thread David Blaikie via cfe-users
On Thu, Oct 31, 2019 at 11:19 AM Aaron Ballman wrote: > On Thu, Oct 31, 2019 at 1:31 PM David Blaikie wrote: > > > > > > > > On Thu, Oct 31, 2019 at 8:45 AM Aaron Ballman > wrote: > >> > >> On Wed, Oct 30, 2019 at 9:23 PM David Blaikie > wrote: > >> > > >> > Two separate issues here > >> > > >

Re: [cfe-users] clang-tidy bug?

2019-10-31 Thread Aaron Ballman via cfe-users
On Thu, Oct 31, 2019 at 2:28 PM David Blaikie wrote: > > > > On Thu, Oct 31, 2019 at 11:19 AM Aaron Ballman wrote: >> >> On Thu, Oct 31, 2019 at 1:31 PM David Blaikie wrote: >> > >> > >> > >> > On Thu, Oct 31, 2019 at 8:45 AM Aaron Ballman >> > wrote: >> >> >> >> On Wed, Oct 30, 2019 at 9:23 P

Re: [cfe-users] Clang9 UBSan and GMP

2019-10-31 Thread David Blaikie via cfe-users
On Thu, Oct 31, 2019 at 12:00 PM Hans Åberg wrote: > > > On 31 Oct 2019, at 18:40, David Blaikie wrote: > > > >> Right, but that is something one would avoid when computing > arithmetical results. > > > > One would try to, yes - but that's sort of what the whole discussion is > resolving around:

Re: [cfe-users] Clang9 UBSan and GMP

2019-10-31 Thread David Blaikie via cfe-users
On Thu, Oct 31, 2019 at 1:51 PM Hans Åberg wrote: > > > On 31 Oct 2019, at 21:40, David Blaikie wrote: > > > >> On Thu, Oct 31, 2019 at 12:00 PM Hans Åberg wrote: > >> > >> > On 31 Oct 2019, at 18:40, David Blaikie wrote: > >> > > >> >> Right, but that is something one would avoid when computi

[cfe-users] does clang support option like MSVC's /Zc:forScope-

2019-10-31 Thread Guofeng Zhang via cfe-users
Hi, In early versions of C++, the scope of a variable defined in a for loop header extended to the end of the block containing the loop. Is there way for clang to compile this old source? Thanks, Guofeng ___ cfe-users mailing list cfe-users@lists.llvm