LLVM Project News and Details from the Trenches

Sunday, April 21, 2013

Clang support for C++11 and beyond

As of r179861, Clang implements the entirety of the C++11 language standard. The following features have been implemented since the release of Clang 3.2, along with our plans for "C++1y".

Thursday, April 18, 2013

Euro LLVM 2013 in Paris

In two weeks, the 2013 edition of the Euro LLVM conference will start in historic center of Paris, France.  The schedule has just been published.  Most of different aspects of the LLVM infrastructure will present at the event.  See below for the full details!

Monday, April 15, 2013

Status of the C++11 Migrator

Since the design document for cpp11-migrate, the C++11 migrator tool, was first proposed in early December 2012 development has been making steady progress. In this article I'll talk about what's been implemented in cpp11-migrate so far, what's coming up, and how you can get involved.

The purpose of the C++11 Migrator is to do source-to-source translation to migrate existing C++ code to use C++11 features to enhance maintainability, readability, runtime performance, and compile-time performance. Development is still early and transforms fall mostly into the first two categories. The migrator is based on Clang's LibTooling and the AST Matching library.

Most of the development so far has been carried out by a small core group at Intel. Our focus so far has been to set up project infrastructure and testing, implement a few basic transforms, and make sure those transforms work well. Our aim is to make this tool useful to the community so we're always listening for transform ideas and feedback.

Static analysis tools: using Clang in CppDepend

Static analysis is a method of computer program debugging that is done by examining the code without executing the program. The process provides an understanding of the code structure, can help to ensure that the code adheres to industry standards, and can find bugs not easy to detect.

To develop a C / C++ static analysis tool, a parser is needed to parse the source code. C++ is a very powerful language but its syntax is a little bit complicated, what makes the parser not easy to develop.

When we began the development of CppDepend about four years ago we needed a reliable C / C++ parser.  At that time, Clang was an option but was not widely used and we didn’t know if it would ultimately develop into a fully-featured compiler frontend.

Last year, for the major release of CppDepend 3.0, we re-evaluated our C / C++ parser with a goal of getting more reliable results.  We checked Clang to see where its evolution went and were very surprised that it now implements virtually all C++'11 features and became very popular.  Clang now provide solid infrastructure to write tools that need syntactic and semantic information about a program.

Wednesday, April 10, 2013

LLVM Recipient of the 2012 ACM System Software Award

The ACM just announced that the LLVM project is the recipient of the 2012 ACM System Software Award. This award recognizes a "software system that has had a lasting influence, reflected in contributions to concepts, in commercial acceptance, or both." Many important software systems are previous recipients of this award, including Eclipse, VMware, Eiffel, Make, Java, Apache, TCP/IP, PostScript, SMALLTALK, TeX, and UNIX (among others).

This is fantastic recognition for the impact LLVM has had on the compiler and languages industry, and is recognition that all LLVM Developers should feel proud of.

Wednesday, April 3, 2013

LLVM Debian/Ubuntu nightly packages

In order to facilitate testing and to improve the deployment of the LLVM toolchain, we are happy to publish LLVM Debian/Ubuntu nightly packages. Read on for information about how it works and what we're building.

Monday, April 1, 2013

Testing libc++ with -fsanitize=undefined

[This article is re-posted in a slightly expanded form from Marshall's blog]

After my last article, Testing libc++ with Address Sanitizer, I thought "what other tests can I run?"

Address Sanitizer (ASan) is not the only "sanitizer" that clang offers. There are "Thread Sanitizer" (TSan), "Undefined Behavior Sanitizer" (UBSan), and others. There's an integer overflow sanitizer which is called IOC coming in the 3.3 release of clang. The documentation for UBSan can be found on the LLVM site.

I have been looking at the results of running the libc++ test suite with UBSan enabled. Even if you're not interested in libc++ specifically, this post can be a useful introduction to useful Clang bug detectors, and shows several classes of problems they can find.