Talk:Clang

From Wikipedia, the free encyclopedia
Jump to: navigation, search
          This article is of interest to the following WikiProjects:
WikiProject Computing / Software (Rated Start-class, Mid-importance)
WikiProject icon This article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Start-Class article Start  This article has been rated as Start-Class on the project's quality scale.
 Mid  This article has been rated as Mid-importance on the project's importance scale.
Taskforce icon
This article is supported by WikiProject Software (marked as Mid-importance).
 
WikiProject Free Software / Software / Computing  (Rated Start-class, Mid-importance)
WikiProject icon This article is within the scope of WikiProject Free Software, a collaborative effort to improve the coverage of free software on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Start-Class article Start  This article has been rated as Start-Class on the project's quality scale.
 Mid  This article has been rated as Mid-importance on the project's importance scale.
Taskforce icon
This article is supported by WikiProject Software.
Taskforce icon
This article is supported by WikiProject Computing.
 
WikiProject C/C++ (Rated Start-class, Low-importance)
WikiProject icon This article is within the scope of WikiProject C/C++, a collaborative effort to improve the coverage of C/C++ on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Start-Class article Start  This article has been rated as Start-Class on the quality scale.
 Low  This article has been rated as Low-importance on the importance scale.
Taskforce icon
This article falls within the scope of C.
This article falls within the scope of C++.
 
WikiProject Apple Inc. (Rated Start-class)
WikiProject icon This article is within the scope of WikiProject Apple Inc., a collaborative effort to improve the coverage of Apple, Macintosh, iOS and related topics on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Start-Class article Start  This article has been rated as Start-Class on the project's quality scale.
Checklist icon
 

Goal[edit]

  • Is it valid to say that Clang's goal is to replace GCC, period? It has different design goals. Comparison with pros and cons listed is even provided on CLangs site. — Preceding unsigned comment added by 82.131.68.81 (talk) 17:52, 7 April 2013 (UTC)

Untitled[edit]

  • I don't think it is valid to mark this as "Apple's fronted". yes, apple sponsors most of the development now but the code is open source and once version 1.0 is released I believe a wider community will be gathered.
    • I have reworded it to avoid the possessive implication. While Apple does sponsor a large part of the development, there are several non-Apple contributors as well. #75.168.182.194 (talk) 06:11, 18 December 2007 (UTC)
  • The article says the C support is complete. this is not true, there are still many bugs and missing features (va_arg missing on amd64 etc.) which results in clang not being able to compile many common C apps. I am also not sure why is clang "low" on importance, I believe it has a bright future, possibly replacing gcc as "the free C-family compiler" —Preceding unsigned comment added by 89.173.82.36 (talk) 21:45, 26 October 2008 (UTC)

And did Apple really want to? I can see how its useful to them, even more so if it's basing itself more on bsd/bsd licence rather than linux/gpl. I don't really get the point, they use gcc from non gpl programs in an accepted way, yet I read "but Apple is heavily funding Clang now because the GNU people put them in their sights wrt GCC. GNU played rough and got one over on NeXT (with GCC), but it's obvious that that lesson has been learned. Apple won't even allow any use of GPLv3 code, let alone integration into their system. This is what happens when you act anti-socially." so im confused. 217.43.34.130 (talk) 12:18, 21 July 2009 (UTC)

  • Is it just me or is the English word 'clang' English pronunciation: /ˈkleɪŋ/, and not English pronunciation: /ˈklæŋ/? KMeyer (talk) 02:36, 17 October 2009 (UTC)
The article seems correct for me because I can imagine a fake word clayng English pronunciation: /ˈkleɪŋ/ that I wouldn't pronounce like clang. Googling found some brief mentions of [æŋ] becoming [eɪŋ] in parts of North America, which could be a possibility. —Mrwojo (talk) 03:43, 17 October 2009 (UTC)
ACK. perhaps my dialect is just weird (I'm a North American speaker of English). KMeyer (talk) 04:09, 17 October 2009 (UTC)
  • It seems strange that the Background section doesn't mention gcc's change of license (GPL2->GPL3) as a main reason for Apple dropping gcc. —Preceding unsigned comment added by 83.114.82.27 (talk) 20:16, 8 May 2011 (UTC)
  • GPL3 also the reason for the BSDs moving to clang, for example FreeBSD has GPL3 versions of gcc in its ports system, but its base system is built with a GPL2 version from 2007. — Preceding unsigned comment added by 87.194.105.247 (talk) 18:31, 29 May 2011 (UTC)

Google uses Clang[edit]

A Google programmer has posted an interesting article about how Google uses and improves Clang for their C++ code. See either the LLVM blog or Google's Engineering Tools blog. They use Clang "to provide accurate and helpful warnings and diagnostics to engineers". They add warnings to Clang (ie., enhance it to detect "dangerous and potentially buggy constructs") and customize some of those warnings. They use these enhancements to systematically scan their entire code base:

When other teams at Google respond to production bugs, our team will often begin working to enable any Clang diagnostics that might have caught the bug. Within one week of production issues, we can sweep the entire code base using these diagnostics to fix any latent bugs.

See also the three-part series ([1], [2], [3]) on the LLVM blog entitled "What Every C Programmer Should Know About Undefined Behavior".

Should we mention Google's use of Clang in the article? (Any mention would need to be brief.) CWC 10:56, 3 June 2011 (UTC)

diffing the IF?[edit]

The Overview sections contains: "Changes to the compiler can be checked by diffing the IF.", yet IF is nowhere cited what it stands for. Can anybody knowledgable explain what IF is? Thanks, 194.246.123.103 (talk) 21:10, 23 July 2011 (UTC)

performance[edit]

...runtime performance of clang/LLVM output is sometimes worse than GCC's. GCC's compilation speeds are really slow, but runtime performance of binaries is generally (9/10 itw cases) better by 10+%. Phoronix this tests can back me up. "sometimes" suggests that it's like that in <50% cases. I'd suggest replacing it with "mostly" or "generally" (with reasonable defaults such as "-O2" or even "-mntune=native" flags). — Preceding unsigned comment added by 94.112.108.225 (talk) 18:51, 13 April 2012 (UTC)

Can you post a link to such survey? I then would update the article. 1exec1 (talk) 20:27, 23 April 2012 (UTC)

incremental compiling[edit]

In article this is mentioned several times, but as of now (Aug '12) there is no incremental compilation option (standalone server instance, nor IDE support, not counting proprietary X code). I guess article should reflect this more, to me it sounds like failed design goal (my POV, not developer's ofc). — Preceding unsigned comment added by 94.112.108.225 (talk) 13:14, 12 August 2012 (UTC)

PlayStation 4[edit]

Can we have a table with all of the supported OSes/products that use clang? like, how do we include the fact that the PS4 uses clang because I think it's pretty notable. Bumblebritches57 (talk) 20:11, 6 January 2014 (UTC)

Swift Programming Language[edit]

Should Swift be added as one of the languages? My understanding is Swift is also compiled via clang on LLVM.

Pacoup (talk) 18:11, 6 June 2014 (UTC)

Yes, Swift is supported by Clang, but I'm pretty sure it only works because Apple added a compatibility layer to all the function calls, etc allowing it to work seamlessly, I don't believe it's actually compiled to Objective-C, and further, I don't believe the Playstation 4 even supports Objective-C. Bumblebritches57 (talk) 19:15, 15 July 2014 (UTC)

Sourcing issues[edit]

It seems that most of the references for this article are to unreliable sources such as blogs, and/or to sources directly connected with Clang. It would be great if these could be replaced or supplemented with reliable secondary or tertiary sources. In cases where this is not possible, some material may need to be removed from the article. —Psychonaut (talk) 10:54, 4 February 2015 (UTC)

Primary sources such as official blogs may be used for facts but should not be used for opinions. We should strive for third party sources, but just because a fact is mostly covered by primary sources does not mean it needs to be removed. Though yes, opinions and the like need 3rd party sources. PaleAqua (talk) 19:49, 17 February 2015 (UTC)