head	1.1;
branch	1.1.1;
access;
symbols
	netbsd-11-0-RC4:1.1.1.17
	netbsd-11-0-RC3:1.1.1.17
	netbsd-11-0-RC2:1.1.1.17
	netbsd-11-0-RC1:1.1.1.17
	perseant-exfatfs-base-20250801:1.1.1.17
	netbsd-11:1.1.1.17.0.10
	netbsd-11-base:1.1.1.17
	netbsd-10-1-RELEASE:1.1.1.17
	perseant-exfatfs-base-20240630:1.1.1.17
	perseant-exfatfs:1.1.1.17.0.8
	perseant-exfatfs-base:1.1.1.17
	netbsd-8-3-RELEASE:1.1.1.13
	netbsd-9-4-RELEASE:1.1.1.16
	netbsd-10-0-RELEASE:1.1.1.17
	netbsd-10-0-RC6:1.1.1.17
	netbsd-10-0-RC5:1.1.1.17
	netbsd-10-0-RC4:1.1.1.17
	netbsd-10-0-RC3:1.1.1.17
	netbsd-10-0-RC2:1.1.1.17
	netbsd-10-0-RC1:1.1.1.17
	netbsd-10:1.1.1.17.0.6
	netbsd-10-base:1.1.1.17
	netbsd-9-3-RELEASE:1.1.1.16
	cjep_sun2x:1.1.1.17.0.4
	cjep_sun2x-base:1.1.1.17
	cjep_staticlib_x-base1:1.1.1.17
	netbsd-9-2-RELEASE:1.1.1.16
	cjep_staticlib_x:1.1.1.17.0.2
	cjep_staticlib_x-base:1.1.1.17
	netbsd-9-1-RELEASE:1.1.1.16
	phil-wifi-20200421:1.1.1.17
	phil-wifi-20200411:1.1.1.17
	phil-wifi-20200406:1.1.1.17
	netbsd-8-2-RELEASE:1.1.1.13
	netbsd-9-0-RELEASE:1.1.1.16
	netbsd-9-0-RC2:1.1.1.16
	netbsd-9-0-RC1:1.1.1.16
	netbsd-9:1.1.1.16.0.2
	netbsd-9-base:1.1.1.16
	phil-wifi-20190609:1.1.1.16
	netbsd-8-1-RELEASE:1.1.1.13
	netbsd-8-1-RC1:1.1.1.13
	pgoyette-compat-merge-20190127:1.1.1.15.2.1
	pgoyette-compat-20190127:1.1.1.16
	pgoyette-compat-20190118:1.1.1.16
	pgoyette-compat-1226:1.1.1.16
	pgoyette-compat-1126:1.1.1.16
	pgoyette-compat-1020:1.1.1.16
	pgoyette-compat-0930:1.1.1.16
	pgoyette-compat-0906:1.1.1.16
	netbsd-7-2-RELEASE:1.1.1.7.2.1
	pgoyette-compat-0728:1.1.1.16
	clang-337282:1.1.1.16
	netbsd-8-0-RELEASE:1.1.1.13
	phil-wifi:1.1.1.15.0.4
	phil-wifi-base:1.1.1.15
	pgoyette-compat-0625:1.1.1.15
	netbsd-8-0-RC2:1.1.1.13
	pgoyette-compat-0521:1.1.1.15
	pgoyette-compat-0502:1.1.1.15
	pgoyette-compat-0422:1.1.1.15
	netbsd-8-0-RC1:1.1.1.13
	pgoyette-compat-0415:1.1.1.15
	pgoyette-compat-0407:1.1.1.15
	pgoyette-compat-0330:1.1.1.15
	pgoyette-compat-0322:1.1.1.15
	pgoyette-compat-0315:1.1.1.15
	netbsd-7-1-2-RELEASE:1.1.1.7.2.1
	pgoyette-compat:1.1.1.15.0.2
	pgoyette-compat-base:1.1.1.15
	netbsd-7-1-1-RELEASE:1.1.1.7.2.1
	clang-319952:1.1.1.15
	matt-nb8-mediatek:1.1.1.13.0.8
	matt-nb8-mediatek-base:1.1.1.13
	clang-309604:1.1.1.14
	perseant-stdc-iso10646:1.1.1.13.0.6
	perseant-stdc-iso10646-base:1.1.1.13
	netbsd-8:1.1.1.13.0.4
	netbsd-8-base:1.1.1.13
	prg-localcount2-base3:1.1.1.13
	prg-localcount2-base2:1.1.1.13
	prg-localcount2-base1:1.1.1.13
	prg-localcount2:1.1.1.13.0.2
	prg-localcount2-base:1.1.1.13
	pgoyette-localcount-20170426:1.1.1.13
	bouyer-socketcan-base1:1.1.1.13
	pgoyette-localcount-20170320:1.1.1.13
	netbsd-7-1:1.1.1.7.2.1.0.6
	netbsd-7-1-RELEASE:1.1.1.7.2.1
	netbsd-7-1-RC2:1.1.1.7.2.1
	clang-294123:1.1.1.13
	netbsd-7-nhusb-base-20170116:1.1.1.7.2.1
	bouyer-socketcan:1.1.1.12.0.2
	bouyer-socketcan-base:1.1.1.12
	clang-291444:1.1.1.12
	pgoyette-localcount-20170107:1.1.1.11
	netbsd-7-1-RC1:1.1.1.7.2.1
	pgoyette-localcount-20161104:1.1.1.11
	netbsd-7-0-2-RELEASE:1.1.1.7.2.1
	localcount-20160914:1.1.1.11
	netbsd-7-nhusb:1.1.1.7.2.1.0.4
	netbsd-7-nhusb-base:1.1.1.7.2.1
	clang-280599:1.1.1.11
	pgoyette-localcount-20160806:1.1.1.10
	pgoyette-localcount-20160726:1.1.1.10
	pgoyette-localcount:1.1.1.10.0.2
	pgoyette-localcount-base:1.1.1.10
	netbsd-7-0-1-RELEASE:1.1.1.7.2.1
	clang-261930:1.1.1.10
	netbsd-7-0:1.1.1.7.2.1.0.2
	netbsd-7-0-RELEASE:1.1.1.7.2.1
	netbsd-7-0-RC3:1.1.1.7.2.1
	netbsd-7-0-RC2:1.1.1.7.2.1
	netbsd-7-0-RC1:1.1.1.7.2.1
	clang-237755:1.1.1.9
	clang-232565:1.1.1.9
	clang-227398:1.1.1.8
	tls-maxphys-base:1.1.1.7
	tls-maxphys:1.1.1.7.0.4
	netbsd-7:1.1.1.7.0.2
	netbsd-7-base:1.1.1.7
	clang-215315:1.1.1.7
	clang-209886:1.1.1.6
	yamt-pagecache:1.1.1.5.0.4
	yamt-pagecache-base9:1.1.1.5
	tls-earlyentropy:1.1.1.5.0.2
	tls-earlyentropy-base:1.1.1.6
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.5
	riastradh-drm2-base3:1.1.1.5
	clang-202566:1.1.1.5
	clang-201163:1.1.1.4
	clang-199312:1.1.1.4
	clang-198450:1.1.1.3
	clang-196603:1.1.1.2
	clang-195771:1.1.1.1
	LLVM:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2013.11.28.14.14.47;	author joerg;	state Exp;
branches
	1.1.1.1;
next	;
commitid	ow8OybrawrB1f3fx;

1.1.1.1
date	2013.11.28.14.14.47;	author joerg;	state Exp;
branches;
next	1.1.1.2;
commitid	ow8OybrawrB1f3fx;

1.1.1.2
date	2013.12.06.23.16.55;	author joerg;	state Exp;
branches;
next	1.1.1.3;
commitid	oIJdta8D25nvY7gx;

1.1.1.3
date	2014.01.05.15.37.48;	author joerg;	state Exp;
branches;
next	1.1.1.4;
commitid	wh3aCSIWykURqWjx;

1.1.1.4
date	2014.01.15.21.26.16;	author joerg;	state Exp;
branches;
next	1.1.1.5;
commitid	NQXlzzA0SPkc5glx;

1.1.1.5
date	2014.03.04.19.53.10;	author joerg;	state Exp;
branches
	1.1.1.5.2.1
	1.1.1.5.4.1;
next	1.1.1.6;
commitid	29z1hJonZISIXprx;

1.1.1.6
date	2014.05.30.18.14.38;	author joerg;	state Exp;
branches;
next	1.1.1.7;
commitid	8q0kdlBlCn09GACx;

1.1.1.7
date	2014.08.10.17.08.24;	author joerg;	state Exp;
branches
	1.1.1.7.2.1
	1.1.1.7.4.1;
next	1.1.1.8;
commitid	N85tXAN6Ex9VZPLx;

1.1.1.8
date	2015.01.29.19.57.42;	author joerg;	state Exp;
branches;
next	1.1.1.9;
commitid	mlISSizlPKvepX7y;

1.1.1.9
date	2015.03.18.17.26.33;	author joerg;	state Exp;
branches;
next	1.1.1.10;
commitid	uc5pyJVphALN17ey;

1.1.1.10
date	2016.02.27.22.10.52;	author joerg;	state Exp;
branches
	1.1.1.10.2.1;
next	1.1.1.11;
commitid	tIimz3oDlh1NpBWy;

1.1.1.11
date	2016.09.03.23.16.57;	author joerg;	state Exp;
branches;
next	1.1.1.12;
commitid	fN8JuO7v94GspTkz;

1.1.1.12
date	2017.01.11.10.40.30;	author joerg;	state Exp;
branches
	1.1.1.12.2.1;
next	1.1.1.13;
commitid	CNnUNfII1jgNmxBz;

1.1.1.13
date	2017.02.09.17.39.40;	author joerg;	state Exp;
branches;
next	1.1.1.14;
commitid	UxB8JMFWM7xyMiFz;

1.1.1.14
date	2017.08.01.19.38.02;	author joerg;	state Exp;
branches;
next	1.1.1.15;
commitid	pMuDy65V0VicSx1A;

1.1.1.15
date	2017.12.17.20.59.26;	author joerg;	state Exp;
branches
	1.1.1.15.2.1
	1.1.1.15.4.1;
next	1.1.1.16;
commitid	T7p9sjiUJyY1UhjA;

1.1.1.16
date	2018.07.17.18.32.09;	author joerg;	state Exp;
branches;
next	1.1.1.17;
commitid	wDzL46ALjrCZgwKA;

1.1.1.17
date	2019.11.13.22.19.10;	author joerg;	state dead;
branches;
next	;
commitid	QD8YATxuNG34YJKB;

1.1.1.5.2.1
date	2014.08.10.07.08.03;	author tls;	state Exp;
branches;
next	;
commitid	t01A1TLTYxkpGMLx;

1.1.1.5.4.1
date	2014.03.04.19.53.10;	author yamt;	state dead;
branches;
next	1.1.1.5.4.2;
commitid	WSrDtL5nYAUyiyBx;

1.1.1.5.4.2
date	2014.05.22.16.18.19;	author yamt;	state Exp;
branches;
next	;
commitid	WSrDtL5nYAUyiyBx;

1.1.1.7.2.1
date	2015.06.04.20.04.23;	author snj;	state Exp;
branches;
next	;
commitid	yRnjq9fueSo6n9oy;

1.1.1.7.4.1
date	2014.08.10.17.08.24;	author tls;	state dead;
branches;
next	1.1.1.7.4.2;
commitid	jTnpym9Qu0o4R1Nx;

1.1.1.7.4.2
date	2014.08.19.23.47.20;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;

1.1.1.10.2.1
date	2017.03.20.06.52.30;	author pgoyette;	state Exp;
branches;
next	;
commitid	jjw7cAwgyKq7RfKz;

1.1.1.12.2.1
date	2017.04.21.16.51.36;	author bouyer;	state Exp;
branches;
next	;
commitid	dUG7nkTKALCadqOz;

1.1.1.15.2.1
date	2018.07.28.04.33.07;	author pgoyette;	state Exp;
branches;
next	;
commitid	1UP1xAIUxv1ZgRLA;

1.1.1.15.4.1
date	2019.06.10.21.45.09;	author christos;	state Exp;
branches;
next	1.1.1.15.4.2;
commitid	jtc8rnCzWiEEHGqB;

1.1.1.15.4.2
date	2020.04.13.07.46.20;	author martin;	state dead;
branches;
next	;
commitid	X01YhRUPVUDaec4C;


desc
@@


1.1
log
@Initial revision
@
text
@=====================================
Clang 3.4 (In-Progress) Release Notes
=====================================

.. contents::
   :local:
   :depth: 2

Introduction
============

This document contains the release notes for the Clang C/C++/Objective-C
frontend, part of the LLVM Compiler Infrastructure, release 3.4. Here we
describe the status of Clang in some detail, including major
improvements from the previous release and new feature work. For the
general LLVM release notes, see `the LLVM
documentation <http://llvm.org/docs/ReleaseNotes.html>`_. All LLVM
releases may be downloaded from the `LLVM releases web
site <http://llvm.org/releases/>`_.

For more information about Clang or LLVM, including information about
the latest release, please check out the main please see the `Clang Web
Site <http://clang.llvm.org>`_ or the `LLVM Web
Site <http://llvm.org>`_.

Note that if you are reading this file from a Subversion checkout or the
main Clang web page, this document applies to the *next* release, not
the current one. To see the release notes for a specific release, please
see the `releases page <http://llvm.org/releases/>`_.

What's New in Clang 3.4?
========================

Some of the major new features and improvements to Clang are listed
here. Generic improvements to Clang as a whole or to its underlying
infrastructure are described first, followed by language-specific
sections with improvements to Clang's support for those languages.

Last release which will build as C++98
--------------------------------------

This is expected to be the last release of Clang which compiles using a C++98
toolchain. We expect to start using some C++11 features in Clang starting after
this release. That said, we are committed to supporting a reasonable set of
modern C++ toolchains as the host compiler on all of the platforms. This will
at least include Visual Studio 2012 on Windows, and Clang 3.1 or GCC 4.7.x on
Mac and Linux. The final set of compilers (and the C++11 features they support)
is not set in stone, but we wanted users of Clang to have a heads up that the
next release will involve a substantial change in the host toolchain
requirements.

Note that this change is part of a change for the entire LLVM project, not just
Clang.

Major New Features
------------------

Improvements to Clang's diagnostics
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Clang's diagnostics are constantly being improved to catch more issues,
explain them more clearly, and provide more accurate source information
about them. The improvements since the 3.3 release include:

-  ...

New Compiler Flags
------------------

- Clang no longer special cases -O4 to enable lto. Explicitly pass -flto to
  enable it.
- Clang no longer fails on >= -O5. Uses -O3 instead.
- Command line "clang -O3 -flto a.c -c" and "clang -emit-llvm a.c -c"
  are no longer equivalent.
- Clang now errors on unknown -m flags (``-munknown-to-clang``),
  unknown -f flags (``-funknown-to-clang``) and unknown
  options (``-what-is-this``).

C Language Changes in Clang
---------------------------

- Added new checked arithmetic builtins for security critical applications.

C11 Feature Support
^^^^^^^^^^^^^^^^^^^

...

C++ Language Changes in Clang
-----------------------------

- Fixed an ABI regression, introduced in Clang 3.2, which affected
  member offsets for classes inheriting from certain classes with tail padding.
  See PR16537.

- ...

C++11 Feature Support
^^^^^^^^^^^^^^^^^^^^^

...

Objective-C Language Changes in Clang
-------------------------------------

...

OpenCL C Language Changes in Clang
----------------------------------

- OpenCL C "long" now always has a size of 64 bit, and all OpenCL C
  types are aligned as specified in the OpenCL C standard. Also,
  "char" is now always signed.

Internal API Changes
--------------------

These are major API changes that have happened since the 3.3 release of
Clang. If upgrading an external codebase that uses Clang as a library,
this section should help get you past the largest hurdles of upgrading.

Wide Character Types
^^^^^^^^^^^^^^^^^^^^

The ASTContext class now keeps track of two different types for wide character
types: WCharTy and WideCharTy. WCharTy represents the built-in wchar_t type
available in C++. WideCharTy is the type used for wide character literals; in
C++ it is the same as WCharTy, but in C99, where wchar_t is a typedef, it is an
integer type.

...

libclang
--------

...

Static Analyzer
---------------

The static analyzer (which contains additional code checking beyond compiler
warnings) has improved significantly in both in the core analysis engine and 
also in the kinds of issues it can find.

Core Analysis Improvements
==========================

- ...

New Issues Found
================

- ...

Python Binding Changes
----------------------

The following methods have been added:

-  ...

Significant Known Problems
==========================

Additional Information
======================

A wide variety of additional information is available on the `Clang web
page <http://clang.llvm.org/>`_. The web page contains versions of the
API documentation which are up-to-date with the Subversion version of
the source code. You can access versions of these documents specific to
this release by going into the "``clang/docs/``" directory in the Clang
tree.

If you have any questions or comments about Clang, please feel free to
contact us via the `mailing
list <http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev>`_.
@


1.1.1.1
log
@Import Clang 3.4rc1 r195771.
@
text
@@


1.1.1.2
log
@Import clang 3.4rc2 r196603.
Many bug fixes and improvements for the driver NetBSD/ARM EABI.
@
text
@d65 1
a65 30
- -Wheader-guard warns on mismatches between the #ifndef and #define lines
  in a header guard.
- -Wlogical-not-parentheses warns when a logical not ('!') only applies to the
  left-hand side of a comparison.  This warning is part of -Wparentheses.
- Boolean increment, a deprecated feature, has own warning flag
  -Wdeprecated-increment-bool, and is still part of -Wdeprecated.
- Clang errors on builtin enum increments and decrements.
- -Wloop-analysis now warns on for-loops which have the same increment or 
  decrement in the loop header as the last statement in the loop.
- -Wuninitialized now performs checking across field initializers to detect
  when one field in used uninitialized in another field initialization.
- Clang can detect initializer list use inside a macro and suggest parentheses
  if possible to fix.
- Many improvements to Clang's typo correction facilities, such as:
  + Adding global namespace qualifiers so that corrections can refer to shadowed
    or otherwise ambiguous or unreachable namespaces.
  + Including accessible class members in the set of typo correction candidates,
    so that corrections requiring a class name in the name specifier are now
    possible.
  + Allowing typo corrections that involve removing a name specifier.
  + In some situations, correcting function names when a function was given the
    wrong number of arguments, including situations where the original function
    name was correct but was shadowed by a lexically closer function with the
    same name yet took a different number of arguments.
  + Offering typo suggestions for 'using' declarations.
  + Providing better diagnostics and fixit suggestions in more situations when
    a '->' was used instead of '.' or vice versa.
  + Providing more relevant suggestions for typos followed by '.' or '='.
  + Various performance improvements when searching for typo correction
    candidates.
a144 9
Windows Support
---------------

- `clang-cl <UsersManual.html#clang-cl>` provides a new driver mode that is
  designed for compatibility with Visual Studio's compiler, cl.exe. This driver
  mode makes Clang accept the same kind of command-line options as cl.exe.
  Please note that this mode is still experimental.


@


1.1.1.3
log
@Import clang 3.5svn r198450.
@
text
@d2 1
a2 1
Clang 3.5 (In-Progress) Release Notes
a8 8
Written by the `LLVM Team <http://llvm.org/>`_

.. warning::

   These are in-progress notes for the upcoming Clang 3.5 release. You may
   prefer the `Clang 3.4 Release Notes
   <http://llvm.org/releases/3.4/tools/clang/docs/ReleaseNotes.html>`_.

d13 1
a13 1
frontend, part of the LLVM Compiler Infrastructure, release 3.5. Here we
d31 1
a31 1
What's New in Clang 3.5?
d39 16
a57 5
- Clang uses the new MingW ABI
GCC 4.7 changed the mingw ABI. Clang 3.4 and older use the GCC 4.6
ABI. Clang 3.5 and newer use the GCC 4.7 abi.


d63 1
a63 1
about them. The improvements since the 3.4 release include:
d65 30
a94 1
-  ...
d99 8
a106 10
The integrated assembler is now turned on by default on ARM (and Thumb),
so the use of the option `-integrated-as` is now redundant on those
architectures. This is an important move to both *eat our own dog food*
and to ease cross-compilation tremendously.

We are aware of the problems that this may cause for code bases that
rely on specific GNU syntax or extensions, and we're working towards
getting them all fixed. Please, report bugs or feature requests if
you find anything. In the meantime, use `-no-integrated-as` to revert
back the call to GNU assembler.
d111 1
a111 1
...
d121 4
d140 3
a142 1
...
d147 1
a147 1
These are major API changes that have happened since the 3.4 release of
d151 9
d170 12
a181 1
...
@


1.1.1.4
log
@Import Clang 3.5svn r199312
@
text
@a53 5
- The __has_attribute feature test is now target-aware. Older versions of Clang 
would return true when the attribute spelling was known, regardless of whether 
the attribute was available to the specific target. Clang now returns true only 
when the attribute pertains to the current compilation target.

@


1.1.1.5
log
@Import Clang 3.5svn r202566.
@
text
@d51 2
a52 2
  GCC 4.7 changed the mingw ABI. Clang 3.4 and older use the GCC 4.6
  ABI. Clang 3.5 and newer use the GCC 4.7 abi.
d55 3
a57 3
  would return true when the attribute spelling was known, regardless of whether 
  the attribute was available to the specific target. Clang now returns true only 
  when the attribute pertains to the current compilation target.
d73 1
a73 1
so the use of the option `-fintegrated-as` is now redundant on those
d80 1
a80 1
you find anything. In the meantime, use `-fno-integrated-as` to revert
a82 8
In order to provide better diagnostics, the integrated assembler validates
inline assembly when the integrated assembler is enabled.  Because this is
considered a feature of the compiler, it is controlled via the `fintegrated-as`
and `fno-integrated-as` flags which enable and disable the integrated assembler
respectively.  `-integrated-as` and `-no-integrated-as` are now considered
legacy flags (but are available as an alias to prevent breaking existing users),
and users are encouraged to switch to the equivalent new feature flag.

@


1.1.1.5.2.1
log
@Rebase.
@
text
@a90 9
Deprecated flags `-faddress-sanitizer`, `-fthread-sanitizer`,
`-fcatch-undefined-behavior` and `-fbounds-checking` were removed in favor of
`-fsanitize=` family of flags.

It is now possible to get optimization reports from the major transformation
passes via three new flags: `-Rpass`, `-Rpass-missed` and `-Rpass-analysis`.
These flags take a POSIX regular expression which indicates the name
of the pass (or passes) that should emit optimization remarks.

@


1.1.1.6
log
@Import Clang 3.5svn r209886.
@
text
@a90 9
Deprecated flags `-faddress-sanitizer`, `-fthread-sanitizer`,
`-fcatch-undefined-behavior` and `-fbounds-checking` were removed in favor of
`-fsanitize=` family of flags.

It is now possible to get optimization reports from the major transformation
passes via three new flags: `-Rpass`, `-Rpass-missed` and `-Rpass-analysis`.
These flags take a POSIX regular expression which indicates the name
of the pass (or passes) that should emit optimization remarks.

@


1.1.1.7
log
@Import clang 3.6svn r215315.
@
text
@d54 4
a57 4
- The __has_attribute feature test is now target-aware. Older versions of Clang
  would return true when the attribute spelling was known, regardless of whether
  the attribute was available to the specific target. Clang now returns true
  only when the attribute pertains to the current compilation target.
a66 3
- GCC compatibility: Clang displays a warning on unsupported gcc
  optimization flags instead of an error.

a99 35
The option `-u` is forwarded to the linker on gnutools toolchains.

New Pragmas in Clang
-----------------------

Loop optimization hints can be specified using the new `#pragma clang loop`
directive just prior to the desired loop. The directive allows vectorization,
interleaving, and unrolling to be enabled or disabled. Vector width as well
as interleave and unrolling count can be manually specified.  See language
extensions for details.

Clang now supports the `#pragma unroll` and `#pragma nounroll` directives to
specify loop unrolling optimization hints.  Placed just prior to the desired
loop, `#pragma unroll` directs the loop unroller to attempt to fully unroll the
loop.  The pragma may also be specified with a positive integer parameter
indicating the desired unroll count: `#pragma unroll _value_`.  The unroll count
parameter can be optionally enclosed in parentheses. The directive `#pragma
nounroll` indicates that the loop should not be unrolled.

Windows Support
---------------

Clang's support for building native Windows programs, compatible with Visual
C++, has improved significantly since the previous release. This includes
correctly passing non-trivial objects by value, record layout, basic debug info,
`Address Sanitizer <AddressSanitizer.html>`_ support, RTTI, name mangling,
DLL attributes, and many many bug fixes. See
`MSVC Compatibility <MSVCCompatibility.html>`_ for details.

While still considered experimental, Clang's Windows support is good enough
that Clang can self-host on Windows, and projects such as Chromium and Firefox
have been built successfully using the
`/fallback <UsersManual.html#the-fallback-option>`_ option.


a146 10
The `-analyzer-config` options are now passed from scan-build through to
ccc-analyzer and then to Clang.

With the option `-analyzer-config stable-report-filename=true`,
instead of `report-XXXXXX.html`, scan-build/clang analyzer generate
`report-<filename>-<function, method name>-<function position>-<id>.html`.
(id = i++ for several issues found in the same function/method).

List the function/method name in the index page of scan-build.

@


1.1.1.7.2.1
log
@Update LLVM to 3.6.1, requested by joerg in ticket 824.
@
text
@d1 3
a3 3
=======================
Clang 3.6 Release Notes
=======================
d11 6
d21 1
a21 1
frontend, part of the LLVM Compiler Infrastructure, release 3.6. Here we
d25 2
a26 2
documentation <http://llvm.org/releases/3.6.0/docs/ReleaseNotes.html>`_.
All LLVM releases may be downloaded from the `LLVM releases web
d34 6
a39 1
What's New in Clang 3.6?
d50 8
a57 7
- The __has_attribute built-in macro no longer queries for attributes across
  multiple attribute syntaxes (GNU, C++11, __declspec, etc). Instead, it only
  queries GNU-style attributes. With the addition of __has_cpp_attribute and
  __has_declspec_attribute, this allows for more precise coverage of attribute
  syntax querying.

- clang-format now supports formatting Java code.
d61 1
a61 1
-----------------------------------
d65 1
a65 1
about them. The improvements since the 3.5 release include:
d67 2
a68 3
- Smarter typo correction. Clang now tries a bit harder to give a usable
  suggestion in more cases, and can now successfully recover in more
  situations where the suggestion changes how an expression is parsed.
d70 1
d75 27
a101 28
The ``-fpic`` option now uses small pic on PowerPC.


The __EXCEPTIONS macro
----------------------
``__EXCEPTIONS`` is now defined when landing pads are emitted, not when
C++ exceptions are enabled. The two can be different in Objective-C files:
If C++ exceptions are disabled but Objective-C exceptions are enabled,
landing pads will be emitted. Clang 3.6 is switching the behavior of
``__EXCEPTIONS``. Clang 3.5 confusingly changed the behavior of
``has_feature(cxx_exceptions)``, which used to be set if landing pads were
emitted, but is now set if C++ exceptions are enabled. So there are 3 cases:

Clang before 3.5:
   ``__EXCEPTIONS`` is set if C++ exceptions are enabled, ``cxx_exceptions``
   enabled if C++ or ObjC exceptions are enabled

Clang 3.5:
   ``__EXCEPTIONS`` is set if C++ exceptions are enabled, ``cxx_exceptions``
   enabled if C++ exceptions are enabled

Clang 3.6:
   ``__EXCEPTIONS`` is set if C++ or ObjC exceptions are enabled,
   ``cxx_exceptions`` enabled if C++ exceptions are enabled

To reliably test if C++ exceptions are enabled, use
``__EXCEPTIONS && __has_feature(cxx_exceptions)``, else things won't work in
all versions of Clang in Objective-C++ files.
d103 1
d108 6
d120 1
a120 5
nounroll` indicates that the loop should not be unrolled.  These unrolling hints
may also be expressed using the `#pragma clang loop` directive.  See the Clang
`language extensions
<http://clang.llvm.org/docs/LanguageExtensions.html#extensions-for-loop-hint-optimizations>`_
for details.
d125 11
a135 17
- Many, many bug fixes.

- Clang can now self-host using the ``msvc`` environment on x86 and x64
  Windows. This means that Microsoft C++ ABI is more or less feature-complete,
  minus exception support.

- Added more MSVC compatibility hacks, such as allowing more lookup into
  dependent bases of class templates when there is a known template pattern.
  As a result, applications using Active Template Library (ATL) or Windows
  Runtime Library (WRL) headers should compile correctly.

- Added support for the Visual C++ ``__super`` keyword.

- Added support for MSVC's ``__vectorcall`` calling convention, which is used
  in the upcoming Visual Studio 2015 STL.

- Added basic support for DWARF debug information in COFF files.
d141 1
a141 4
- The default language mode for C compilations with Clang has been changed from
  C99 with GNU extensions to C11 with GNU extensions. C11 is largely
  backwards-compatible with C99, but if you want to restore the former behavior
  you can do so with the `-std=gnu99` flag.
d146 1
a146 1
- Clang now provides an implementation of the standard C11 header `<stdatomic.h>`.
d151 11
a161 7
- An `upcoming change to C++ <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3922.html>_`
  changes the semantics of certain deductions of `auto` from a braced initializer
  list. Following the intent of the C++ committee, this change will be applied to
  our C++11 and C++14 modes as well as our experimental C++17 mode. Clang 3.6
  does not yet implement this change, but to provide a transition period, it
  warns on constructs whose meaning will change. The fix in all cases is to
  add an `=` prior to the left brace.
d163 2
a164 2
- Clang now supports putting identical constructors and destructors in
  the C5/D5 comdat, reducing code duplication.
d166 1
a166 2
- Clang will put individual ``.init_array/.ctors`` sections in
  comdats, reducing code duplication and speeding up startup.
d168 2
d171 5
a175 2
C++17 Feature Support
^^^^^^^^^^^^^^^^^^^^^
d177 2
a178 2
Clang has experimental support for some proposed C++1z (tentatively, C++17)
features. This support can be enabled using the `-std=c++1z` flag.
d180 1
a180 1
New in Clang 3.6 is support for:
d182 2
a183 1
- Fold expressions
d185 2
a186 1
- `u8` character literals
d188 4
a191 2
- Nested namespace definitions: `namespace A::B { ... }` as a shorthand for
  `namespace A { namespace B { ... } }`
d193 1
a193 1
- Attributes for namespaces and enumerators
d195 1
a195 1
- Constant evaluation for all non-type template arguments
d197 2
a198 2
Note that these features may be changed or removed in future Clang releases
without notice.
d200 1
a200 3
Support for `for (identifier : range)` as a synonym for
`for (auto &&identifier : range)` has been removed as it is no longer currently
considered for C++17.
d202 2
a203 2
For more details on C++ feature support, see
`the C++ status page <http://clang.llvm.org/cxx_status.html>`_.
d205 4
d210 1
a210 2
OpenMP Language Changes in Clang
--------------------------------
d212 1
a212 9
Clang 3.6 contains codegen for many individual OpenMP pragmas, but combinations are not completed yet.
We plan to continue codegen code drop aiming for completion in 3.7. Please see this link for up-to-date
`status <https://github.com/clang-omp/clang/wiki/Status-of-supported-OpenMP-constructs>_`.
LLVM's OpenMP runtime library, originally developed by Intel, has been modified to work on ARM, PowerPC,
as well as X86. The Runtime Library's compatibility with GCC 4.9 is improved
- missed entry points added, barrier and fork/join code improved, one more type of barrier enabled.
Support for ppc64le architecture is now available and automatically detected when using cmake system.
Using makefile the new "ppc64le" arch type is available.
Contributors to this work include AMD, Argonne National Lab., IBM, Intel, Texas Instruments, University of Houston and many others.
d214 2
@


1.1.1.8
log
@Import Clang 3.6RC1 r227398.
@
text
@d2 1
a2 1
Clang 3.6 (In-Progress) Release Notes
d13 3
a15 3
   These are in-progress notes for the upcoming Clang 3.6 release. You may
   prefer the `Clang 3.5 Release Notes
   <http://llvm.org/releases/3.5.0/tools/clang/docs/ReleaseNotes.html>`_.
d21 1
a21 1
frontend, part of the LLVM Compiler Infrastructure, release 3.6. Here we
d39 1
a39 1
What's New in Clang 3.6?
d50 8
a57 7
- The __has_attribute built-in macro no longer queries for attributes across
  multiple attribute syntaxes (GNU, C++11, __declspec, etc). Instead, it only
  queries GNU-style attributes. With the addition of __has_cpp_attribute and
  __has_declspec_attribute, this allows for more precise coverage of attribute
  syntax querying.

- clang-format now supports formatting Java code.
d61 1
a61 1
-----------------------------------
d65 4
a68 1
about them. The improvements since the 3.5 release include:
d75 27
a101 16
The option ....

The __EXCEPTIONS macro
----------------------
``__EXCEPTIONS`` is now defined when landing pads are emitted, not when c++ exceptions are enabled. The two can be different in Objective-C files: If C++ exceptions are disabled but Objective-C exceptions are enabled, landing pads will be emitted. Clang 3.6 is switching the behavior of ``__EXCEPTIONS``. Clang 3.5 confusingly changed the behavior of ``has_feature(cxx_exceptions)``, which used to be set if landing pads were emitted, but is now set if C++ exceptions are enabled. So there are 3 cases:

Clang before 3.5:
   ``__EXCEPTIONS`` is set if C++ exceptions are enabled, ``cxx_exceptions`` enabled if C++ or ObjC exceptions are enabled

Clang 3.5:
   ``__EXCEPTIONS`` is set if C++ exceptions are enabled, ``cxx_exceptions`` enabled if C++ exceptions are enabled

Clang 3.6:
   ``__EXCEPTIONS`` is set if C++ or ObjC exceptions are enabled, ``cxx_exceptions`` enabled if C++ exceptions are enabled

To reliably test if C++ exceptions are enabled, use ``__EXCEPTIONS && __has_feature(cxx_exceptions)``, else things won't work in all versions of clang in Objective-C++ files.
d103 1
d108 13
a120 1
Clang now supports the ...
d125 11
a135 3
- Many, many bug fixes

- Basic support for DWARF debug information in COFF files
d151 1
a151 5
- Clang now supports putting identical constructors and destructors in
  the C5/D5 comdat, reducing code duplication.

- Clang will put individual ``.init_array/.ctors`` sections in
  comdats, reducing code duplication and speeding up startup.
d171 1
a171 1
These are major API changes that have happened since the 3.5 release of
d185 10
@


1.1.1.9
log
@Import Clang r232565 post-3.6.0. Various bugfixes, especially for ARM.
@
text
@d1 3
a3 3
=======================
Clang 3.6 Release Notes
=======================
d11 6
d25 2
a26 2
documentation <http://llvm.org/releases/3.6.0/docs/ReleaseNotes.html>`_.
All LLVM releases may be downloaded from the `LLVM releases web
d34 5
d66 1
a66 4
- Smarter typo correction. Clang now tries a bit harder to give a usable
  suggestion in more cases, and can now successfully recover in more
  situations where the suggestion changes how an expression is parsed.

d71 1
a71 2
The ``-fpic`` option now uses small pic on PowerPC.

d75 1
a75 7
``__EXCEPTIONS`` is now defined when landing pads are emitted, not when
C++ exceptions are enabled. The two can be different in Objective-C files:
If C++ exceptions are disabled but Objective-C exceptions are enabled,
landing pads will be emitted. Clang 3.6 is switching the behavior of
``__EXCEPTIONS``. Clang 3.5 confusingly changed the behavior of
``has_feature(cxx_exceptions)``, which used to be set if landing pads were
emitted, but is now set if C++ exceptions are enabled. So there are 3 cases:
d78 1
a78 2
   ``__EXCEPTIONS`` is set if C++ exceptions are enabled, ``cxx_exceptions``
   enabled if C++ or ObjC exceptions are enabled
d81 1
a81 2
   ``__EXCEPTIONS`` is set if C++ exceptions are enabled, ``cxx_exceptions``
   enabled if C++ exceptions are enabled
d84 1
a84 2
   ``__EXCEPTIONS`` is set if C++ or ObjC exceptions are enabled,
   ``cxx_exceptions`` enabled if C++ exceptions are enabled
d86 1
a86 3
To reliably test if C++ exceptions are enabled, use
``__EXCEPTIONS && __has_feature(cxx_exceptions)``, else things won't work in
all versions of Clang in Objective-C++ files.
d92 1
a92 11
Clang now supports the `#pragma unroll` and `#pragma nounroll` directives to
specify loop unrolling optimization hints.  Placed just prior to the desired
loop, `#pragma unroll` directs the loop unroller to attempt to fully unroll the
loop.  The pragma may also be specified with a positive integer parameter
indicating the desired unroll count: `#pragma unroll _value_`.  The unroll count
parameter can be optionally enclosed in parentheses. The directive `#pragma
nounroll` indicates that the loop should not be unrolled.  These unrolling hints
may also be expressed using the `#pragma clang loop` directive.  See the Clang
`language extensions
<http://clang.llvm.org/docs/LanguageExtensions.html#extensions-for-loop-hint-optimizations>`_
for details.
d97 1
a97 1
- Many, many bug fixes.
d99 1
a99 15
- Clang can now self-host using the ``msvc`` environment on x86 and x64
  Windows. This means that Microsoft C++ ABI is more or less feature-complete,
  minus exception support.

- Added more MSVC compatibility hacks, such as allowing more lookup into
  dependent bases of class templates when there is a known template pattern.
  As a result, applications using Active Template Library (ATL) or Windows
  Runtime Library (WRL) headers should compile correctly.

- Added support for the Visual C++ ``__super`` keyword.

- Added support for MSVC's ``__vectorcall`` calling convention, which is used
  in the upcoming Visual Studio 2015 STL.

- Added basic support for DWARF debug information in COFF files.
d105 1
a105 4
- The default language mode for C compilations with Clang has been changed from
  C99 with GNU extensions to C11 with GNU extensions. C11 is largely
  backwards-compatible with C99, but if you want to restore the former behavior
  you can do so with the `-std=gnu99` flag.
d110 1
a110 1
- Clang now provides an implementation of the standard C11 header `<stdatomic.h>`.
a114 8
- An `upcoming change to C++ <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3922.html>_`
  changes the semantics of certain deductions of `auto` from a braced initializer
  list. Following the intent of the C++ committee, this change will be applied to
  our C++11 and C++14 modes as well as our experimental C++17 mode. Clang 3.6
  does not yet implement this change, but to provide a transition period, it
  warns on constructs whose meaning will change. The fix in all cases is to
  add an `=` prior to the left brace.

d121 12
d134 4
a137 2
C++17 Feature Support
^^^^^^^^^^^^^^^^^^^^^
d139 3
a141 2
Clang has experimental support for some proposed C++1z (tentatively, C++17)
features. This support can be enabled using the `-std=c++1z` flag.
d143 1
a143 1
New in Clang 3.6 is support for:
d145 2
a146 1
- Fold expressions
d148 1
a148 1
- `u8` character literals
d150 2
a151 2
- Nested namespace definitions: `namespace A::B { ... }` as a shorthand for
  `namespace A { namespace B { ... } }`
d153 1
a153 1
- Attributes for namespaces and enumerators
d155 2
a156 1
- Constant evaluation for all non-type template arguments
d158 1
a158 2
Note that these features may be changed or removed in future Clang releases
without notice.
d160 2
a161 3
Support for `for (identifier : range)` as a synonym for
`for (auto &&identifier : range)` has been removed as it is no longer currently
considered for C++17.
d163 1
a163 2
For more details on C++ feature support, see
`the C++ status page <http://clang.llvm.org/cxx_status.html>`_.
d165 2
d168 1
a168 2
OpenMP Language Changes in Clang
--------------------------------
d170 1
a170 9
Clang 3.6 contains codegen for many individual OpenMP pragmas, but combinations are not completed yet.
We plan to continue codegen code drop aiming for completion in 3.7. Please see this link for up-to-date
`status <https://github.com/clang-omp/clang/wiki/Status-of-supported-OpenMP-constructs>_`.
LLVM's OpenMP runtime library, originally developed by Intel, has been modified to work on ARM, PowerPC,
as well as X86. The Runtime Library's compatibility with GCC 4.9 is improved
- missed entry points added, barrier and fork/join code improved, one more type of barrier enabled.
Support for ppc64le architecture is now available and automatically detected when using cmake system.
Using makefile the new "ppc64le" arch type is available.
Contributors to this work include AMD, Argonne National Lab., IBM, Intel, Texas Instruments, University of Houston and many others.
d172 2
@


1.1.1.10
log
@Import Clang 3.8.0rc3 r261930.
@
text
@d2 1
a2 1
Clang 3.8 Release Notes
d15 1
a15 1
frontend, part of the LLVM Compiler Infrastructure, release 3.8. Here we
d19 2
a20 2
documentation <http://llvm.org/docs/ReleaseNotes.html>`_. All LLVM
releases may be downloaded from the `LLVM releases web
d28 1
a28 1
What's New in Clang 3.8?
d39 8
a46 1
- Feature1...
d53 1
a53 1
about them. The improvements since the 3.7 release include:
d55 3
a57 3
- ``-Wmicrosoft`` has been split into many targeted flags, so that projects can
  choose to enable only a subset of these warnings. ``-Wno-microsoft`` still
  disables all these warnings, and ``-Wmicrosoft`` still enables them all.
a58 1
-  ...
d63 1
a63 9
Clang can "tune" DWARF debugging information to suit one of several different
debuggers. This fine-tuning can mean omitting DWARF features that the
debugger does not need or use, or including DWARF extensions specific to the
debugger. Clang supports tuning for three debuggers, as follows.

- ``-ggdb`` is equivalent to ``-g`` plus tuning for the GDB debugger. For
  compatibility with GCC, Clang allows this option to be followed by a
  single digit from 0 to 3 indicating the debugging information "level."
  For example, ``-ggdb1`` is equivalent to ``-ggdb -g1``.
a64 1
- ``-glldb`` is equivalent to ``-g`` plus tuning for the LLDB debugger.
d66 25
a90 4
- ``-gsce`` is equivalent to ``-g`` plus tuning for the Sony Computer
  Entertainment debugger.

Specifying ``-g`` without a tuning option will use a target-dependent default.
d96 11
a106 1
Clang now supports the ...
d111 1
a111 2
Clang's support for building native Windows programs ...

d113 3
a115 2
C Language Changes in Clang
---------------------------
d117 4
a120 2
Better support for ``__builtin_object_size``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
d122 1
a122 6
Clang 3.8 has expanded support for the ``__builtin_object_size`` intrinsic.
Specifically, ``__builtin_object_size`` will now fail less often when you're
trying to get the size of a subobject. Additionally, the ``pass_object_size``
attribute was added, which allows ``__builtin_object_size`` to successfully
report the size of function parameters, without requiring that the function be
inlined.
d124 2
d127 1
a127 2
``overloadable`` attribute relaxations
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
a128 2
Previously, functions marked ``overloadable`` in C would strictly use C++'s
type conversion rules, so the following code would not compile:
d130 2
a131 16
.. code-block:: c

  void foo(char *bar, char *baz) __attribute__((overloadable));
  void foo(char *bar) __attribute__((overloadable));

  void callFoo() {
    int a;
    foo(&a);
  }

Now, Clang is able to selectively use C's type conversion rules during overload
resolution in C, which allows the above example to compile (albeit potentially
with a warning about an implicit conversion from ``int*`` to ``char*``).


...
d133 4
d141 1
a141 1
...
d146 7
a152 4
- ...

C++11 Feature Support
^^^^^^^^^^^^^^^^^^^^^
d154 2
a155 1
...
d157 2
a158 2
Objective-C Language Changes in Clang
-------------------------------------
a159 1
...
d161 2
a162 129
OpenCL C Language Changes in Clang
----------------------------------

Several OpenCL 2.0 features have been added, including:

- Command-line option ``-std=CL2.0``.

- Generic address space (``__generic``) along with new conversion rules
  between different address spaces and default address space deduction.

- Support for program scope variables with ``__global`` address space.

- Pipe specifier was added (although no pipe functions are supported yet).

- Atomic types: ``atomic_int``, ``atomic_uint``, ``atomic_long``,
  ``atomic_ulong``, ``atomic_float``, ``atomic_double``, ``atomic_flag``,
  ``atomic_intptr_t``, ``atomic_uintptr_t``, ``atomic_size_t``,
  ``atomic_ptrdiff_t`` and their usage with C11 style builtin functions.

- Image types: ``image2d_depth_t``, ``image2d_array_depth_t``,
  ``image2d_msaa_t``, ``image2d_array_msaa_t``, ``image2d_msaa_depth_t``,
  ``image2d_array_msaa_depth_t``.

- Other types (for pipes and device side enqueue): ``clk_event_t``,
  ``queue_t``, ``ndrange_t``, ``reserve_id_t``.

Several additional features/bugfixes have been added to the previous standards:

- A set of floating point arithmetic relaxation flags: ``-cl-no-signed-zeros``,
  ``-cl-unsafe-math-optimizations``, ``-cl-finite-math-only``,
  ``-cl-fast-relaxed-math``.

- Added ``^^`` to the list of reserved operations.

- Improved vector support and diagnostics.

- Improved diagnostics for function pointers.

OpenMP Support in Clang
---------------------

OpenMP 3.1 is fully supported and is enabled by default with -fopenmp 
which now uses the clang OpenMP library instead of the GCC OpenMP library.
The runtime can be built in-tree.  

In addition to OpenMP 3.1, several important elements of the OpenMP 4.0/4.5 
are supported as well. We continue to aim to complete OpenMP 4.5

- ``map`` clause
- task dependencies
- ``num_teams`` clause
- ``thread_limit`` clause
- ``target`` and ``target data`` directive
- ``target`` directive with implicit data mapping
- ``target enter data`` and ``target exit data`` directive
- Array sections [2.4, Array Sections].
- Directive name modifiers for ``if`` clause [2.12, if Clause].
- ``linear`` clause can be used in loop-based directives [2.7.2, loop Construct].
- ``simdlen`` clause [2.8, SIMD Construct].
- ``hint`` clause [2.13.2, critical Construct].
- Parsing/semantic analysis of all non-device directives introduced in OpenMP 4.5.

The codegen for OpenMP constructs was significantly improved allowing us to produce much more stable and fast code.
Full test cases of IR are also implemented.

CUDA Support in Clang
---------------------
Clang has experimental support for end-to-end CUDA compilation now:

- The driver now detects CUDA installation, creates host and device compilation
  pipelines, links device-side code with appropriate CUDA bitcode and produces
  single object file with host and GPU code.

- Implemented target attribute-based function overloading which allows clang to
  compile CUDA sources without splitting them into separate host/device TUs.

Internal API Changes
--------------------

These are major API changes that have happened since the 3.7 release of
Clang. If upgrading an external codebase that uses Clang as a library,
this section should help get you past the largest hurdles of upgrading.

* With this release, the autoconf build system is deprecated. It will be removed
  in the 3.9 release. Please migrate to using CMake. For more information see:
  `Building LLVM with CMake <http://llvm.org/docs/CMake.html>`_

AST Matchers
------------
The AST matcher functions were renamed to reflect the exact AST node names,
which is a breaking change to AST matching code. The following matchers were
affected:

=======================	============================
Previous Matcher Name	New Matcher Name
=======================	============================
recordDecl		recordDecl and cxxRecordDecl
ctorInitializer		cxxCtorInitializer
constructorDecl		cxxConstructorDecl
destructorDecl		cxxDestructorDecl
methodDecl		cxxMethodDecl
conversionDecl		cxxConversionDecl
memberCallExpr		cxxMemberCallExpr
constructExpr		cxxConstructExpr
unresolvedConstructExpr	cxxUnresolvedConstructExpr
thisExpr		cxxThisExpr
bindTemporaryExpr	cxxBindTemporaryExpr
newExpr			cxxNewExpr
deleteExpr		cxxDeleteExpr
defaultArgExpr		cxxDefaultArgExpr
operatorCallExpr	cxxOperatorCallExpr
forRangeStmt		cxxForRangeStmt
catchStmt		cxxCatchStmt
tryStmt			cxxTryStmt
throwExpr		cxxThrowExpr
boolLiteral		cxxBoolLiteral
nullPtrLiteralExpr	cxxNullPtrLiteralExpr
reinterpretCastExpr	cxxReinterpretCastExpr
staticCastExpr		cxxStaticCastExpr
dynamicCastExpr		cxxDynamicCastExpr
constCastExpr		cxxConstCastExpr
functionalCastExpr	cxxFunctionalCastExpr
temporaryObjectExpr	cxxTemporaryObjectExpr
CUDAKernalCallExpr	cudaKernelCallExpr
=======================	============================

recordDecl() previously matched AST nodes of type CXXRecordDecl, but now
matches AST nodes of type RecordDecl. If a CXXRecordDecl is required, use the
cxxRecordDecl() matcher instead.
d164 2
a165 1
...
d167 1
a167 2
libclang
--------
d169 1
a169 1
...
d171 1
a171 2
Static Analyzer
---------------
d173 2
a174 2
The scan-build and scan-view tools will now be installed with clang. Use these
tools to run the static analyzer on projects and view the produced results.
d176 1
a176 2
Static analysis of C++ lambdas has been greatly improved, including
interprocedural analysis of lambda applications.
d178 1
a178 1
Several new checks were added:
d180 2
a181 15
- The analyzer now checks for misuse of ``vfork()``.
- The analyzer can now detect excessively-padded structs. This check can be
  enabled by passing the following command to scan-build:
  ``-enable-checker optin.performance.Padding``.
- The checks to detect misuse of ``_Nonnull`` type qualifiers as well as checks
  to detect misuse of Objective-C generics were added.
- The analyzer now has opt in checks to detect localization errors in Cocoa
  applications. The checks warn about uses of non-localized ``NSStrings``
  passed to UI methods expecting localized strings and on ``NSLocalizedString``
  macros that are missing the comment argument. These can be enabled by passing
  the following command to scan-build:
  ``-enable-checker optin.osx.cocoa.localizability``.

Core Analysis Improvements
==========================
d183 3
a185 1
- ...
d187 2
a188 2
New Issues Found
================
a189 4
- ...

Python Binding Changes
----------------------
d191 2
a192 1
The following methods have been added:
d194 9
a202 1
-  ...
a203 2
Significant Known Problems
==========================
d217 1
a217 1
list <http://lists.llvm.org/mailman/listinfo/cfe-dev>`_.
@


1.1.1.10.2.1
log
@Sync with HEAD
@
text
@d1 3
a3 3
=======================================
Clang 4.0.0 (In-Progress) Release Notes
=======================================
a10 6
.. warning::

   These are in-progress notes for the upcoming Clang 4.0.0 release. You may
   prefer the `Clang 3.9 Release Notes
   <http://llvm.org/releases/3.9.0/tools/clang/docs/ReleaseNotes.html>`_.

d15 1
a15 1
frontend, part of the LLVM Compiler Infrastructure, release 4.0.0. Here we
d28 2
a29 2
What's New in Clang 4.0.0?
==========================
d39 1
a39 32
- The ``diagnose_if`` attribute has been added to clang. This attribute allows
  clang to emit a warning or error if a function call meets one or more
  user-specified conditions.

- Enhanced devirtualization with
  `-fstrict-vtable-pointers <UsersManual.html#cmdoption-fstrict-vtable-pointers>`_.
  Clang devirtualizes across different basic blocks, like loops:

  .. code-block:: c++

       struct A {
           virtual void foo();
       };
       void indirect(A &a, int n) {
           for (int i = 0 ; i < n; i++)
               a.foo();
       }
       void test(int n) {
           A a;
           indirect(a, n);
       }


-  ...

Improvements to ThinLTO (-flto=thin)
------------------------------------
- Integration with profile data (PGO). When available, profile data enables
  more accurate function importing decisions, as well as cross-module indirect
  call promotion.
- Significant build-time and binary-size improvements when compiling with debug
  info (-g).
d42 1
a42 1
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
d44 7
a50 1
-  ...
d57 11
a67 3
The option -Og has been added to optimize the debugging experience.
For now, this option is exactly the same as -O1. However, in the future,
some other optimizations might be enabled or disabled.
d69 4
a72 2
The option -MJ has been added to simplify adding JSON compilation
database output into existing build systems.
a73 1
The option ....
a79 6

Attribute Changes in Clang
--------------------------

-  ...

d89 2
a90 1
- ...
d92 6
a97 1
...
a98 2
C11 Feature Support
^^^^^^^^^^^^^^^^^^^
d100 2
a101 4
...

C++ Language Changes in Clang
-----------------------------
d103 2
a104 1
...
d106 1
a106 2
C++1z Feature Support
^^^^^^^^^^^^^^^^^^^^^
d108 2
a109 1
...
d111 4
a114 2
Objective-C Language Changes in Clang
-------------------------------------
d116 3
a118 1
...
d147 34
a180 1
...
d183 33
a215 1
----------------------------------
d217 2
a218 1
...
d223 1
a223 1
These are major API changes that have happened since the 3.9 release of
d227 3
a229 1
-  ...
d233 40
d281 2
a282 2
With the option --show-description, scan-build's list of defects will also
show the description of the defects.
d284 2
a285 1
...
d287 2
a288 4
libclang
--------

...
d290 1
a290 2
Static Analyzer
---------------
d292 12
a303 1
...
@


1.1.1.11
log
@Import Clang 3.8.1+ r280599.
@
text
@d19 1
a19 1
documentation <../../../docs/ReleaseNotes.html>`_. All LLVM
d36 5
d52 2
a73 2
The new ``-fstrict-vtable-pointers`` flag enables better devirtualization
support (experimental).
d75 2
d78 1
a78 16
Alignment
---------
Clang has gotten better at passing down strict type alignment information to LLVM,
and several targets have gotten better at taking advantage of that information.

Dereferencing a pointer that is not adequately aligned for its type is undefined
behavior.  It may crash on target architectures that strictly enforce alignment, but
even on architectures that do not, frequent use of unaligned pointers may hurt
the performance of the generated code.

If you find yourself fixing a bug involving an inadequately aligned pointer, you
have several options.

The best option, when practical, is to increase the alignment of the memory.
For example, this array is not guaranteed to be sufficiently aligned to store
a pointer value:
d80 2
a81 11
.. code-block:: c

  char buffer[sizeof(const char*)];

Writing a pointer directly into it violates C's alignment rules:

.. code-block:: c

  ((const char**) buffer)[0] = "Hello, world!\n";

But you can use alignment attributes to increase the required alignment:
d83 1
a83 50
.. code-block:: c

  __attribute__((aligned(__alignof__(const char*))))
  char buffer[sizeof(const char*)];

When that's not practical, you can instead reduce the alignment requirements
of the pointer.  If the pointer is to a struct that represents that layout of a
serialized structure, consider making that struct packed; this will remove any
implicit internal padding that the compiler might add to the struct and
reduce its alignment requirement to 1.

.. code-block:: c

  struct file_header {
    uint16_t magic_number;
    uint16_t format_version;
    uint16_t num_entries;
  } __attribute__((packed));

You may also override the default alignment assumptions of a pointer by
using a typedef with explicit alignment:

.. code-block:: c

  typedef const char *unaligned_char_ptr __attribute__((aligned(1)));
  ((unaligned_char_ptr*) buffer)[0] = "Hello, world!\n";

The final option is to copy the memory into something that is properly
aligned.  Be aware, however, that Clang will assume that pointers are
properly aligned for their type when you pass them to a library function
like memcpy.  For example, this code will assume that the source and
destination pointers are both properly aligned for an int:

.. code-block:: c

  void copy_int_array(int *dest, const int *src, size_t num) {
    memcpy(dest, src, num * sizeof(int));
  }

You may explicitly disable this assumption by casting the argument to a
less-aligned pointer type:

.. code-block:: c

  void copy_unaligned_int_array(int *dest, const int *src, size_t num) {
    memcpy((char*) dest, (const char*) src, num * sizeof(int));
  }

Clang promises not to look through the explicit cast when inferring the
alignment of this memcpy.
d120 24
d183 1
a183 1
-----------------------
d185 2
a186 2
OpenMP 3.1 is fully supported and is enabled by default with ``-fopenmp`` 
which now uses the Clang OpenMP library instead of the GCC OpenMP library.
d217 1
a217 1
- Implemented target attribute-based function overloading which allows Clang to
d274 6
d284 1
a284 1
The scan-build and scan-view tools will now be installed with Clang. Use these
d305 7
d313 1
a313 2
Clang-tidy
----------
d315 2
a316 1
New checks have been added to clang-tidy:
d318 1
a318 2
* Checks enforcing certain rules of the `CERT Secure Coding Standards
  <https://www.securecoding.cert.org/confluence/display/seccode/SEI+CERT+Coding+Standards>`_:
d320 1
a320 60
  * `cert-dcl03-c <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/cert-dcl03-c.html>`_
  * `cert-dcl50-cpp <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/cert-dcl50-cpp.html>`_
  * `cert-err52-cpp <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/cert-err52-cpp.html>`_
  * `cert-err58-cpp <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/cert-err58-cpp.html>`_
  * `cert-err60-cpp <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/cert-err60-cpp.html>`_
  * `cert-err61-cpp <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/cert-err61-cpp.html>`_
  * `cert-fio38-c <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/cert-fio38-c.html>`_
  * `cert-oop11-cpp <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/cert-oop11-cpp.html>`_

* Checks supporting the `C++ Core Guidelines
  <https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md>`_:

  * `cppcoreguidelines-pro-bounds-array-to-pointer-decay <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/cppcoreguidelines-pro-bounds-array-to-pointer-decay.html>`_
  * `cppcoreguidelines-pro-bounds-constant-array-index <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/cppcoreguidelines-pro-bounds-constant-array-index.html>`_
  * `cppcoreguidelines-pro-bounds-pointer-arithmetic <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/cppcoreguidelines-pro-bounds-pointer-arithmetic.html>`_
  * `cppcoreguidelines-pro-type-const-cast <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/cppcoreguidelines-pro-type-const-cast.html>`_
  * `cppcoreguidelines-pro-type-cstyle-cast <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/cppcoreguidelines-pro-type-cstyle-cast.html>`_
  * `cppcoreguidelines-pro-type-reinterpret-cast <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/cppcoreguidelines-pro-type-reinterpret-cast.html>`_
  * `cppcoreguidelines-pro-type-static-cast-downcast <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/cppcoreguidelines-pro-type-static-cast-downcast.html>`_
  * `cppcoreguidelines-pro-type-union-access <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/cppcoreguidelines-pro-type-union-access.html>`_
  * `cppcoreguidelines-pro-type-vararg <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/cppcoreguidelines-pro-type-vararg.html>`_

* The functionality of the clang-modernize tool has been moved to the new
  ``modernize`` module in clang-tidy along with a few new checks:

  * `modernize-loop-convert <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/modernize-loop-convert.html>`_
  * `modernize-make-unique <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/modernize-make-unique.html>`_
  * `modernize-pass-by-value <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/modernize-pass-by-value.html>`_
  * `modernize-redundant-void-arg <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/modernize-redundant-void-arg.html>`_
  * `modernize-replace-auto-ptr <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/modernize-replace-auto-ptr.html>`_
  * `modernize-shrink-to-fit <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/modernize-shrink-to-fit.html>`_ (renamed from readability-shrink-to-fit)
  * `modernize-use-auto <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/modernize-use-auto.html>`_
  * `modernize-use-default <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/modernize-use-default.html>`_
  * `modernize-use-nullptr <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/modernize-use-nullptr.html>`_
  * `modernize-use-override <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/modernize-use-override.html>`_ (renamed from misc-use-override)

* New checks flagging various readability-related issues:

  * `readability-identifier-naming <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/readability-identifier-naming.html>`_
  * `readability-implicit-bool-cast <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/readability-implicit-bool-cast.html>`_
  * `readability-inconsistent-declaration-parameter-name <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/readability-inconsistent-declaration-parameter-name.html>`_
  * `readability-uniqueptr-delete-release <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/readability-uniqueptr-delete-release.html>`_

* New ``performance`` module for checks targeting potential performance issues:

  * performance-unnecessary-copy-initialization

* A few new checks have been added to the ``misc`` module:

  * `misc-definitions-in-headers <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/misc-definitions-in-headers.html>`_
  * misc-move-const-arg
  * `misc-move-constructor-init <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/misc-move-constructor-init.html>`_
  * `misc-new-delete-overloads <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/misc-new-delete-overloads.html>`_
  * `misc-non-copyable-objects <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/misc-non-copyable-objects.html>`_
  * `misc-sizeof-container <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/misc-sizeof-container.html>`_
  * `misc-string-integer-assignment <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/misc-string-integer-assignment.html>`_
  * `misc-throw-by-value-catch-by-reference <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/misc-throw-by-value-catch-by-reference.html>`_
  * `misc-unused-alias-decls <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/misc-unused-alias-decls.html>`_
  * `misc-unused-parameters <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/misc-unused-parameters.html>`_
  * `misc-virtual-near-miss <http://llvm.org/releases/3.8.0/tools/clang/tools/extra/docs/clang-tidy/checks/misc-virtual-near-miss.html>`_
d322 2
@


1.1.1.12
log
@Import Clang pre-4.0.0 r291444.
@
text
@d1 3
a3 3
=======================================
Clang 4.0.0 (In-Progress) Release Notes
=======================================
a10 6
.. warning::

   These are in-progress notes for the upcoming Clang 4.0.0 release. You may
   prefer the `Clang 3.9 Release Notes
   <http://llvm.org/releases/3.9.0/tools/clang/docs/ReleaseNotes.html>`_.

d15 1
a15 1
frontend, part of the LLVM Compiler Infrastructure, release 4.0.0. Here we
d19 1
a19 1
documentation <http://llvm.org/docs/ReleaseNotes.html>`_. All LLVM
d28 2
a29 7
Note that if you are reading this file from a Subversion checkout or the
main Clang web page, this document applies to the *next* release, not
the current one. To see the release notes for a specific release, please
see the `releases page <http://llvm.org/releases/>`_.

What's New in Clang 4.0.0?
==========================
d36 12
a47 1
Major New Features
d50 25
a74 3
- The ``diagnose_if`` attribute has been added to clang. This attribute allows
  clang to emit a warning or error if a function call meets one or more
  user-specified conditions.
d76 4
a79 1
-  ...
d81 29
a109 2
Improvements to Clang's diagnostics
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
d111 1
a111 1
-  ...
d113 5
a117 2
New Compiler Flags
------------------
d119 2
a120 3
The option -Og has been added to optimize the debugging experience.
For now, this option is exactly the same as -O1. However, in the future,
some other optimizations might be enabled or disabled.
d122 1
d124 2
a125 1
The option ....
d127 5
a131 2
New Pragmas in Clang
-----------------------
d133 1
a133 1
Clang now supports the ...
d135 3
d139 2
a140 2
Attribute Changes in Clang
--------------------------
d142 1
a142 1
-  ...
d144 3
a146 2
Windows Support
---------------
d148 2
a149 1
Clang's support for building native Windows programs ...
d155 2
a156 1
- ...
d158 6
a163 1
...
a164 2
C11 Feature Support
^^^^^^^^^^^^^^^^^^^
d166 2
a167 1
...
d169 2
a170 2
C++ Language Changes in Clang
-----------------------------
d172 1
a172 1
...
d174 2
a175 2
C++1z Feature Support
^^^^^^^^^^^^^^^^^^^^^
d177 4
a180 1
...
d182 3
a184 4
Objective-C Language Changes in Clang
-------------------------------------

...
d189 34
a222 1
...
d225 33
a257 1
----------------------------------
d259 2
a260 1
...
d265 1
a265 1
These are major API changes that have happened since the 3.9 release of
d269 3
a271 1
-  ...
d275 40
a314 10

...

libclang
--------

...

With the option --show-description, scan-build's list of defects will also
show the description of the defects.
d320 2
a321 11
...

Core Analysis Improvements
==========================

- ...

New Issues Found
================

- ...
d323 2
a324 2
Python Binding Changes
----------------------
d326 1
a326 1
The following methods have been added:
d328 82
a409 1
-  ...
a410 2
Significant Known Problems
==========================
@


1.1.1.12.2.1
log
@Sync with HEAD
@
text
@d34 5
a53 19
- Enhanced devirtualization with
  `-fstrict-vtable-pointers <UsersManual.html#cmdoption-fstrict-vtable-pointers>`_.
  Clang devirtualizes across different basic blocks, like loops:

  .. code-block:: c++

       struct A {
           virtual void foo();
       };
       void indirect(A &a, int n) {
           for (int i = 0 ; i < n; i++)
               a.foo();
       }
       void test(int n) {
           A a;
           indirect(a, n);
       }


a55 8
Improvements to ThinLTO (-flto=thin)
------------------------------------
- Integration with profile data (PGO). When available, profile data enables
  more accurate function importing decisions, as well as cross-module indirect
  call promotion.
- Significant build-time and binary-size improvements when compiling with debug
  info (-g).

a67 2
The option -MJ has been added to simplify adding JSON compilation
database output into existing build systems.
@


1.1.1.13
log
@Import Clang 4.0RC1 r294123.
@
text
@d34 5
a53 19
- Enhanced devirtualization with
  `-fstrict-vtable-pointers <UsersManual.html#cmdoption-fstrict-vtable-pointers>`_.
  Clang devirtualizes across different basic blocks, like loops:

  .. code-block:: c++

       struct A {
           virtual void foo();
       };
       void indirect(A &a, int n) {
           for (int i = 0 ; i < n; i++)
               a.foo();
       }
       void test(int n) {
           A a;
           indirect(a, n);
       }


a55 8
Improvements to ThinLTO (-flto=thin)
------------------------------------
- Integration with profile data (PGO). When available, profile data enables
  more accurate function importing decisions, as well as cross-module indirect
  call promotion.
- Significant build-time and binary-size improvements when compiling with debug
  info (-g).

a67 2
The option -MJ has been added to simplify adding JSON compilation
database output into existing build systems.
@


1.1.1.14
log
@Import clang r309604 from branches/release_50
@
text
@d2 1
a2 1
Clang 5.0.0 (In-Progress) Release Notes
d13 3
a15 3
   These are in-progress notes for the upcoming Clang 5 release.
   Release notes for previous releases can be found on
   `the Download Page <http://releases.llvm.org/download.html>`_.
d21 1
a21 1
frontend, part of the LLVM Compiler Infrastructure, release 5.0.0. Here we
d34 1
a34 6
Note that if you are reading this file from a Subversion checkout or the
main Clang web page, this document applies to the *next* release, not
the current one. To see the release notes for a specific release, please
see the `releases page <http://llvm.org/releases/>`_.

What's New in Clang 5.0.0?
d45 23
d70 8
d81 1
a81 5
-  -Wcast-qual was implemented for C++. C-style casts are now properly
   diagnosed.

-  -Wunused-lambda-capture warns when a variable explicitly captured
   by a lambda is not used in the body of the lambda.
d86 3
a88 1
The option ....
d90 2
a91 2
Deprecated Compiler Flags
-------------------------
d93 1
a93 6
The following options are deprecated and ignored. They will be removed in
future versions of Clang.

- -fslp-vectorize-aggressive used to enable the BB vectorizing pass. They have been superseeded
  by the normal SLP vectorizer.
- -fno-slp-vectorize-aggressive used to be the default behavior of clang.
d104 1
a104 3
-  The ``overloadable`` attribute now allows at most one function with a given
   name to lack the ``overloadable`` attribute. This unmarked function will not
   have its name mangled.
d152 1
a152 1
These are major API changes that have happened since the 4.0.0 release of
a162 48

clang-format
------------

* Option **BreakBeforeInheritanceComma** added to break before ``:`` and ``,``  in case of
  multiple inheritance in a class declaration. Enabled by default in the Mozilla coding style.

  +---------------------+----------------------------------------+
  | true                | false                                  |
  +=====================+========================================+
  | .. code-block:: c++ | .. code-block:: c++                    |
  |                     |                                        |
  |   class MyClass     |   class MyClass : public X, public Y { |
  |       : public X    |   };                                   |
  |       , public Y {  |                                        |
  |   };                |                                        |
  +---------------------+----------------------------------------+

* Align block comment decorations.

  +----------------------+---------------------+
  | Before               | After               |
  +======================+=====================+
  |  .. code-block:: c++ | .. code-block:: c++ |
  |                      |                     |
  |    /* line 1         |   /* line 1         |
  |      * line 2        |    * line 2         |
  |     */               |    */               |
  +----------------------+---------------------+

* The :doc:`ClangFormatStyleOptions` documentation provides detailed examples for most options.

* Namespace end comments are now added or updated automatically.

  +---------------------+---------------------+
  | Before              | After               |
  +=====================+=====================+
  | .. code-block:: c++ | .. code-block:: c++ |
  |                     |                     |
  |   namespace A {     |   namespace A {     |
  |   int i;            |   int i;            |
  |   int j;            |   int j;            |
  |   }                 |   }                 |
  +---------------------+---------------------+

* Comment reflow support added. Overly long comment lines will now be reflown with the rest of
  the paragraph instead of just broken. Option **ReflowComments** added and enabled by default.

d168 3
a176 25
Undefined Behavior Sanitizer (UBSan)
------------------------------------

- The Undefined Behavior Sanitizer has a new check for pointer overflow. This
  check is on by default. The flag to control this functionality is
  -fsanitize=pointer-overflow.

  Pointer overflow is an indicator of undefined behavior: when a pointer
  indexing expression wraps around the address space, or produces other
  unexpected results, its result may not point to a valid object.

- UBSan has several new checks which detect violations of nullability
  annotations. These checks are off by default. The flag to control this group
  of checks is -fsanitize=nullability. The checks can be individially enabled
  by -fsanitize=nullability-arg (which checks calls),
  -fsanitize=nullability-assign (which checks assignments), and
  -fsanitize=nullability-return (which checks return statements).

- UBSan can now detect invalid loads from bitfields and from ObjC BOOLs.

- UBSan can now avoid emitting unnecessary type checks in C++ class methods and
  in several other cases where the result is known at compile-time. UBSan can
  also avoid emitting unnecessary overflow checks in arithmetic expressions
  with promoted integer operands.

@


1.1.1.15
log
@Import clang r319952 from branches/release_50
@
text
@d1 3
a3 3
=========================
Clang 5.0.0 Release Notes
=========================
d11 6
d29 9
a37 3
For more information about Clang or LLVM, including information about the
latest release, please see the `Clang Web Site <http://clang.llvm.org>`_ or the
`LLVM Web Site <http://llvm.org>`_.
d50 1
a50 8
C++ coroutines
^^^^^^^^^^^^^^
`C++ coroutines TS
<http://open-std.org/jtc1/sc22/wg21/docs/papers/2017/n4680.pdf>`_
implementation has landed. Use ``-fcoroutines-ts -stdlib=libc++`` to enable
coroutine support. Here is `an example
<https://wandbox.org/permlink/Dth1IO5q8Oe31ew2>`_ to get you started.

d55 1
a55 1
-  ``-Wcast-qual`` was implemented for C++. C-style casts are now properly
d58 1
a58 1
-  ``-Wunused-lambda-capture`` warns when a variable explicitly captured
a60 19
-  ``-Wstrict-prototypes`` is a new warning that warns about non-prototype
   function and block declarations and types in C and Objective-C.

-  ``-Wunguarded-availability`` is a new warning that warns about uses of new
   APIs that were introduced in a system whose version is newer than the
   deployment target version. A new Objective-C expression ``@@available`` has
   been introduced to perform system version checking at runtime. This warning
   is off by default to prevent unexpected warnings in existing projects.
   However, its less strict sibling ``-Wunguarded-availability-new`` is on by
   default. It warns about unguarded uses of APIs only when they were introduced
   in or after macOS 10.13, iOS 11, tvOS 11 or watchOS 4.

-  The ``-Wdocumentation`` warning now allows the use of ``\param`` and
   ``\returns`` documentation directives in the documentation comments for
   declarations with a function or a block pointer type.

-  The compiler no longer warns about unreachable ``__builtin_unreachable``
   statements.

d64 1
a64 2
- ``--autocomplete`` was implemented to obtain a list of flags and its arguments.
  This is used for shell autocompletion.
d72 1
a72 1
- ``-fslp-vectorize-aggressive`` used to enable the BB vectorizing pass. They have been superseeded
d74 1
a74 1
- ``-fno-slp-vectorize-aggressive`` used to be the default behavior of clang.
d79 1
a79 2
- Clang now supports the ``clang attribute`` pragma that allows users to apply
  an attribute to multiple declarations.
a80 3
- ``pragma pack`` directives that are included in a precompiled header are now
  applied correctly to the declarations in the compilation unit that includes
  that precompiled header.
d88 6
a93 2
-  The ``ms_abi`` attribute and the ``__builtin_ms_va_list`` types and builtins
   are now supported on AArch64.
d98 3
a100 33
- Added near complete support for implicit scalar to vector conversion, a GNU
  C/C++ language extension. With this extension, the following code is
  considered valid:

.. code-block:: c

    typedef unsigned v4i32 __attribute__((vector_size(16)));

    v4i32 foo(v4i32 a) {
      // Here 5 is implicitly casted to an unsigned value and replicated into a
      // vector with as many elements as 'a'.
      return a + 5;
    }

The implicit conversion of a scalar value to a vector value--in the context of
a vector expression--occurs when:

- The type of the vector is that of a ``__attribute__((vector_size(size)))``
  vector, not an OpenCL ``__attribute__((ext_vector_type(size)))`` vector type.

- The scalar value can be casted to that of the vector element's type without
  the loss of precision based on the type of the scalar and the type of the
  vector's elements.

- For compile time constant values, the above rule is weakened to consider the
  value of the scalar constant rather than the constant's type. However,
  for compatibility with GCC, floating point constants with precise integral
  representations are not implicitly converted to integer values.

Currently the basic integer and floating point types with the following
operators are supported: ``+``, ``/``, ``-``, ``*``, ``%``, ``>``, ``<``,
``>=``, ``<=``, ``==``, ``!=``, ``&``, ``|``, ``^`` and the corresponding
assignment operators where applicable.
d102 4
d110 4
a113 21
- We expect this to be the last Clang release that defaults to ``-std=gnu++98``
  when using the GCC-compatible ``clang++`` driver. From Clang 6 onwards we
  expect to use ``-std=gnu++14`` or a later standard by default, to match the
  behavior of recent GCC releases. Users are encouraged to change their build
  files to explicitly specify their desired C++ standard.

- Support for the C++17 standard has been completed. This mode can be enabled
  using ``-std=c++17`` (the old flag ``-std=c++1z`` is still supported for
  compatibility).

- When targeting a platform that uses the Itanium C++ ABI, Clang implements a
  `recent change to the ABI`__ that passes objects of class type indirectly if they
  have a non-trivial move constructor. Previous versions of Clang only
  considered the copy constructor, resulting in an ABI change in rare cases,
  but GCC has already implemented this change for several releases.
  This affects all targets other than Windows and PS4. You can opt out of this
  ABI change with ``-fclang-abi-compat=4.0``.

- As mentioned in `C Language Changes in Clang`_, Clang's support for
  implicit scalar to vector conversions also applies to C++. Additionally
  the following operators are also supported: ``&&`` and ``||``.
d115 1
a115 1
.. __: https://github.com/itanium-cxx-abi/cxx-abi/commit/7099637aba11fed6bdad7ee65bf4fd3f97fbf076
d120 1
a120 10
- Clang now guarantees that a ``readwrite`` property is synthesized when an
  ambiguous property (i.e. a property that's declared in multiple protocols)
  is synthesized. The ``-Wprotocol-property-synthesis-ambiguity`` warning that
  warns about incompatible property types is now promoted to an error when
  there's an ambiguity between ``readwrite`` and ``readonly`` properties.

- Clang now prohibits synthesis of ambiguous properties with incompatible
  explicit property attributes. The following property attributes are
  checked for differences: ``copy``, ``retain``/``strong``, ``atomic``,
  ``getter`` and ``setter``.
d125 1
a125 1
Various bug fixes and improvements:
d127 2
a128 1
-  Extended OpenCL-related Clang tests.
d130 1
a130 3
-  Improved diagnostics across several areas: scoped address space
   qualified variables, function pointers, atomics, type rank for overloading,
   block captures, ``reserve_id_t``.
d132 2
a133 3
-  Several address space related fixes for constant address space function scope variables,
   IR generation, mangling of ``generic`` and alloca (post-fix from general Clang
   refactoring of address spaces).
d135 3
a137 2
-  Several improvements in extensions: fixed OpenCL version for ``cl_khr_mipmap_image``,
   added missing ``cl_khr_3d_image_writes``.
d139 1
a139 1
-  Improvements in ``enqueue_kernel``, especially the implementation of ``ndrange_t`` and blocks.
d141 2
a142 7
-  OpenCL type related fixes: global samplers, the ``pipe_t`` size, internal type redefinition,
   and type compatibility checking in ternary and other operations.

-  The OpenCL header has been extended with missing extension guards, and direct mapping of ``as_type``
   to ``__builtin_astype``.

-  Fixed ``kernel_arg_type_qual`` and OpenCL/SPIR version in metadata.
d144 1
a144 11
-  Added proper use of the kernel calling convention to various targets.

The following new functionalities have been added:

-  Added documentation on OpenCL to Clang user manual.

-  Extended Clang builtins with required ``cl_khr_subgroups`` support.

-  Add ``intel_reqd_sub_group_size`` attribute support.

-  Added OpenCL types to ``CIndex``.
d188 1
a188 1
  |   }                 |   } // namespace A  |
d197 2
a198 24
- Libclang now provides code-completion results for more C++ constructs
  and keywords. The following keywords/identifiers are now included in the
  code-completion results: ``static_assert``, ``alignas``, ``constexpr``,
  ``final``, ``noexcept``, ``override`` and ``thread_local``.

- Libclang now provides code-completion results for members from dependent
  classes. For example:

  .. code-block:: c++

    template<typename T>
    void appendValue(std::vector<T> &dest, const T &value) {
        dest. // Relevant completion results are now shown after '.'
    }

  Note that code-completion results are still not provided when the member
  expression includes a dependent base expression. For example:

  .. code-block:: c++

    template<typename T>
    void appendValue(std::vector<std::vector<T>> &dest, const T &value) {
        dest.at(0). // Libclang fails to provide completion results after '.'
    }
d203 1
a203 7
- The static analyzer now supports using the
  `z3 theorem prover <https://github.com/z3prover/z3>`_ from Microsoft Research
  as an external constraint solver. This allows reasoning over more complex
  queries, but performance is ~15x slower than the default range-based
  constraint solver. To enable the z3 solver backend, clang must be built with
  the ``CLANG_ANALYZER_BUILD_Z3=ON`` option, and the
  ``-Xanalyzer -analyzer-constraints=z3`` arguments passed at runtime.
d210 1
a210 1
  ``-fsanitize=pointer-overflow``.
d218 4
a221 4
  of checks is ``-fsanitize=nullability``. The checks can be individially enabled
  by ``-fsanitize=nullability-arg`` (which checks calls),
  ``-fsanitize=nullability-assign`` (which checks assignments), and
  ``-fsanitize=nullability-return`` (which checks return statements).
d230 9
a242 2
Python bindings now support both Python 2 and Python 3.

d245 1
a245 9
- ``is_scoped_enum`` has been added to ``Cursor``.

- ``exception_specification_kind`` has been added to ``Cursor``.

- ``get_address_space`` has been added to ``Type``.

- ``get_typedef_name`` has been added to ``Type``.

- ``get_exception_specification_kind`` has been added to ``Type``.
d247 2
@


1.1.1.15.4.1
log
@Sync with HEAD
@
text
@d1 3
a3 3
=======================================
Clang 7.0.0 (In-Progress) Release Notes
=======================================
a10 6
.. warning::

   These are in-progress notes for the upcoming Clang 7 release.
   Release notes for previous releases can be found on
   `the Download Page <http://releases.llvm.org/download.html>`_.

d15 1
a15 1
frontend, part of the LLVM Compiler Infrastructure, release 7.0.0. Here we
d27 1
a27 6
Note that if you are reading this file from a Subversion checkout or the
main Clang web page, this document applies to the *next* release, not
the current one. To see the release notes for a specific release, please
see the `releases page <http://llvm.org/releases/>`_.

What's New in Clang 7.0.0?
d38 8
a45 1
-  ...
d50 8
a57 2
- ``-Wc++98-compat-extra-semi`` is a new flag, which was previously inseparable
  from ``-Wc++98-compat-pedantic``. The latter still controls the new flag.
d59 12
a70 43
- ``-Wextra-semi`` now also controls ``-Wc++98-compat-extra-semi``.
  Please do note that if you pass ``-Wno-c++98-compat-pedantic``, it implies
  ``-Wno-c++98-compat-extra-semi``, so if you want that diagnostic, you need
  to explicitly re-enable it (e.g. by appending ``-Wextra-semi``).

- ``-Wself-assign`` and ``-Wself-assign-field`` were extended to diagnose
  self-assignment operations using overloaded operators (i.e. classes).
  If you are doing such an assignment intentionally, e.g. in a unit test for
  a data structure, the first warning can be disabled by passing
  ``-Wno-self-assign-overloaded``, also the warning can be suppressed by adding
  ``*&`` to the right-hand side or casting it to the appropriate reference type.

Non-comprehensive list of changes in this release
-------------------------------------------------

- Clang binary and libraries have been renamed from 7.0 to 7.
  For example, the ``clang`` binary will be called ``clang-7``
  instead of ``clang-7.0``.

- Clang implements a collection of recent fixes to the C++ standard's definition
  of "standard-layout". In particular, a class is only considered to be
  standard-layout if all base classes and the first data member (or bit-field)
  can be laid out at offset zero.

- Clang's handling of the GCC ``packed`` class attribute in C++ has been fixed
  to apply only to non-static data members and not to base classes. This fixes
  an ABI difference between Clang and GCC, but creates an ABI difference between
  Clang 7 and earlier versions. The old behavior can be restored by setting
  ``-fclang-abi-compat`` to ``6`` or earlier.

- Clang implements the proposed resolution of LWG issue 2358, along with the
  `corresponding change to the Itanium C++ ABI
  <https://github.com/itanium-cxx-abi/cxx-abi/pull/51>`_, which make classes
  containing only unnamed non-zero-length bit-fields be considered non-empty.
  This is an ABI break compared to prior Clang releases, but makes Clang
  generate code that is ABI-compatible with other compilers. The old
  behavior can be restored by setting ``-fclang-abi-compat`` to ``6`` or
  lower.

- An existing tool named ``diagtool`` has been added to the release. As the
  name suggests, it helps with dealing with diagnostics in ``clang``, such as
  finding out the warning hierarchy, and which of them are enabled by default
  or for a particular compiler invocation.
d72 2
a73 1
- ...
d78 2
a79 15
- ``-fstrict-float-cast-overflow`` and ``-fno-strict-float-cast-overflow``.

  When a floating-point value is not representable in a destination integer
  type, the code has undefined behavior according to the language standard. By
  default, Clang will not guarantee any particular result in that case. With the
  'no-strict' option, Clang attempts to match the overflowing behavior of the
  target's native float-to-int conversion instructions.

- ``-fforce-emit-vtables`` and ``-fno-force-emit-vtables``.

   In order to improve devirtualization, forces emitting of vtables even in
   modules where it isn't necessary. It causes more inline virtual functions
   to be emitted.

- ...
d87 3
a89 1
- ...
d91 1
a91 1
Modified Compiler Flags
d94 2
a95 11
- Before Clang 7, we prepended the `#` character to the `--autocomplete`
  argument to enable cc1 flags. For example, when the `-cc1` or `-Xclang` flag
  is in the :program:`clang` invocation, the shell executed
  `clang --autocomplete=#-<flag to be completed>`. Clang 7 now requires the
  whole invocation including all flags to be passed to the `--autocomplete` like
  this: `clang --autocomplete=-cc1,-xc++,-fsyn`.

New Pragmas in Clang
--------------------

Clang now supports the ...
d97 3
d104 5
a108 14
- Clang now supports function multiversioning with attribute 'target' on ELF
  based x86/x86-64 environments by using indirect functions. This implementation
  has a few minor limitations over the GCC implementation for the sake of AST
  sanity, however it is otherwise compatible with existing code using this
  feature for GCC. Consult the documentation for the target attribute for more
  information.

- ...

Windows Support
---------------

Clang's support for building native Windows programs ...

d113 33
a145 6
- ...

...

C11 Feature Support
^^^^^^^^^^^^^^^^^^^
a146 1
...
d151 21
a171 1
- ...
d173 1
a173 4
C++1z Feature Support
^^^^^^^^^^^^^^^^^^^^^

...
d178 10
a187 1
...
d192 16
a207 1
...
d209 2
a210 2
OpenMP Support in Clang
----------------------------------
d212 2
a213 1
- ...
d215 1
a215 2
CUDA Support in Clang
---------------------
d217 1
a217 3
- Clang will now try to locate the CUDA installation next to :program:`ptxas`
  in the `PATH` environment variable. This behavior can be turned off by passing
  the new flag `--cuda-path-ignore-env`.
d219 1
a219 4
- Clang now supports generating object files with relocatable device code. This
  feature needs to be enabled with `-fcuda-rdc` and my result in performance
  penalties compared to whole program compilation. Please note that NVIDIA's
  :program:`nvcc` must be used for linking.
d221 1
a221 2
Internal API Changes
--------------------
d223 1
a223 3
These are major API changes that have happened since the 6.0.0 release of
Clang. If upgrading an external codebase that uses Clang as a library,
this section should help get you past the largest hurdles of upgrading.
d225 1
a225 1
-  ...
d227 1
a227 2
AST Matchers
------------
a228 1
- ...
d233 40
a272 3
- Clang-format will now support detecting and formatting code snippets in raw
  string literals.  This is configured through the `RawStringFormats` style
  option.
d274 2
a275 1
- ...
d280 24
a303 2
...

d308 7
a314 3
- ...

...
d319 21
a339 1
* ...
a340 2
Core Analysis Improvements
==========================
d342 6
a347 1
- ...
d349 1
a349 2
New Issues Found
================
d351 1
a351 1
- ...
d353 1
a353 2
Python Binding Changes
----------------------
d355 1
a355 1
The following methods have been added:
d357 1
a357 1
-  ...
a358 2
Significant Known Problems
==========================
@


1.1.1.15.4.2
log
@Mostly merge changes from HEAD upto 20200411
@
text
@@


1.1.1.15.2.1
log
@Sync with HEAD
@
text
@d1 3
a3 3
=======================================
Clang 7.0.0 (In-Progress) Release Notes
=======================================
a10 6
.. warning::

   These are in-progress notes for the upcoming Clang 7 release.
   Release notes for previous releases can be found on
   `the Download Page <http://releases.llvm.org/download.html>`_.

d15 1
a15 1
frontend, part of the LLVM Compiler Infrastructure, release 7.0.0. Here we
d27 1
a27 6
Note that if you are reading this file from a Subversion checkout or the
main Clang web page, this document applies to the *next* release, not
the current one. To see the release notes for a specific release, please
see the `releases page <http://llvm.org/releases/>`_.

What's New in Clang 7.0.0?
d38 8
a45 1
-  ...
d50 8
a57 2
- ``-Wc++98-compat-extra-semi`` is a new flag, which was previously inseparable
  from ``-Wc++98-compat-pedantic``. The latter still controls the new flag.
d59 12
a70 43
- ``-Wextra-semi`` now also controls ``-Wc++98-compat-extra-semi``.
  Please do note that if you pass ``-Wno-c++98-compat-pedantic``, it implies
  ``-Wno-c++98-compat-extra-semi``, so if you want that diagnostic, you need
  to explicitly re-enable it (e.g. by appending ``-Wextra-semi``).

- ``-Wself-assign`` and ``-Wself-assign-field`` were extended to diagnose
  self-assignment operations using overloaded operators (i.e. classes).
  If you are doing such an assignment intentionally, e.g. in a unit test for
  a data structure, the first warning can be disabled by passing
  ``-Wno-self-assign-overloaded``, also the warning can be suppressed by adding
  ``*&`` to the right-hand side or casting it to the appropriate reference type.

Non-comprehensive list of changes in this release
-------------------------------------------------

- Clang binary and libraries have been renamed from 7.0 to 7.
  For example, the ``clang`` binary will be called ``clang-7``
  instead of ``clang-7.0``.

- Clang implements a collection of recent fixes to the C++ standard's definition
  of "standard-layout". In particular, a class is only considered to be
  standard-layout if all base classes and the first data member (or bit-field)
  can be laid out at offset zero.

- Clang's handling of the GCC ``packed`` class attribute in C++ has been fixed
  to apply only to non-static data members and not to base classes. This fixes
  an ABI difference between Clang and GCC, but creates an ABI difference between
  Clang 7 and earlier versions. The old behavior can be restored by setting
  ``-fclang-abi-compat`` to ``6`` or earlier.

- Clang implements the proposed resolution of LWG issue 2358, along with the
  `corresponding change to the Itanium C++ ABI
  <https://github.com/itanium-cxx-abi/cxx-abi/pull/51>`_, which make classes
  containing only unnamed non-zero-length bit-fields be considered non-empty.
  This is an ABI break compared to prior Clang releases, but makes Clang
  generate code that is ABI-compatible with other compilers. The old
  behavior can be restored by setting ``-fclang-abi-compat`` to ``6`` or
  lower.

- An existing tool named ``diagtool`` has been added to the release. As the
  name suggests, it helps with dealing with diagnostics in ``clang``, such as
  finding out the warning hierarchy, and which of them are enabled by default
  or for a particular compiler invocation.
d72 2
a73 1
- ...
d78 2
a79 15
- ``-fstrict-float-cast-overflow`` and ``-fno-strict-float-cast-overflow``.

  When a floating-point value is not representable in a destination integer
  type, the code has undefined behavior according to the language standard. By
  default, Clang will not guarantee any particular result in that case. With the
  'no-strict' option, Clang attempts to match the overflowing behavior of the
  target's native float-to-int conversion instructions.

- ``-fforce-emit-vtables`` and ``-fno-force-emit-vtables``.

   In order to improve devirtualization, forces emitting of vtables even in
   modules where it isn't necessary. It causes more inline virtual functions
   to be emitted.

- ...
d87 3
a89 1
- ...
d91 1
a91 1
Modified Compiler Flags
d94 2
a95 11
- Before Clang 7, we prepended the `#` character to the `--autocomplete`
  argument to enable cc1 flags. For example, when the `-cc1` or `-Xclang` flag
  is in the :program:`clang` invocation, the shell executed
  `clang --autocomplete=#-<flag to be completed>`. Clang 7 now requires the
  whole invocation including all flags to be passed to the `--autocomplete` like
  this: `clang --autocomplete=-cc1,-xc++,-fsyn`.

New Pragmas in Clang
--------------------

Clang now supports the ...
d97 3
d104 5
a108 14
- Clang now supports function multiversioning with attribute 'target' on ELF
  based x86/x86-64 environments by using indirect functions. This implementation
  has a few minor limitations over the GCC implementation for the sake of AST
  sanity, however it is otherwise compatible with existing code using this
  feature for GCC. Consult the documentation for the target attribute for more
  information.

- ...

Windows Support
---------------

Clang's support for building native Windows programs ...

d113 33
a145 6
- ...

...

C11 Feature Support
^^^^^^^^^^^^^^^^^^^
a146 1
...
d151 21
a171 1
- ...
d173 1
a173 4
C++1z Feature Support
^^^^^^^^^^^^^^^^^^^^^

...
d178 10
a187 1
...
d192 16
a207 1
...
d209 2
a210 2
OpenMP Support in Clang
----------------------------------
d212 2
a213 1
- ...
d215 1
a215 2
CUDA Support in Clang
---------------------
d217 1
a217 3
- Clang will now try to locate the CUDA installation next to :program:`ptxas`
  in the `PATH` environment variable. This behavior can be turned off by passing
  the new flag `--cuda-path-ignore-env`.
d219 1
a219 4
- Clang now supports generating object files with relocatable device code. This
  feature needs to be enabled with `-fcuda-rdc` and my result in performance
  penalties compared to whole program compilation. Please note that NVIDIA's
  :program:`nvcc` must be used for linking.
d221 1
a221 2
Internal API Changes
--------------------
d223 1
a223 3
These are major API changes that have happened since the 6.0.0 release of
Clang. If upgrading an external codebase that uses Clang as a library,
this section should help get you past the largest hurdles of upgrading.
d225 1
a225 1
-  ...
d227 1
a227 2
AST Matchers
------------
a228 1
- ...
d233 40
a272 3
- Clang-format will now support detecting and formatting code snippets in raw
  string literals.  This is configured through the `RawStringFormats` style
  option.
d274 2
a275 1
- ...
d280 24
a303 2
...

d308 7
a314 3
- ...

...
d319 21
a339 1
* ...
a340 2
Core Analysis Improvements
==========================
d342 6
a347 1
- ...
d349 1
a349 2
New Issues Found
================
d351 1
a351 1
- ...
d353 1
a353 2
Python Binding Changes
----------------------
d355 1
a355 1
The following methods have been added:
d357 1
a357 1
-  ...
a358 2
Significant Known Problems
==========================
@


1.1.1.16
log
@Import clang r337282 from trunk
@
text
@d1 3
a3 3
=======================================
Clang 7.0.0 (In-Progress) Release Notes
=======================================
a10 6
.. warning::

   These are in-progress notes for the upcoming Clang 7 release.
   Release notes for previous releases can be found on
   `the Download Page <http://releases.llvm.org/download.html>`_.

d15 1
a15 1
frontend, part of the LLVM Compiler Infrastructure, release 7.0.0. Here we
d27 1
a27 6
Note that if you are reading this file from a Subversion checkout or the
main Clang web page, this document applies to the *next* release, not
the current one. To see the release notes for a specific release, please
see the `releases page <http://llvm.org/releases/>`_.

What's New in Clang 7.0.0?
d38 8
a45 1
-  ...
d50 8
a57 2
- ``-Wc++98-compat-extra-semi`` is a new flag, which was previously inseparable
  from ``-Wc++98-compat-pedantic``. The latter still controls the new flag.
d59 12
a70 43
- ``-Wextra-semi`` now also controls ``-Wc++98-compat-extra-semi``.
  Please do note that if you pass ``-Wno-c++98-compat-pedantic``, it implies
  ``-Wno-c++98-compat-extra-semi``, so if you want that diagnostic, you need
  to explicitly re-enable it (e.g. by appending ``-Wextra-semi``).

- ``-Wself-assign`` and ``-Wself-assign-field`` were extended to diagnose
  self-assignment operations using overloaded operators (i.e. classes).
  If you are doing such an assignment intentionally, e.g. in a unit test for
  a data structure, the first warning can be disabled by passing
  ``-Wno-self-assign-overloaded``, also the warning can be suppressed by adding
  ``*&`` to the right-hand side or casting it to the appropriate reference type.

Non-comprehensive list of changes in this release
-------------------------------------------------

- Clang binary and libraries have been renamed from 7.0 to 7.
  For example, the ``clang`` binary will be called ``clang-7``
  instead of ``clang-7.0``.

- Clang implements a collection of recent fixes to the C++ standard's definition
  of "standard-layout". In particular, a class is only considered to be
  standard-layout if all base classes and the first data member (or bit-field)
  can be laid out at offset zero.

- Clang's handling of the GCC ``packed`` class attribute in C++ has been fixed
  to apply only to non-static data members and not to base classes. This fixes
  an ABI difference between Clang and GCC, but creates an ABI difference between
  Clang 7 and earlier versions. The old behavior can be restored by setting
  ``-fclang-abi-compat`` to ``6`` or earlier.

- Clang implements the proposed resolution of LWG issue 2358, along with the
  `corresponding change to the Itanium C++ ABI
  <https://github.com/itanium-cxx-abi/cxx-abi/pull/51>`_, which make classes
  containing only unnamed non-zero-length bit-fields be considered non-empty.
  This is an ABI break compared to prior Clang releases, but makes Clang
  generate code that is ABI-compatible with other compilers. The old
  behavior can be restored by setting ``-fclang-abi-compat`` to ``6`` or
  lower.

- An existing tool named ``diagtool`` has been added to the release. As the
  name suggests, it helps with dealing with diagnostics in ``clang``, such as
  finding out the warning hierarchy, and which of them are enabled by default
  or for a particular compiler invocation.
d72 2
a73 1
- ...
d78 2
a79 15
- ``-fstrict-float-cast-overflow`` and ``-fno-strict-float-cast-overflow``.

  When a floating-point value is not representable in a destination integer
  type, the code has undefined behavior according to the language standard. By
  default, Clang will not guarantee any particular result in that case. With the
  'no-strict' option, Clang attempts to match the overflowing behavior of the
  target's native float-to-int conversion instructions.

- ``-fforce-emit-vtables`` and ``-fno-force-emit-vtables``.

   In order to improve devirtualization, forces emitting of vtables even in
   modules where it isn't necessary. It causes more inline virtual functions
   to be emitted.

- ...
d87 3
a89 1
- ...
d91 1
a91 1
Modified Compiler Flags
d94 2
a95 11
- Before Clang 7, we prepended the `#` character to the `--autocomplete`
  argument to enable cc1 flags. For example, when the `-cc1` or `-Xclang` flag
  is in the :program:`clang` invocation, the shell executed
  `clang --autocomplete=#-<flag to be completed>`. Clang 7 now requires the
  whole invocation including all flags to be passed to the `--autocomplete` like
  this: `clang --autocomplete=-cc1,-xc++,-fsyn`.

New Pragmas in Clang
--------------------

Clang now supports the ...
d97 3
d104 5
a108 14
- Clang now supports function multiversioning with attribute 'target' on ELF
  based x86/x86-64 environments by using indirect functions. This implementation
  has a few minor limitations over the GCC implementation for the sake of AST
  sanity, however it is otherwise compatible with existing code using this
  feature for GCC. Consult the documentation for the target attribute for more
  information.

- ...

Windows Support
---------------

Clang's support for building native Windows programs ...

d113 33
a145 6
- ...

...

C11 Feature Support
^^^^^^^^^^^^^^^^^^^
a146 1
...
d151 21
a171 1
- ...
d173 1
a173 4
C++1z Feature Support
^^^^^^^^^^^^^^^^^^^^^

...
d178 10
a187 1
...
d192 16
a207 1
...
d209 2
a210 2
OpenMP Support in Clang
----------------------------------
d212 2
a213 1
- ...
d215 1
a215 2
CUDA Support in Clang
---------------------
d217 1
a217 3
- Clang will now try to locate the CUDA installation next to :program:`ptxas`
  in the `PATH` environment variable. This behavior can be turned off by passing
  the new flag `--cuda-path-ignore-env`.
d219 1
a219 4
- Clang now supports generating object files with relocatable device code. This
  feature needs to be enabled with `-fcuda-rdc` and my result in performance
  penalties compared to whole program compilation. Please note that NVIDIA's
  :program:`nvcc` must be used for linking.
d221 1
a221 2
Internal API Changes
--------------------
d223 1
a223 3
These are major API changes that have happened since the 6.0.0 release of
Clang. If upgrading an external codebase that uses Clang as a library,
this section should help get you past the largest hurdles of upgrading.
d225 1
a225 1
-  ...
d227 1
a227 2
AST Matchers
------------
a228 1
- ...
d233 40
a272 3
- Clang-format will now support detecting and formatting code snippets in raw
  string literals.  This is configured through the `RawStringFormats` style
  option.
d274 2
a275 1
- ...
d280 24
a303 2
...

d308 7
a314 3
- ...

...
d319 21
a339 1
* ...
a340 2
Core Analysis Improvements
==========================
d342 6
a347 1
- ...
d349 1
a349 2
New Issues Found
================
d351 1
a351 1
- ...
d353 1
a353 2
Python Binding Changes
----------------------
d355 1
a355 1
The following methods have been added:
d357 1
a357 1
-  ...
a358 2
Significant Known Problems
==========================
@


1.1.1.17
log
@Mark old LLVM instance as dead.
@
text
@@


1.1.1.7.4.1
log
@file ReleaseNotes.rst was added on branch tls-maxphys on 2014-08-19 23:47:20 +0000
@
text
@d1 229
@


1.1.1.7.4.2
log
@Rebase to HEAD as of a few days ago.
@
text
@a0 229
=====================================
Clang 3.5 (In-Progress) Release Notes
=====================================

.. contents::
   :local:
   :depth: 2

Written by the `LLVM Team <http://llvm.org/>`_

.. warning::

   These are in-progress notes for the upcoming Clang 3.5 release. You may
   prefer the `Clang 3.4 Release Notes
   <http://llvm.org/releases/3.4/tools/clang/docs/ReleaseNotes.html>`_.

Introduction
============

This document contains the release notes for the Clang C/C++/Objective-C
frontend, part of the LLVM Compiler Infrastructure, release 3.5. Here we
describe the status of Clang in some detail, including major
improvements from the previous release and new feature work. For the
general LLVM release notes, see `the LLVM
documentation <http://llvm.org/docs/ReleaseNotes.html>`_. All LLVM
releases may be downloaded from the `LLVM releases web
site <http://llvm.org/releases/>`_.

For more information about Clang or LLVM, including information about
the latest release, please check out the main please see the `Clang Web
Site <http://clang.llvm.org>`_ or the `LLVM Web
Site <http://llvm.org>`_.

Note that if you are reading this file from a Subversion checkout or the
main Clang web page, this document applies to the *next* release, not
the current one. To see the release notes for a specific release, please
see the `releases page <http://llvm.org/releases/>`_.

What's New in Clang 3.5?
========================

Some of the major new features and improvements to Clang are listed
here. Generic improvements to Clang as a whole or to its underlying
infrastructure are described first, followed by language-specific
sections with improvements to Clang's support for those languages.

Major New Features
------------------

- Clang uses the new MingW ABI
  GCC 4.7 changed the mingw ABI. Clang 3.4 and older use the GCC 4.6
  ABI. Clang 3.5 and newer use the GCC 4.7 abi.

- The __has_attribute feature test is now target-aware. Older versions of Clang
  would return true when the attribute spelling was known, regardless of whether
  the attribute was available to the specific target. Clang now returns true
  only when the attribute pertains to the current compilation target.


Improvements to Clang's diagnostics
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Clang's diagnostics are constantly being improved to catch more issues,
explain them more clearly, and provide more accurate source information
about them. The improvements since the 3.4 release include:

- GCC compatibility: Clang displays a warning on unsupported gcc
  optimization flags instead of an error.

-  ...

New Compiler Flags
------------------

The integrated assembler is now turned on by default on ARM (and Thumb),
so the use of the option `-fintegrated-as` is now redundant on those
architectures. This is an important move to both *eat our own dog food*
and to ease cross-compilation tremendously.

We are aware of the problems that this may cause for code bases that
rely on specific GNU syntax or extensions, and we're working towards
getting them all fixed. Please, report bugs or feature requests if
you find anything. In the meantime, use `-fno-integrated-as` to revert
back the call to GNU assembler.

In order to provide better diagnostics, the integrated assembler validates
inline assembly when the integrated assembler is enabled.  Because this is
considered a feature of the compiler, it is controlled via the `fintegrated-as`
and `fno-integrated-as` flags which enable and disable the integrated assembler
respectively.  `-integrated-as` and `-no-integrated-as` are now considered
legacy flags (but are available as an alias to prevent breaking existing users),
and users are encouraged to switch to the equivalent new feature flag.

Deprecated flags `-faddress-sanitizer`, `-fthread-sanitizer`,
`-fcatch-undefined-behavior` and `-fbounds-checking` were removed in favor of
`-fsanitize=` family of flags.

It is now possible to get optimization reports from the major transformation
passes via three new flags: `-Rpass`, `-Rpass-missed` and `-Rpass-analysis`.
These flags take a POSIX regular expression which indicates the name
of the pass (or passes) that should emit optimization remarks.

The option `-u` is forwarded to the linker on gnutools toolchains.

New Pragmas in Clang
-----------------------

Loop optimization hints can be specified using the new `#pragma clang loop`
directive just prior to the desired loop. The directive allows vectorization,
interleaving, and unrolling to be enabled or disabled. Vector width as well
as interleave and unrolling count can be manually specified.  See language
extensions for details.

Clang now supports the `#pragma unroll` and `#pragma nounroll` directives to
specify loop unrolling optimization hints.  Placed just prior to the desired
loop, `#pragma unroll` directs the loop unroller to attempt to fully unroll the
loop.  The pragma may also be specified with a positive integer parameter
indicating the desired unroll count: `#pragma unroll _value_`.  The unroll count
parameter can be optionally enclosed in parentheses. The directive `#pragma
nounroll` indicates that the loop should not be unrolled.

Windows Support
---------------

Clang's support for building native Windows programs, compatible with Visual
C++, has improved significantly since the previous release. This includes
correctly passing non-trivial objects by value, record layout, basic debug info,
`Address Sanitizer <AddressSanitizer.html>`_ support, RTTI, name mangling,
DLL attributes, and many many bug fixes. See
`MSVC Compatibility <MSVCCompatibility.html>`_ for details.

While still considered experimental, Clang's Windows support is good enough
that Clang can self-host on Windows, and projects such as Chromium and Firefox
have been built successfully using the
`/fallback <UsersManual.html#the-fallback-option>`_ option.


C Language Changes in Clang
---------------------------

...

C11 Feature Support
^^^^^^^^^^^^^^^^^^^

...

C++ Language Changes in Clang
-----------------------------

- ...

C++11 Feature Support
^^^^^^^^^^^^^^^^^^^^^

...

Objective-C Language Changes in Clang
-------------------------------------

...

OpenCL C Language Changes in Clang
----------------------------------

...

Internal API Changes
--------------------

These are major API changes that have happened since the 3.4 release of
Clang. If upgrading an external codebase that uses Clang as a library,
this section should help get you past the largest hurdles of upgrading.

...

libclang
--------

...

Static Analyzer
---------------

The `-analyzer-config` options are now passed from scan-build through to
ccc-analyzer and then to Clang.

With the option `-analyzer-config stable-report-filename=true`,
instead of `report-XXXXXX.html`, scan-build/clang analyzer generate
`report-<filename>-<function, method name>-<function position>-<id>.html`.
(id = i++ for several issues found in the same function/method).

List the function/method name in the index page of scan-build.

...

Core Analysis Improvements
==========================

- ...

New Issues Found
================

- ...

Python Binding Changes
----------------------

The following methods have been added:

-  ...

Significant Known Problems
==========================

Additional Information
======================

A wide variety of additional information is available on the `Clang web
page <http://clang.llvm.org/>`_. The web page contains versions of the
API documentation which are up-to-date with the Subversion version of
the source code. You can access versions of these documents specific to
this release by going into the "``clang/docs/``" directory in the Clang
tree.

If you have any questions or comments about Clang, please feel free to
contact us via the `mailing
list <http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev>`_.
@


1.1.1.5.4.1
log
@file ReleaseNotes.rst was added on branch yamt-pagecache on 2014-05-22 16:18:19 +0000
@
text
@d1 172
@


1.1.1.5.4.2
log
@sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")
@
text
@a0 172
=====================================
Clang 3.5 (In-Progress) Release Notes
=====================================

.. contents::
   :local:
   :depth: 2

Written by the `LLVM Team <http://llvm.org/>`_

.. warning::

   These are in-progress notes for the upcoming Clang 3.5 release. You may
   prefer the `Clang 3.4 Release Notes
   <http://llvm.org/releases/3.4/tools/clang/docs/ReleaseNotes.html>`_.

Introduction
============

This document contains the release notes for the Clang C/C++/Objective-C
frontend, part of the LLVM Compiler Infrastructure, release 3.5. Here we
describe the status of Clang in some detail, including major
improvements from the previous release and new feature work. For the
general LLVM release notes, see `the LLVM
documentation <http://llvm.org/docs/ReleaseNotes.html>`_. All LLVM
releases may be downloaded from the `LLVM releases web
site <http://llvm.org/releases/>`_.

For more information about Clang or LLVM, including information about
the latest release, please check out the main please see the `Clang Web
Site <http://clang.llvm.org>`_ or the `LLVM Web
Site <http://llvm.org>`_.

Note that if you are reading this file from a Subversion checkout or the
main Clang web page, this document applies to the *next* release, not
the current one. To see the release notes for a specific release, please
see the `releases page <http://llvm.org/releases/>`_.

What's New in Clang 3.5?
========================

Some of the major new features and improvements to Clang are listed
here. Generic improvements to Clang as a whole or to its underlying
infrastructure are described first, followed by language-specific
sections with improvements to Clang's support for those languages.

Major New Features
------------------

- Clang uses the new MingW ABI
  GCC 4.7 changed the mingw ABI. Clang 3.4 and older use the GCC 4.6
  ABI. Clang 3.5 and newer use the GCC 4.7 abi.

- The __has_attribute feature test is now target-aware. Older versions of Clang 
  would return true when the attribute spelling was known, regardless of whether 
  the attribute was available to the specific target. Clang now returns true only 
  when the attribute pertains to the current compilation target.


Improvements to Clang's diagnostics
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Clang's diagnostics are constantly being improved to catch more issues,
explain them more clearly, and provide more accurate source information
about them. The improvements since the 3.4 release include:

-  ...

New Compiler Flags
------------------

The integrated assembler is now turned on by default on ARM (and Thumb),
so the use of the option `-fintegrated-as` is now redundant on those
architectures. This is an important move to both *eat our own dog food*
and to ease cross-compilation tremendously.

We are aware of the problems that this may cause for code bases that
rely on specific GNU syntax or extensions, and we're working towards
getting them all fixed. Please, report bugs or feature requests if
you find anything. In the meantime, use `-fno-integrated-as` to revert
back the call to GNU assembler.

In order to provide better diagnostics, the integrated assembler validates
inline assembly when the integrated assembler is enabled.  Because this is
considered a feature of the compiler, it is controlled via the `fintegrated-as`
and `fno-integrated-as` flags which enable and disable the integrated assembler
respectively.  `-integrated-as` and `-no-integrated-as` are now considered
legacy flags (but are available as an alias to prevent breaking existing users),
and users are encouraged to switch to the equivalent new feature flag.

C Language Changes in Clang
---------------------------

...

C11 Feature Support
^^^^^^^^^^^^^^^^^^^

...

C++ Language Changes in Clang
-----------------------------

- ...

C++11 Feature Support
^^^^^^^^^^^^^^^^^^^^^

...

Objective-C Language Changes in Clang
-------------------------------------

...

OpenCL C Language Changes in Clang
----------------------------------

...

Internal API Changes
--------------------

These are major API changes that have happened since the 3.4 release of
Clang. If upgrading an external codebase that uses Clang as a library,
this section should help get you past the largest hurdles of upgrading.

...

libclang
--------

...

Static Analyzer
---------------

...

Core Analysis Improvements
==========================

- ...

New Issues Found
================

- ...

Python Binding Changes
----------------------

The following methods have been added:

-  ...

Significant Known Problems
==========================

Additional Information
======================

A wide variety of additional information is available on the `Clang web
page <http://clang.llvm.org/>`_. The web page contains versions of the
API documentation which are up-to-date with the Subversion version of
the source code. You can access versions of these documents specific to
this release by going into the "``clang/docs/``" directory in the Clang
tree.

If you have any questions or comments about Clang, please feel free to
contact us via the `mailing
list <http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev>`_.
@


