FWIW, GCC does warn on similar code - the reason it doesn't warn here is
that the function is `inline` and never called, so GCC probably never
analyses it (I pasted your code here and added a few cases to demonstrate
GCC's quirks compared to Clang's here: https://godbolt.org/z/YM9q91bx1 )
So far a
I'm /guessing/ this API doesn't respond with attributes clang doesn't
recognize (CC'd Aaron Ballman who would likely know the details better than
I do). Does the API correctly respond with a non-zero number of attributes
for any clang-supported attribute (listed here:
https://clang.llvm.org/docs/At
On Thu, Sep 23, 2021 at 3:34 AM John Emmas via cfe-users <
cfe-users@lists.llvm.org> wrote:
> On 22/09/2021 18:21, Reid Kleckner via cfe-users wrote:
> > Looking back in the thread, I found the example code, and I see that
> > MSVC refuses to inline this helper, but clang will inline it. I
> > bel
Probably Reid and Hans are folks to start with for Windows support
On Wed, Sep 22, 2021 at 4:38 AM Jeffrey Walton via cfe-users <
cfe-users@lists.llvm.org> wrote:
> On Wed, Sep 22, 2021 at 7:21 AM John Emmas via cfe-users
> wrote:
> >
> > On 21/09/2021 14:24, John Emmas via cfe-users wrote:
> >
I'm not sure it's the right/necessary solution, but one way would be to
move the function definition (for the_keyboard) out of line (define it in
some .cpp/.cc/whatever file, not in the header) - if you don't want it to
be inlined.
On Mon, Sep 20, 2021 at 6:56 AM John Emmas via cfe-users <
cfe-use
On Fri, Sep 3, 2021 at 2:55 PM Richard Smith via cfe-dev <
cfe-...@lists.llvm.org> wrote:
> On Fri, 27 Aug 2021 at 11:03, Andy Gibbs via cfe-users <
> cfe-users@lists.llvm.org> wrote:
>
>> Hi there,
>>
>> I'm hitting a rather difficult problem. I have to compile with RTTI data
>> structures gener
Ah, LLVM IR isn't really the place to determine how the source was written
- the names of those LLVM values aren't always preserved (generally in
optimized builds of clang the names will not be generated) - that said,
even some LLVM features rely on the names, so it's not totally unusable.
You can
LLVM IR switch instructions always have a default:
https://llvm.org/docs/LangRef.html#switch-instruction - that jumps over the
body of the switch. (when lowering C code to LLVM IR the default would be
put after the loop, and the breaks from any case statements would jump over
that default block)
O
On Wed, Jul 14, 2021 at 10:16 AM Bella V wrote:
>
> Thanks a lot! It works.
>
> Also there is no IR code generated for macros. Is there a way to relate
> llvm::value's that refer to macros.
Not that I know of, no. If you're interested in doing source analysis
like this - you might want to use a
You could check where the macro is defined, I guess?
If it's in a DIMacroFile i guess it's not a compiler builtin. It might
still be from a system header, etc, if that matters to you - so then
you'd have to filter by the DIMacroFile's 'file' attribute.
On Tue, Jul 13, 2021 at 7:00 PM Bella V wrot
Add -fdebug-macro
On Tue, Jul 13, 2021 at 4:05 PM Bella V via cfe-users
wrote:
>
> Hello All,
>
> I'm trying to build a list of macros in a compilation unit using
> CU->getMacros().
> I do not see the macros field in DICompileUnit output.
> https://godbolt.org/z/b8cM1Yf7v
>
> Please let me know
On Tue, May 25, 2021 at 1:13 PM Bella V wrote:
> Thanks! It works.
>
> One sub-question: How do we analyze the member dereferenced struct
> variables as dbg.declares only has the declaration info as inside the
> function the struct variable types could have members dereferenced as well.
>
> Examp
You'd have to analyze the dbg.declares and track that they refer to the
same thing as the geps/loads you're interested in - from the dbg.declares
(& dbg.values) you can follow those to find the variables they refer to.
On Thu, May 20, 2021 at 12:18 PM Bella V via cfe-users <
cfe-users@lists.llvm.o
On Wed, Feb 17, 2021 at 9:17 PM Vivek Pandey <
vivek.pan...@tallysolutions.com> wrote:
> Dear David,
>
>
>
> Greeting!
>
>
>
> Please find details inline.
>
>
>
> Looking forward to hear from you.
>
>
>
>
>
> Best Regards,
>
>
>
> Vivek
>
>
>
> *From:* David Blaikie
> *Sent:* Thursday, February 1
On Wed, Feb 17, 2021 at 12:08 AM Vivek Pandey <
vivek.pan...@tallysolutions.com> wrote:
> I think Clang, on/for windows, should give a compile time flag/option that
> can be used to control it (A flag when set make compile-time operator like
> sizeoff to behave like MSVC or non-MSVC)
>
But that w
Clang on Windows is designed to be compatible with MSVC - which has
different layout requirements than the Itanium ABI/GCC on Linux. I don't
think there's a way to use the same ABI on both platforms - especially not
if you are interacting with any code compiled by another compiler on both
platforms
from the llvm::Function you can get a DISubprogram (Function's
getSubprogram), from there you could get the DISubprogram's type (getType)
and then poke around at the elements of the type, I guess.
On Tue, Jan 26, 2021 at 10:39 PM Bella V wrote:
> Thank you for the clarification. How do we access
the location of composite types isn't stored in a DILocation - it's stored
in the 'file'/'line' attributes of the DICompositeType (similarly, the
members have a 'file' and 'line' attribute).
See for instance line 39 of the LLVM IR in https://godbolt.org/z/o3oce5 :
!12 = distinct !DICompositeType(
Not sure I understand the question - llvm.dbg.declare can be
queried/examined/etc through the usual LLVM IR APIs, yes - it's an
intrinsic call, with operands, etc. It's a DbgVariableIntrinsic (
https://llvm.org/doxygen/classllvm_1_1DbgVariableIntrinsic.html ) you
can interrogate for information.
O
You'd have to get IR from somewhere that has attached debug info - such as
clang -g
On Tue, Jan 12, 2021 at 1:22 PM Bella V wrote:
> Do we have to initially attach some metadata to the Value? Because in
> function pass, when I do F.getAllMetadata(MDs), i do not see any metadata
> appending to MD
On Mon, Jan 11, 2021 at 4:33 PM Ayush Mittal via cfe-users <
cfe-users@lists.llvm.org> wrote:
> Hello Cfe Users,
>
> Could you please point to an effective way to get Source Location details
> from an IR code.
> From the documentation, I think this could be a way:
> Function Pass-> LLVM Value-> MD
Looks like most of the difference can be accounted for by the fact that A
is not default constructible - which probably causes some more complicated
code in the standard library which the compiler isn't currently able to see
through. I haven't looked at the specifics of what that might be:
$ cat v
You might need to provide more details - at least a cursory example shows
the function call in the ast dump: https://godbolt.org/z/zvqTa3
On Thu, Dec 3, 2020 at 4:02 AM Владимир Фролов via cfe-users <
cfe-users@lists.llvm.org> wrote:
> Greetings! I'm using clang for source-to-source translation.
On Mon, Nov 16, 2020 at 4:49 PM Sven Köhler via cfe-users
wrote:
>
> Am 16.11.20 um 21:49 schrieb David Blaikie via cfe-users:
> > On Mon, Nov 16, 2020 at 12:36 PM Sven Köhler via cfe-users
> > wrote:
> >>
> >> Can you elaborate what is happening here?
>
On Mon, Nov 16, 2020 at 12:36 PM Sven Köhler via cfe-users
wrote:
>
> Hi,
>
> consider the following code:
>
> uint16_t testa4(uint8_t x, uint8_t y) {
> return ( (uint16_t)x << 0 )
> | ( (uint16_t)y << 8 );
> }
> uint16_t testb3(uint16_t x, uint16_t y) {
> return x|y;
> }
> uin
Yep, pretty weird that it tries to write to an empty file name.
What's the exact raw clang command you used that printed that cc1 command
line?
On Mon, Oct 5, 2020 at 6:46 AM Danijel DOMAZET <
p-danijel.doma...@devialet.com> wrote:
> Hi David, Hi Fang-rui,
>
> Just to remind, when I add -save-te
Can you confirm other tools given similar path specifications in similar
circumstances (command line/current working directory/etc) succeed where
clang fails? (MSVC, notepad, gcc, 'cat' (if Windows has a 'cat'))
On Wed, Sep 9, 2020 at 10:41 AM Telium Technical Support via cfe-users <
cfe-users@lis
Unfortunately, probably the first thing I'd try is assembling with the GNU
assembler instead (using clang -fno-integrated-as, or using gcc as your
assembler driver should reach your system assembler which is probably gas).
LLVM's integrated assembler could use a better error message, to be sure.
On Sun, Aug 23, 2020 at 9:40 AM Manu agarwal wrote:
> Hi David,
>
> Thanks for the reply. I missed to mention the environment and what i am
> trying to do.
>
>
>1. Environment is ClangCL (version 10.0), Microsoft Visual Studio.
>
>2. I assumed that since the 'constexpr if' evaluates t
From what I could test on godbolt, using LLVM evrsions back to 5.0,
Clang does reject the "return ClientMain();" call you aren't seeing an
error on. So I'm not sure what compiler/version/situation you're
running, but at least at first blush it doesn't look like clang.
On Fri, Aug 21, 2020 at 1:29
Oh, sorry, I didn't read the question in detail about how -save-temps
was making things work when they otherwise were not.
If you run clang with -### it'll show the command lines it's using,
which should show you where it's trying to write the files so you can
change that/make them writable. I'm n
On Thu, Aug 13, 2020 at 2:59 AM Danijel DOMAZET
wrote:
>
> Thanks David.
> Why do you think this could be about current dir?
> Isn't it about TMP (or TEMP or TMPDIR) environment variables?
Because I ran it locally, and observed that that's where the files
were written to.
>
> Thanks,
> Danijel D
Looks like it writes the files to the current directory - do you have
permission to access the current directory?
On Wed, Aug 12, 2020 at 6:28 AM Danijel DOMAZET via cfe-users
wrote:
>
> Hi clang users,
> I am using Windows10 + Cygwin + Eclipse + LLVM toolchain to build a C/C++
> project.
>
> Th
I don't think clang/llvm provides much in the way of infrastructure
that would help with that task. I've seen things like that done with
https://github.com/microsoft/detours fwiw.
On Fri, Jul 24, 2020 at 7:34 AM Mahmood Naderan via cfe-users
wrote:
>
> Hi,
> I would like to know if it is possible
In the sense of "can I link an object built with clang 10 with an
object built with clang 7" - generally: yes. That's defined by the
Itanium ABI, the same thing that lets you link Clang built objects
with GCC built objects, for instance.
On Sun, Jul 12, 2020 at 9:29 AM Danny Zhu via cfe-users
wro
On Sun, Jun 14, 2020 at 2:13 PM JacobK622 via cfe-users
wrote:
>
> To, llvm/clang
> Firstly I'd like to preface this by saying a few things:
>
> 1. I don't always know what is or isn't socially appropriate to
> say/ask/do, so please don't get mad at me if I say/ask/do something
> inappr
Looks like comparing getAccessSpecifierAsWritten with
getAccessSpecifier might help:
https://clang.llvm.org/doxygen/classclang_1_1CXXBaseSpecifier.html#a6abcd6d5d707f4cab88bab1fc916bfad
On Mon, Jun 8, 2020 at 1:09 PM Csaba Raduly via cfe-users
wrote:
>
> Hi all,
>
> If I run `clang++ -std=c++17 -
Yeah, can't seem to divine the concrete wording here either - perhaps
Richard will have a moment to chime in.
On Sun, Apr 19, 2020 at 6:10 AM Jaroslav Zeman via cfe-users <
cfe-users@lists.llvm.org> wrote:
> >
> > What happens if you change the order of the .cpp files, putting
> > template.cpp fi
I don't believe this code is valid according to C++. I believe it would
require an explicit instantiation of the ctor/dtor somewhere to make that
code valid - though I don't have chapter and verse on the spec at hand just
now to back that up.
On Fri, Apr 17, 2020 at 6:54 AM Jaroslav Zeman via cfe-
What make command did you run?
On Sat, Mar 7, 2020 at 8:09 AM Mahmood Naderan via cfe-users <
cfe-users@lists.llvm.org> wrote:
> Hi,
> I want to use a specific revision number and for the cmake command below
>
> cmake ~/codestitcher/source/llvm-3.9 -DCMAKE_BUILD_TYPE=Release
> -DLLVM_TARGETS_TO_B
I don't understand - you'll need to be more specific. (anything that's
"this doesn't /always/ happen" sounds like there's a /lot/ going on that's
not specified in your question... compilers in general and clang in
particular are /very/ deterministic, so they do do the same thing every
time - so if
Guessing these sort of functions would be relevant:
https://clang.llvm.org/doxygen/classclang_1_1VarDecl.html#a617bcdd5baaab0ccba71a96cd9c2ed03
On Sun, Feb 16, 2020 at 5:43 PM Robert Ankeney via cfe-users <
cfe-users@lists.llvm.org> wrote:
> Suppose I have some code like:
>
> template
> Type tVar
+Sam in case he's got some thoughts or can rope in others who might.
On Sun, Jan 26, 2020 at 1:03 PM tastytea via cfe-users <
cfe-users@lists.llvm.org> wrote:
> Hi,
> I recently started using clangd (9.0.1) with --clang-tidy. I noticed
> that suppressing diagnostics only sometimes works.
>
> For
There are lots of reasons a program might fail to do what's desired when
optimized - dead code is only one of them, any reason to believe that's the
issue at hand? But no, LLVM doesn't really have any support for that.
You might try running your program using the various sanitizersn (address,
memo
I'd guess you'd call "getDecl" to get the decl the DeclRefExpr is
referencing, then dyn_cast that (the decl is a ValueDecl*) to VarDecl to
see if it's a variable that's being referenced (could be a function, etc,
etc) then do whatever you want to do with that VarDecl.
On Tue, Dec 3, 2019 at 1:33 P
Depends on your platform, but probably in some section or another in the
object/executable. Try running objdump (or llvm-objdump) -h on the object
or executable with/without the switch and see which new section shows up.
Then you can use objdump -s (I think it's -s, check the man page, etc) to
dump
Looks like valgrind catches some things around here:
==115793== Conditional jump or move depends on uninitialised value(s)
==115793==at 0x402671: main (t-sqrlo.c:106)
==115793==
==115793== Conditional jump or move depends on uninitialised value(s)
==115793==at 0x40268A: main (t-sqrlo.c:107
UBSan doesn't cover this sort of thing - MSan is the sanitizer for catching
uninitialized values. (MSan is, unfortunately, a bit more finicky to use
because the whole program (including the standard library) must be compiled
with the feature enabled for it to work correctly - I don't have an MSan
e
clang generally also understands __null (for the same reasons GCC does - to
provide better diagnostics when using NULL in non-pointer contexts). See,
for example, this warning (not an error): https://godbolt.org/z/KvdW7a
Can't say I know much about the NDK or what version of clang it has, what
fla
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
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:
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
> >> >
> >
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
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
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 for a
while. So if you use the extra parens without writing an ass
On Wed, Oct 30, 2019 at 5:36 PM Hans Åberg wrote:
>
>
> > On 31 Oct 2019, at 00:28, David Blaikie wrote:
> >
> >
> >
> > On Wed, Oct 30, 2019 at 4:25 PM Hans Åberg wrote:
> >
> >> I believe that GMP is just using integer types, and then uses that to
> make multiprecision integers, rational numb
On Wed, Oct 30, 2019 at 4:25 PM Hans Åberg wrote:
>
> > On 30 Oct 2019, at 23:50, David Blaikie wrote:
> >
> >> On Wed, Oct 30, 2019 at 2:29 PM Hans Åberg wrote:
> >> Indeed, very hard to figure out. If it is some hidden undefined
> behavior causing it, the UBSan should have caught it, but it d
On Wed, Oct 30, 2019 at 2:29 PM Hans Åberg wrote:
> Indeed, very hard to figure out. If it is some hidden undefined behavior
> causing it, the UBSan should have caught it, but it does not.
Right - but especially with numerics (especially floating point) there's
loads of room for valid but diffe
I ran the test & understand it a bit better now - so the abort is part of
the code, when the test fails, the test harness uses abort to fail.
So this isn't "clang causes abort" (it didn't select a bad instruction,
etc) this is "clang causes test failure" - this could be any number of
things in ter
clang-tidy in the command line you gave didn't seem to modify the file for
me, did it modify the file for you?
Are you objecting to the suggestion, or that it was automatically applied?
I would think it'd be a bug to apply any fixit/hint if there are multiple
possible suggestions.
But the existen
ly tested with ubsan
> and results are included at https://gmplib.org/devel/tm/gmp/date.html.
>
> On Oct 25, 2019, at 15:32, David Blaikie via cfe-users <
> cfe-users@lists.llvm.org> wrote:
>
> UBSan doesn't catch everything - you could also try ASan and/or valgrind,
UBSan doesn't catch everything - you could also try ASan and/or valgrind,
etc. (MSan if you want, but that's a bit fussier/more work to use)
On Fri, Oct 25, 2019 at 3:16 PM Hans Åberg wrote:
> That is the reason I tried the UBSan, but as it changes optimization, it
> does not wrok.
>
>
> > On 26
Yeah, coming across compiler bugs does happen - but more often it's bugs in
input programs. (one of the reasons compiler engineers aren't likely to
jump on reproducing and reducing misbehaving programs, because on the odds,
it's not a bug in the compiler)
On Fri, Oct 25, 2019 at 3:12 PM Hans Åberg
It's hard to know if it's the compiler's fault without a test case - due to
the nature of undefined behavior and other things (implementation defined
behavior and unspecified behavior) in C++, that the program behaves as
expected with another compiler or another set of flags doesn't give a
strong i
It's pretty hard to conclude whether it's a bug in your code or in the
compiler, or both, without narrowing down a test case.
On Fri, Oct 25, 2019 at 2:01 PM Hans Åberg wrote:
> So then there probably is an issue with the optimization.
>
> Just run 'gmp-6.1.2’ with MacPorts clang 9.0.0; I got:
>
Hard to know what might be happening - what sort of failure you're seeing,
etc. Perhaps UBSan is stabilizing/changing unspecified rather than
undefined behavior - or the test is failing due to some undefined behavior
that UBSan doesn't catch, etc.
On Fri, Oct 25, 2019 at 11:25 AM Hans Åberg wrote
UBSan adds code to check things, it necessarily changes optimizations by
having those checks in. It shouldn't affect the behavior of programs that
don't exhibit UB (but I imagine it could affect the behavior of programs
relying on specific IB (Implementation Defined Behavior)).
Reducing a test ca
You mentioned "the check gives one error" - which check?
On Fri, Oct 25, 2019 at 8:21 AM Hans Åberg via cfe-users <
cfe-users@lists.llvm.org> wrote:
> [Please cc me, as I am not on the list.]
>
> When compiling GMP 6.1.2 with MacPorts clang9 on MacOS 10.15, the check
> gives one error, but if tur
Not a requirement, but a suggestion - generally clang/llvm are optimized
best with themselves. So it's generally considered the "optimal" setup.
On Sat, Oct 19, 2019 at 10:48 AM Pratyush Das via cfe-users <
cfe-users@lists.llvm.org> wrote:
> Hi,
>
> I noticed here -
> https://clang.llvm.org/docs/
On Wed, Sep 25, 2019 at 2:03 PM Christopher Williams
wrote:
> Thank you Dave. I have an understanding of constexpr evaluation, and
> realise the compiler is free to do what it likes in all but test4... I
> suppose I'd really like to know if there is an actual limit/threshold in
> place. If test3
constexpr is a red herring here - except in 4, where you've used the
constexpr keyword to create a constexpr context, in 1-3 these are just
normal function calls the compiler optimizes as it sees fit - and it seems
it saw fit to unroll and optimize to a constant cases 1 and 2, but not case
3 (perha
On Fri, Aug 9, 2019 at 6:03 PM Bob Eastbrook
wrote:
> On Mon, Aug 5, 2019 at 1:36 PM David Blaikie wrote:
>
> > Does it work with gdb?
>
> It works with gdb. More info:
>
> g++ & gdb -- works, even without debuginfo for libstdc++
>
^ for std::string I'd expect this. For std::fstream, I expect
Does it work with gdb? I'm guessing maybe lldb doesn't support the build-id
feature that redhat uses (
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/developer_guide/intro.debuginfo
)
?
I'd try gdb + gcc + binutils ld (or gold) + libstdc++ (use std::fstream as
an exa
No, it shouldn't - clang attempts to avoid emitting duplicate debug info
across the program (it assumes you built the whole program and all
libraries with debug info), gcc assumes the same thing though in slightly
different/fewer ways.
The solution is to install the -dbg build of your libstdc++ pa
Generally the linker is invoked via the compiler wrapper (eg: "clang x.o
y.o" to produce a.out), so you can add to your linker flags "-fuse-ld=lld"
to tell the compiler wrapper to lld.
On Mon, Mar 4, 2019 at 7:06 AM Itaru Kitayama via cfe-users <
cfe-users@lists.llvm.org> wrote:
> Hi,
> Keeping t
Supporting the oldest form doesn't seem to be a priority for a warning - if
you have a very old codebase, probably not worth building it with warnings
enabled. Updating code to use more modern/idiomatic forms is within scope
for Clang's warnings, within reason, I think.
- Dave
On Fri, Dec 28, 201
You could add -Wno-register to the compilation flags, or remove the use of
the register keyword from boost, or not compile in C++17 mode?
- Dave
On Tue, Dec 25, 2018 at 1:10 PM Osman Zakir via cfe-users <
cfe-users@lists.llvm.org> wrote:
> When I tried to build Boost with LLVM, I got the error m
On Wed, Dec 12, 2018 at 1:30 AM Andy Gibbs wrote:
> On 10 December 2018 18:17, David Blaikie wrote:
>
> Possible that the online one isn't built with assertions enabled (you
> could test this with other known crashers to see if they reproduce on
> godbolt with assertion crash dumps or only with r
Possible that the online one isn't built with assertions enabled (you could
test this with other known crashers to see if they reproduce on godbolt
with assertion crash dumps or only with raw segfaults)? If that's the
case,t hen it's possible that the codepath that should assert continues on
and pe
Sure, that'd be great - http://bugs.llvm.org
On Tue, Nov 6, 2018 at 3:02 AM Werner LEMBERG wrote:
>
> > Yeah, looks like a bug in Clang to me - CC'ing Richard Smith in case
> > this is quick/easy/obvious to him.
>
> Thanks to all for checking! Shall I open an issue for clang?
>
>
> Werner
>
ether it violates the standard or not is beyond my knowledge
> though.
>
> type params
> https://godbolt.org/z/WpET78
>
> nontype params
> https://godbolt.org/z/PZIaDn
>
> Jan
>
>
> On Nov 5, 2018, at 4:36 PM, David Blaikie via cfe-users <
> cfe-users@lists
Yeah, looks like a bug in Clang to me - CC'ing Richard Smith in case this
is quick/easy/obvious to him. Here's my slightly modified test case
comparing Clang and GCC's behavior, and adding a non-member overload
situation to demonstrate that that works on both compilers:
https://godbolt.org/z/cTq06R
Not sure who's doing most of the work on clang-format these days - Sam,
maybe you know?
On Mon, Sep 24, 2018 at 2:07 AM Jakob van Bethlehem via cfe-users <
cfe-users@lists.llvm.org> wrote:
> Dear all,
>
> Recently we introduced clang-format into our company, for formatting
> c++-code. After some
Don't know of any quick way to do that in LLVM - I guess companies/folks
who do this go into the source code in Clang's driver and mess with it.
- Dave
On Mon, Sep 17, 2018 at 10:10 PM Alexander Biddulph via cfe-users <
cfe-users@lists.llvm.org> wrote:
> I am trying to compile clang/llvm to targ
(Teresa, perhaps you can correct me if I'm wrong here)
On Thu, Aug 9, 2018 at 2:21 PM Mateusz Zych via cfe-users <
cfe-users@lists.llvm.org> wrote:
> Hi :)
>
> I am trying to compile simple project consisting of an executable "app"
> and static library "bar".
> Note that I'm enabling thinLTO for
If you're looking to contribute to Clang & have a particular interest in
the AST, etc - the way I started was to look at simple/small bugs in
diagnostics - either false positives (a diagnostic (often a warning)
produced when it shouldn't be (wehn it doesn't tell the user something
actionable/buggy)
Yeah, the problem is that '~a' is an expression of type 'int' due to
something called "the usual arithmetic conversions" - basically in almost
any arithmetic expression in C++, all the smaller int types get promoted up
to int (this is oversimplifying a bit - but sufficient here - if you look
up tha
Yeah - it's here, but not sure it's really all that much use in my humble
opinion. I think the idea was to make it more accessible (you can send mail
without subscribing) & to separate the user questions from the developer
questions - but I'm not sure there are enough users here to bootstrap much
o
+Adrian for questions about dsymutil.
Though I'm not quite sure how the subject line relates to the question?
On Thu, Mar 8, 2018 at 7:03 PM Michael Eisel via cfe-users <
cfe-users@lists.llvm.org> wrote:
> Hi,
>
> I'm hitting some segfault when I run dsymutil without any flags, but when
> I add
+Reid for clang-cl info
On Tue, Mar 6, 2018 at 6:49 AM Ted Mielczarek via cfe-users <
cfe-users@lists.llvm.org> wrote:
> Hi there,
>
> We're continuing to work on making Firefox build with clang-cl in more
> configurations, and one of my colleagues recently wondered[1] if we could
> generate Make
can you show the actual command & it's exact output? I'm guessing you've
got a -c (or -S, etc) in there somewhere, perhaps?
On Wed, Jan 24, 2018 at 12:08 AM Sameer Joshi via cfe-users <
cfe-users@lists.llvm.org> wrote:
> Hi,
>
> I am compiling multiple source files and trying to generate one exec
(moving this thread from llvm-bugs (which is just for our automated bug
database emails) to cfe-users)
GCC uses an optimization for debug info that Clang has, but does not enable
on platforms where the default debugger is LLDB (because LLDB doesn't
handle debug info that has this optimization enab
Do you want to identify the same entity across a valid program's various
source files? Across changes to that program? (what changes?)
If you want to do the former, then producing the mangled name of the entity
is probably what you want. (some part of the ABI code in Clang could give
you that, I w
There's no structural identity of code in Clang that I know of - I know
someone's building a tool for doing structural similarity for things like
plagiarism detection (I think there are some patches on the clang mailing
list).
But if you only need identity within a single process, the pointer valu
On Fri, Aug 5, 2016 at 3:56 PM Chris Peterson via cfe-users <
cfe-users@lists.llvm.org> wrote:
> I suppressed a -Wunreachable-code warning in Firefox earlier this year
> [1] by adding extra parentheses, as suggested by Xcode's clang on OS X:
>
> objdir-osx/dom/bindings/TestJSImplGenBinding.cpp:476
It's really hard to help much without a reproduction - also, trying to
create a reduced example of the problem can often help you find the issue.
So, if you want further advice, I'd suggest starting by ripping apart (a
copy of) your program until you can't remove anything else without losing
the in
you would need to build with debug info (-g) or similar (there are a few
other options that enable the same source location info) to produce the
debuglocs that will tell you about that
On Mon, Jul 11, 2016 at 9:40 PM, Shail Dave via cfe-users <
cfe-users@lists.llvm.org> wrote:
> Hi,
>
> I am work
Short answer: No, unfortunately.
Longer answer: The runtime failure should help you catch these. Clang does
have a diagnostic for /really/ obvious cases of null dereference:
null.c:3:3: warning: indirection of non-volatile null pointer will be
deleted, not trap [-Wnull-dereference]
*((int*)NULL
+Daniel Jasper, one of the clang-format developers
On Fri, Apr 8, 2016 at 12:13 AM, Felix Mauch via cfe-users <
cfe-users@lists.llvm.org> wrote:
> Hi all,
>
> I recently stumbled across clang-format and I really like it so far :)
> However, I was not able to reproduce some of our csg guidelines.
out first removing the cache,
>>> CMakeCache.txt. Since the option () command that sets
>>> LLVM_ENABLE_ASSERTIONS didn't include FORCE, the previous cached value is
>>> preserved.
>>>
>>> Therefore, I'd recommend always re
1 - 100 of 112 matches
Mail list logo