diff -Nru clang-2.8/debian/changelog clang-2.9/debian/changelog --- clang-2.8/debian/changelog 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/changelog 2011-08-12 12:46:46.000000000 +0000 @@ -1,8 +1,121 @@ -clang (2.8-0ubuntu2) natty; urgency=low +clang (2.9-7ubuntu0) natty; urgency=low - * Set DEB_GCC_NO_O3=1 for the ppc64 build. + * Natty Backport - -- Matthias Klose Fri, 18 Feb 2011 18:46:32 +0200 + -- Jamie Jones Fri, 12 Aug 2011 21:46:28 +0900 + +clang (2.9-7) unstable; urgency=low + + * debian/patches/15-64_triple.patch, debian/patches/14-multiarchi386.diff, + debian/patches/13-multiarch-newpath.patch removed + * debian/patches/13-search-path-dpkg-based.patch: Better detection of the + gcc lib path. + It is now using dpkg-architecture to get the information and putting + the information in a define of the code. Thanks to Julien Blache for the + idea. + + -- Sylvestre Ledru Thu, 23 Jun 2011 21:46:59 +0200 + +clang (2.9-6) unstable; urgency=low + + * debian/patches/14-multiarchi386.diff: Specific case for x86 multi arch + (Closes: #629861) + * debian/patches/15-64_triple.patch: Fix the 64 bits detection of the gcc + libs + + -- Sylvestre Ledru Sat, 18 Jun 2011 19:15:39 +0200 + +clang (2.9-5) unstable; urgency=low + + * debian/control.in/clang, debian/control: Revert the change to + libstdc++6-4.6-dev because of bug #9472. Should be fixed in clang 2.10/3.0 + * control.in/source: Pierre removed from the uploaders + * control.in/*llvm*, packages.d/llvm.mk, debhelper.in/*llvm*, llvm.binfmt: + remove some llvm related and useless files in the context of clang + + -- Sylvestre Ledru Sun, 12 Jun 2011 23:39:03 +0200 + +clang (2.9-4) unstable; urgency=low + + * debian/patches/12-gcc-4.6.patch: Support of gcc 4.6 (Closes: #627131) + * debian/control.in/clang, debian/control: Dependency switch from + libstdc++6-4.5-dev to libstdc++6-4.6-dev + * debian/patches/13-multiarch-newpath.patch: Multiarch support + (Closes: #629861) + + -- Sylvestre Ledru Sun, 12 Jun 2011 11:14:49 +0200 + +clang (2.9-3) unstable; urgency=low + + * llvm-snapshot.install, llvm-gcc-4.2.links & llvm-gcc-4.2.install removed + (deprecated) + * debian/rules.d/vars.mk: useless rule removed + + [ Michael Wild ] + * debian/patches/11-searchMultiArchLibDir.patch: Adds the multi-arch library + directory to the file search path (Closes: #629594) + + -- Sylvestre Ledru Thu, 09 Jun 2011 22:48:32 +0200 + +clang (2.9-2) unstable; urgency=low + + [ Michael Wild ] + * debian/patches/searchGCCPath.patch: Remove because it is Ubuntu-specific + * debian/patches/10-handleWheezySid.patch: Make Debian wheezy/sid known to + Clang + * debian/rules: Pass include-paths at configure-time such that the broken + automatic searching is disabled (see + http://llvm.org/bugs/show_bug.cgi?id=6907). Only specify 32/64-bit + include-dir suffix on 32/64-bit architectures. + (Closes: #594820) (LP: #764870) + + -- Sylvestre Ledru Tue, 31 May 2011 10:49:52 +0200 + +clang (2.9-1) unstable; urgency=low + + * debian/packages.d/tools.mk: clang C++ headers detection was broken. Set them + by default. Thanks to Michael Wild for doing my work + * debian/control: libstdc++6-4.5-dev added as dependency of clang + (LP: #779404) + * debian/patches/searchGCCPath.patch: Added a path to the search of the C++ + header (Closes: #594820) (LP: #764870) + * debian/control.in/llvm-gcc-4.2, debian/control.in/llvm-snapshot, + debian/packages.d/llvm-gcc-4.2.mk, debian/packages.d/llvm-snapshot.mk: + removed + * Upload in unstable + + -- Sylvestre Ledru Sun, 22 May 2011 11:18:43 +0200 + +clang (2.9-1~exp1) experimental; urgency=low + + * New upstream release + + -- Sylvestre Ledru Tue, 12 Apr 2011 21:21:24 +0200 + +clang (2.8-2) unstable; urgency=low + + * debian/changelog: Upload to unstable + * debian/control.in/source: + - Update of the tags Vcs-Svn & Vcs-Browser + - Standards-Version updated to 3.9.2 + * debian/man/*.1: Man pages for scan-build and scan-view included. Thanks to + Gildo Fiorito (Closes: #606909) + * debian/watch: watch file added + + -- Sylvestre Ledru Wed, 16 Feb 2011 08:18:58 +0100 + +clang (2.8-1) experimental; urgency=low + + * Sync from Ubuntu + * New upstream release (Closes: #599531) + * Warning if NULL is assigned to int (Closes: #585168) + * clang -ftrapv: UNREACHABLE on 64-bit off_t addition (Closes: #608539) + * Incorrect implementation of __builtin_expect() (Closes: #588711) + * Add myself to the uploaders. + * Add clang as cc and c++ alternatives groups (Closes: #592011) + * Switch to dpkg-source 3.0 (quilt) format + + -- Sylvestre Ledru Mon, 14 Feb 2011 00:25:18 +0100 clang (2.8-0ubuntu1) maverick; urgency=low diff -Nru clang-2.8/debian/control clang-2.9/debian/control --- clang-2.8/debian/control 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/control 2011-08-12 12:46:51.000000000 +0000 @@ -2,20 +2,22 @@ Section: devel Priority: optional Maintainer: LLVM Packaging Team -Uploaders: Arthur Loiret , Pierre Habouzit +Uploaders: Arthur Loiret , + Sylvestre Ledru Build-Depends: debhelper (>= 6.0.0), flex, bison, dejagnu, tcl8.5, expect, autoconf, automake1.9, perl, libtool, doxygen, chrpath, texinfo, sharutils, autotools-dev (>= 20060702.1), libffi-dev (>= 3.0.9), - lsb-release, patchutils, diffstat, xz-utils, llvm-2.8-dev (>= 2.8), llvm-2.8-source (>= 2.8) + lsb-release, patchutils, diffstat, xz-utils, llvm-2.9-dev (>= 2.9), llvm-2.9-source (>= 2.9) Build-Conflicts: oprofile, ocaml, ocaml-nox -Standards-Version: 3.9.1 +Standards-Version: 3.9.2 Homepage: http://www.llvm.org/ -Vcs-Bzr: https://bazaar.launchpad.net/~pkg-llvm/+junk/llvm-2.8-ubuntu +Vcs-Svn: svn://svn.debian.org/svn/pkg-llvm/clang/trunk/ +Vcs-Browser: http://svn.debian.org/viewsvn/pkg-llvm/clang/trunk/ Package: clang Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Recommends: llvm-2.8-dev, python +Depends: ${shlibs:Depends}, ${misc:Depends}, libstdc++6-4.5-dev +Recommends: llvm-2.9-dev, python Description: Low-Level Virtual Machine (LLVM), C language family frontend The Low-Level Virtual Machine (LLVM) is a collection of libraries and tools that make it easy to build compilers, optimizers, Just-In-Time diff -Nru clang-2.8/debian/control.in/clang clang-2.9/debian/control.in/clang --- clang-2.8/debian/control.in/clang 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/control.in/clang 2011-06-17 11:25:24.000000000 +0000 @@ -1,6 +1,6 @@ Package: clang Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: ${shlibs:Depends}, ${misc:Depends}, libstdc++6-4.5-dev Recommends: llvm-@UVERSION@-dev, python Description: Low-Level Virtual Machine (LLVM), C language family frontend The Low-Level Virtual Machine (LLVM) is a collection of libraries and diff -Nru clang-2.8/debian/control.in/libllvm2.8 clang-2.9/debian/control.in/libllvm2.8 --- clang-2.8/debian/control.in/libllvm2.8 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/control.in/libllvm2.8 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -Package: libllvm@PKG_VERSION@ -Architecture: any -Section: libs -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: Low-Level Virtual Machine (LLVM), runtime library - The Low-Level Virtual Machine (LLVM) is a collection of libraries and - tools that make it easy to build compilers, optimizers, Just-In-Time - code generators, and many other compiler-related programs. - . - This package contains the LLVM runtime library. - diff -Nru clang-2.8/debian/control.in/libllvm-ocaml-dev clang-2.9/debian/control.in/libllvm-ocaml-dev --- clang-2.8/debian/control.in/libllvm-ocaml-dev 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/control.in/libllvm-ocaml-dev 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -Package: libllvm-ocaml-@UVERSION@-dev -Section: ocaml -Architecture: any -Suggests: llvm-@UVERSION@-doc -Depends: ${shlibs:Depends}, ${misc:Depends}, ${ocaml:Depends}, llvm-@UVERSION@-dev (= ${binary:Version}) -Provides: ${ocaml:Provides} -Description: Low-Level Virtual Machine (LLVM), bindings for OCaml - The Low-Level Virtual Machine (LLVM) is a collection of libraries and - tools that make it easy to build compilers, optimizers, Just-In-Time - code generators, and many other compiler-related programs. LLVM - uses a single, language-independent virtual instruction set both - as an offline code representation (to communicate code between - compiler phases and to run-time systems) and as the compiler internal - representation (to analyze and transform programs). This persistent - code representation allows a common set of sophisticated compiler - techniques to be applied at compile-time, link-time, install-time, - run-time, or "idle-time" (between program runs). - . - This package provides the OCaml bindings to develop applications using llvm. - diff -Nru clang-2.8/debian/control.in/llvm clang-2.9/debian/control.in/llvm --- clang-2.8/debian/control.in/llvm 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/control.in/llvm 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -Package: llvm-@UVERSION@ -Architecture: any -Suggests: llvm-@UVERSION@-doc -Depends: llvm-@UVERSION@-runtime (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} -Recommends: llvm-@UVERSION@-dev -Conflicts: llvm (<< 2.7-1) -Replaces: llvm (<< 2.7-1) -Description: Low-Level Virtual Machine (LLVM) - The Low-Level Virtual Machine (LLVM) is a collection of libraries and - tools that make it easy to build compilers, optimizers, Just-In-Time - code generators, and many other compiler-related programs. LLVM - uses a single, language-independent virtual instruction set both - as an offline code representation (to communicate code between - compiler phases and to run-time systems) and as the compiler internal - representation (to analyze and transform programs). This persistent - code representation allows a common set of sophisticated compiler - techniques to be applied at compile-time, link-time, install-time, - run-time, or "idle-time" (between program runs). - . - The strengths of the LLVM infrastructure are its extremely - simple design (which makes it easy to understand and use), - source-language independence, powerful mid-level optimizer, automated - compiler debugging support, extensibility, and its stability and - reliability. LLVM is currently being used to host a wide variety of - academic research projects and commercial projects. LLVM includes C - and C++ front-ends (based on GCC 4.0.1), a front-end for a Forth-like - language (Stacker), a young scheme front-end, and Java support is - in development. LLVM can generate code for X86, SparcV9, PowerPC, - or it can emit C code. - diff -Nru clang-2.8/debian/control.in/llvm-dev clang-2.9/debian/control.in/llvm-dev --- clang-2.8/debian/control.in/llvm-dev 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/control.in/llvm-dev 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -Package: llvm-@UVERSION@-dev -Architecture: any -Depends: ${shlibs:Depends}, libffi-dev (>= 3.0.9), ${misc:Depends}, llvm-@UVERSION@ (= ${binary:Version}) -Replaces: llvm (<< 2.2-3) -Description: Low-Level Virtual Machine (LLVM), libraries and headers - The Low-Level Virtual Machine (LLVM) is a collection of libraries and - tools that make it easy to build compilers, optimizers, Just-In-Time - code generators, and many other compiler-related programs. LLVM - uses a single, language-independent virtual instruction set both - as an offline code representation (to communicate code between - compiler phases and to run-time systems) and as the compiler internal - representation (to analyze and transform programs). This persistent - code representation allows a common set of sophisticated compiler - techniques to be applied at compile-time, link-time, install-time, - run-time, or "idle-time" (between program runs). - . - This package provides the libraries and headers to develop applications - using llvm. - diff -Nru clang-2.8/debian/control.in/llvm-doc clang-2.9/debian/control.in/llvm-doc --- clang-2.8/debian/control.in/llvm-doc 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/control.in/llvm-doc 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -Package: llvm-@UVERSION@-doc -Section: doc -Architecture: all -Depends: ${misc:Depends} -Description: Low-Level Virtual Machine (LLVM), documentation - The Low-Level Virtual Machine (LLVM) is a collection of libraries and - tools that make it easy to build compilers, optimizers, Just-In-Time - code generators, and many other compiler-related programs. LLVM - uses a single, language-independent virtual instruction set both - as an offline code representation (to communicate code between - compiler phases and to run-time systems) and as the compiler internal - representation (to analyze and transform programs). This persistent - code representation allows a common set of sophisticated compiler - techniques to be applied at compile-time, link-time, install-time, - run-time, or "idle-time" (between program runs). - . - This package contains all documentation (extensive). - diff -Nru clang-2.8/debian/control.in/llvm-examples clang-2.9/debian/control.in/llvm-examples --- clang-2.8/debian/control.in/llvm-examples 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/control.in/llvm-examples 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -Package: llvm-@UVERSION@-examples -Section: doc -Architecture: all -Depends: ${misc:Depends}, llvm-@UVERSION@-dev (>= ${source:Version}), llvm-@UVERSION@-dev (<< ${source:Version}+c~) -Description: Low-Level Virtual Machine (LLVM), examples - The Low-Level Virtual Machine (LLVM) is a collection of libraries and - tools that make it easy to build compilers, optimizers, Just-In-Time - code generators, and many other compiler-related programs. LLVM - uses a single, language-independent virtual instruction set both - as an offline code representation (to communicate code between - compiler phases and to run-time systems) and as the compiler internal - representation (to analyze and transform programs). This persistent - code representation allows a common set of sophisticated compiler - techniques to be applied at compile-time, link-time, install-time, - run-time, or "idle-time" (between program runs). - . - This package contains examples for using LLVM, both in developing - extensions to LLVM and in using it to compile code. - diff -Nru clang-2.8/debian/control.in/llvm-gcc-4.2 clang-2.9/debian/control.in/llvm-gcc-4.2 --- clang-2.8/debian/control.in/llvm-gcc-4.2 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/control.in/llvm-gcc-4.2 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -Package: llvm-gcc-@GCC_VERSION@ -Architecture: i386 amd64 -Depends: llvm-@UVERSION@-dev (>= @UVERSION@), llvm-@UVERSION@ (>= @UVERSION@), ${shlibs:Depends}, ${misc:Depends} -Provides: llvm-gcc -Suggests: gcc-@GCC_VERSION@-doc -Description: Low-Level Virtual Machine (LLVM), C/C++ front-end - The Low-Level Virtual Machine (LLVM) is a collection of libraries and - tools that make it easy to build compilers, optimizers, Just-In-Time - code generators, and many other compiler-related programs. LLVM - uses a single, language-independent virtual instruction set both - as an offline code representation (to communicate code between - compiler phases and to run-time systems) and as the compiler internal - representation (to analyze and transform programs). This persistent - code representation allows a common set of sophisticated compiler - techniques to be applied at compile-time, link-time, install-time, - run-time, or "idle-time" (between program runs). - . - This is only a utility package that contains the C/C++ front-end - used by the compiler, and was created in order to reduce the overall - size of the compiler package itself. Please install the 'llvm' - package to install the actual compiler. - diff -Nru clang-2.8/debian/control.in/llvm-priv-dev clang-2.9/debian/control.in/llvm-priv-dev --- clang-2.8/debian/control.in/llvm-priv-dev 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/control.in/llvm-priv-dev 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -Package: llvm-@UVERSION@-priv-dev -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: Low-Level Virtual Machine (LLVM), ccache files - This package contains the ccache files from latest upload. It allows the - tools to build much faster, and prevents llvm from being uselessly built - twice. - . - Do not install unless you intend to build LLVM from sources! - diff -Nru clang-2.8/debian/control.in/llvm-runtime clang-2.9/debian/control.in/llvm-runtime --- clang-2.8/debian/control.in/llvm-runtime 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/control.in/llvm-runtime 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -Package: llvm-@UVERSION@-runtime -Architecture: any -Depends: binfmt-support, ${shlibs:Depends}, ${misc:Depends} -Conflicts: llvm (<< 2.7-1) -Replaces: llvm (<< 2.7-1) -Description: Low-Level Virtual Machine (LLVM), bytecode interpreter - The Low-Level Virtual Machine (LLVM) is a collection of libraries and - tools that make it easy to build compilers, optimizers, Just-In-Time - code generators, and many other compiler-related programs. LLVM - uses a single, language-independent virtual instruction set both - as an offline code representation (to communicate code between - compiler phases and to run-time systems) and as the compiler internal - representation (to analyze and transform programs). This persistent - code representation allows a common set of sophisticated compiler - techniques to be applied at compile-time, link-time, install-time, - run-time, or "idle-time" (between program runs). - . - This package provides the minimal required to execute programs in LLVM - format. - diff -Nru clang-2.8/debian/control.in/llvm-snapshot clang-2.9/debian/control.in/llvm-snapshot --- clang-2.8/debian/control.in/llvm-snapshot 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/control.in/llvm-snapshot 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -Package: llvm-snapshot -Priority: extra -Architecture: any -Suggests: llvm-doc -Depends: binfmt-support, ${shlibs:Depends}, ${misc:Depends} -Description: a SNAPSHOT of the Low-Level Virtual Machine (LLVM) - The Low-Level Virtual Machine (LLVM) is a collection of libraries and - tools that make it easy to build compilers, optimizers, Just-In-Time - code generators, and many other compiler-related programs. LLVM - uses a single, language-independent virtual instruction set both - as an offline code representation (to communicate code between - compiler phases and to run-time systems) and as the compiler internal - representation (to analyze and transform programs). This persistent - code representation allows a common set of sophisticated compiler - techniques to be applied at compile-time, link-time, install-time, - run-time, or "idle-time" (between program runs). - . - This package is a SNAPSHOT taken from the upstream SVN. - diff -Nru clang-2.8/debian/control.in/llvm-source clang-2.9/debian/control.in/llvm-source --- clang-2.8/debian/control.in/llvm-source 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/control.in/llvm-source 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -Package: llvm-@UVERSION@-source -Architecture: all -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: Low-Level Virtual Machine (LLVM), source code - The Low-Level Virtual Machine (LLVM) is a collection of libraries and - tools that make it easy to build compilers, optimizers, Just-In-Time - code generators, and many other compiler-related programs. LLVM - uses a single, language-independent virtual instruction set both - as an offline code representation (to communicate code between - compiler phases and to run-time systems) and as the compiler internal - representation (to analyze and transform programs). This persistent - code representation allows a common set of sophisticated compiler - techniques to be applied at compile-time, link-time, install-time, - run-time, or "idle-time" (between program runs). - . - This package contains the llvm source code. - diff -Nru clang-2.8/debian/control.in/source clang-2.9/debian/control.in/source --- clang-2.8/debian/control.in/source 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/control.in/source 2011-06-17 11:25:24.000000000 +0000 @@ -2,13 +2,15 @@ Section: devel Priority: optional Maintainer: LLVM Packaging Team -Uploaders: Arthur Loiret , Pierre Habouzit +Uploaders: Arthur Loiret , + Sylvestre Ledru Build-Depends: debhelper (>= 6.0.0), flex, bison, dejagnu, tcl8.5, expect, autoconf, automake1.9, perl, libtool, doxygen, chrpath, texinfo, sharutils, autotools-dev (>= 20060702.1), libffi-dev (>= 3.0.9), lsb-release, patchutils, diffstat, xz-utils @BUILDDEPS@ Build-Conflicts: oprofile @BUILDCONFLICTS@ -Standards-Version: 3.9.1 +Standards-Version: 3.9.2 Homepage: http://www.llvm.org/ -Vcs-Bzr: https://bazaar.launchpad.net/~pkg-llvm/+junk/llvm-2.8-ubuntu +Vcs-Svn: svn://svn.debian.org/svn/pkg-llvm/clang/trunk/ +Vcs-Browser: http://svn.debian.org/viewsvn/pkg-llvm/clang/trunk/ diff -Nru clang-2.8/debian/debhelper.in/clang.manpages clang-2.9/debian/debhelper.in/clang.manpages --- clang-2.8/debian/debhelper.in/clang.manpages 1970-01-01 00:00:00.000000000 +0000 +++ clang-2.9/debian/debhelper.in/clang.manpages 2011-06-17 11:25:24.000000000 +0000 @@ -0,0 +1 @@ +debian/man/scan*.1 diff -Nru clang-2.8/debian/debhelper.in/clang.postinst clang-2.9/debian/debhelper.in/clang.postinst --- clang-2.8/debian/debhelper.in/clang.postinst 1970-01-01 00:00:00.000000000 +0000 +++ clang-2.9/debian/debhelper.in/clang.postinst 2011-06-17 11:25:24.000000000 +0000 @@ -0,0 +1,19 @@ +#! /bin/sh -e + +prio=10 + +update-alternatives --quiet \ + --install /usr/bin/c++ \ + c++ \ + /usr/bin/clang++ \ + $prio + +update-alternatives --quiet \ + --install /usr/bin/cc \ + cc \ + /usr/bin/clang \ + $prio + +#DEBHELPER# + +exit 0 diff -Nru clang-2.8/debian/debhelper.in/clang.prerm clang-2.9/debian/debhelper.in/clang.prerm --- clang-2.8/debian/debhelper.in/clang.prerm 1970-01-01 00:00:00.000000000 +0000 +++ clang-2.9/debian/debhelper.in/clang.prerm 2011-06-17 11:25:24.000000000 +0000 @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then + update-alternatives --quiet --remove cc /usr/bin/clang + update-alternatives --quiet --remove c++ /usr/bin/clang++ +fi + +#DEBHELPER# + +exit 0 diff -Nru clang-2.8/debian/debhelper.in/libllvm2.8.install clang-2.9/debian/debhelper.in/libllvm2.8.install --- clang-2.8/debian/debhelper.in/libllvm2.8.install 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/debhelper.in/libllvm2.8.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -debian/@TMP@/usr/lib/libLLVM-2.8rc.so.1 usr/lib diff -Nru clang-2.8/debian/debhelper.in/libllvm-ocaml-dev.dirs clang-2.9/debian/debhelper.in/libllvm-ocaml-dev.dirs --- clang-2.8/debian/debhelper.in/libllvm-ocaml-dev.dirs 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/debhelper.in/libllvm-ocaml-dev.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -@OCAML_STDLIB_DIR@/METAS diff -Nru clang-2.8/debian/debhelper.in/libllvm-ocaml-dev.doc-base clang-2.9/debian/debhelper.in/libllvm-ocaml-dev.doc-base --- clang-2.8/debian/debhelper.in/libllvm-ocaml-dev.doc-base 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/debhelper.in/libllvm-ocaml-dev.doc-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -Document: libllvm-ocaml-@UVERSION@-dev-ocamldoc-api-reference -Title: Llvm OCamldoc API Reference -Abstract: API reference manual for libllvm-ocaml-dev (generated via OCamldoc) -Section: Programming/OCaml - -Format: HTML -Index: /usr/share/doc/libllvm-ocaml-@UVERSION@-dev/html/index.html -Files: /usr/share/doc/libllvm-ocaml-@UVERSION@-dev/html/* diff -Nru clang-2.8/debian/debhelper.in/libllvm-ocaml-dev.install clang-2.9/debian/debhelper.in/libllvm-ocaml-dev.install --- clang-2.8/debian/debhelper.in/libllvm-ocaml-dev.install 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/debhelper.in/libllvm-ocaml-dev.install 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -debian/@TMP@/@OCAML_STDLIB_DIR@/llvm-@UVERSION@ @OCAML_STDLIB_DIR@/ -debian/@TMP@/@PF@/docs/llvm/ocamldoc/html usr/share/doc/libllvm-ocaml-@UVERSION@-dev/ diff -Nru clang-2.8/debian/debhelper.in/libllvm-ocaml-dev.META clang-2.9/debian/debhelper.in/libllvm-ocaml-dev.META --- clang-2.8/debian/debhelper.in/libllvm-ocaml-dev.META 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/debhelper.in/libllvm-ocaml-dev.META 1970-01-01 00:00:00.000000000 +0000 @@ -1,63 +0,0 @@ -description = "Low Level Virtual Machine bindings" -version = "@UVERSION@" - -directory = "+llvm" - -archive(byte) = "llvm.cma" -archive(native) = "llvm.cmxa" -linkopts = "-cclib -lstdc++ -cclib -lllvm" - -package "executionengine" -( - requires = "llvm" - version = "@UVERSION@" - archive(native) = "llvm_executionengine.cmxa" - archive(byte) = "llvm_executionengine.cma" - linkopts = "-cclib -lllvm_executionengine" -) - -package "target" -( - requires = "llvm" - version = "@UVERSION@" - archive(native) = "llvm_target.cmxa" - archive(byte) = "llvm_target.cma" - linkopts = "-cclib -lllvm_target" -) - -package "scalar_opts" -( - requires = "llvm llvm.target" - version = "@UVERSION@" - archive(native) = "llvm_scalar_opts.cmxa" - archive(byte) = "llvm_scalar_opts.cma" - linkopts = "-cclib -lllvm_scalar_opts" -) - -package "analysis" -( - requires = "llvm" - version = "@UVERSION@" - archive(native) = "llvm_analysis.cmxa" - archive(byte) = "llvm_analysis.cma" - linkopts = "-cclib -lllvm_analysis" -) - -package "bitwriter" -( - requires = "llvm" - version = "@UVERSION@" - archive(native) = "llvm_bitwriter.cmxa" - archive(byte) = "llvm_bitwriter.cma" - linkopts = "-cclib -lllvm_bitwriter" -) - -package "bitreader" -( - requires = "llvm llvm.bitwriter" - version = "@UVERSION@" - archive(native) = "llvm_bitreader.cmxa" - archive(byte) = "llvm_bitreader.cma" - linkopts = "-cclib -lllvm_bitreader" -) - diff -Nru clang-2.8/debian/debhelper.in/llvm-dev.dirs clang-2.9/debian/debhelper.in/llvm-dev.dirs --- clang-2.8/debian/debhelper.in/llvm-dev.dirs 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/debhelper.in/llvm-dev.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -@PF@/lib -@PF@/build -@PF@/include -usr/share/doc/llvm-@UVERSION@-dev -usr/share/emacs/site-lisp/llvm-@UVERSION@ diff -Nru clang-2.8/debian/debhelper.in/llvm-dev.install clang-2.9/debian/debhelper.in/llvm-dev.install --- clang-2.8/debian/debhelper.in/llvm-dev.install 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/debhelper.in/llvm-dev.install 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -debian/@TMP@/@PF@/lib/* @PF@/lib/ -debian/@TMP@/@PF@/include/* usr/include/ - -@BUILD@/Makefile.common @PF@/build/ -@BUILD@/Makefile.config @PF@/build/ -@BUILD@/config.status @PF@/build/ -Makefile.rules @PF@/build/ -configure @PF@/build/ -autoconf/ @PF@/build/ - -utils/vim/llvm.vim usr/share/vim/addons/plugin/ -utils/vim/tablegen.vim usr/share/vim/addons/plugin/ - -utils/emacs/emacs.el usr/share/emacs/site-lisp/llvm-2.8/ -utils/emacs/llvm-mode.el usr/share/emacs/site-lisp/llvm-2.8/ -utils/emacs/tablegen-mode.el usr/share/emacs/site-lisp/llvm-2.8/ - diff -Nru clang-2.8/debian/debhelper.in/llvm-dev.links clang-2.9/debian/debhelper.in/llvm-dev.links --- clang-2.8/debian/debhelper.in/llvm-dev.links 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/debhelper.in/llvm-dev.links 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -usr/lib/libLLVM-2.8rc.so.1 usr/lib/libLLVM-2.8rc.so -usr/lib/libLLVM-2.8rc.so.1 usr/lib/libLLVM-2.8.so diff -Nru clang-2.8/debian/debhelper.in/llvm.dirs clang-2.9/debian/debhelper.in/llvm.dirs --- clang-2.8/debian/debhelper.in/llvm.dirs 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/debhelper.in/llvm.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -@PF@/bin -usr/share/man/man1 -usr/share/doc/llvm-@UVERSION@ diff -Nru clang-2.8/debian/debhelper.in/llvm-doc.dirs clang-2.9/debian/debhelper.in/llvm-doc.dirs --- clang-2.8/debian/debhelper.in/llvm-doc.dirs 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/debhelper.in/llvm-doc.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/share/doc/llvm-@UVERSION@-doc diff -Nru clang-2.8/debian/debhelper.in/llvm-doc.install clang-2.9/debian/debhelper.in/llvm-doc.install --- clang-2.8/debian/debhelper.in/llvm-doc.install 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/debhelper.in/llvm-doc.install 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -debian/@TMP@/@PF@/docs/llvm/html usr/share/doc/llvm-@UVERSION@-doc/ -debian/@TMP@/@PF@/docs/llvm/ps usr/share/doc/llvm-@UVERSION@-doc/ diff -Nru clang-2.8/debian/debhelper.in/llvm-examples.dirs clang-2.9/debian/debhelper.in/llvm-examples.dirs --- clang-2.8/debian/debhelper.in/llvm-examples.dirs 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/debhelper.in/llvm-examples.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/share/doc/llvm-@UVERSION@-examples diff -Nru clang-2.8/debian/debhelper.in/llvm-examples.examples clang-2.9/debian/debhelper.in/llvm-examples.examples --- clang-2.8/debian/debhelper.in/llvm-examples.examples 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/debhelper.in/llvm-examples.examples 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -examples/* diff -Nru clang-2.8/debian/debhelper.in/llvm-examples.links clang-2.9/debian/debhelper.in/llvm-examples.links --- clang-2.8/debian/debhelper.in/llvm-examples.links 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/debhelper.in/llvm-examples.links 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -@PF@/build/Makefile.common usr/share/doc/llvm-@UVERSION@-examples/Makefile.common -@PF@/build/Makefile.config usr/share/doc/llvm-@UVERSION@-examples/Makefile.config -@PF@/build/Makefile.rules usr/share/doc/llvm-@UVERSION@-examples/Makefile.rules diff -Nru clang-2.8/debian/debhelper.in/llvm-gcc-4.2.install clang-2.9/debian/debhelper.in/llvm-gcc-4.2.install --- clang-2.8/debian/debhelper.in/llvm-gcc-4.2.install 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/debhelper.in/llvm-gcc-4.2.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -debian/@TMP@/@PF@/* @PF@/ diff -Nru clang-2.8/debian/debhelper.in/llvm-gcc-4.2.links clang-2.9/debian/debhelper.in/llvm-gcc-4.2.links --- clang-2.8/debian/debhelper.in/llvm-gcc-4.2.links 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/debhelper.in/llvm-gcc-4.2.links 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -# AUTOGENERATED in debian/packages.d/llvm-gc-4.2.mk. diff -Nru clang-2.8/debian/debhelper.in/llvm.install clang-2.9/debian/debhelper.in/llvm.install --- clang-2.8/debian/debhelper.in/llvm.install 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/debhelper.in/llvm.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -debian/@TMP@/@PF@/bin/* @PF@/bin/ diff -Nru clang-2.8/debian/debhelper.in/llvm.links clang-2.9/debian/debhelper.in/llvm.links --- clang-2.8/debian/debhelper.in/llvm.links 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/debhelper.in/llvm.links 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -# AUTOGENERATED in debian/rules.d/binary.mk. diff -Nru clang-2.8/debian/debhelper.in/llvm.manpages clang-2.9/debian/debhelper.in/llvm.manpages --- clang-2.8/debian/debhelper.in/llvm.manpages 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/debhelper.in/llvm.manpages 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -debian/@TMP@/@PF@/share/man/man1/* diff -Nru clang-2.8/debian/debhelper.in/llvm-priv-dev.dirs clang-2.9/debian/debhelper.in/llvm-priv-dev.dirs --- clang-2.8/debian/debhelper.in/llvm-priv-dev.dirs 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/debhelper.in/llvm-priv-dev.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -@PF@/build diff -Nru clang-2.8/debian/debhelper.in/llvm-runtime.install clang-2.9/debian/debhelper.in/llvm-runtime.install --- clang-2.8/debian/debhelper.in/llvm-runtime.install 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/debhelper.in/llvm-runtime.install 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -debian/@TMP@/@PF@/bin/lli @PF@/bin/ -debian/llvm.binfmt usr/share/binfmts/ diff -Nru clang-2.8/debian/debhelper.in/llvm-runtime.links clang-2.9/debian/debhelper.in/llvm-runtime.links --- clang-2.8/debian/debhelper.in/llvm-runtime.links 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/debhelper.in/llvm-runtime.links 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -# AUTOGENERATED in debian/rules.d/binary.mk. -/usr/lib/llvm-2.8 /usr/lib/llvm-2.8rc diff -Nru clang-2.8/debian/debhelper.in/llvm-runtime.manpages clang-2.9/debian/debhelper.in/llvm-runtime.manpages --- clang-2.8/debian/debhelper.in/llvm-runtime.manpages 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/debhelper.in/llvm-runtime.manpages 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -debian/@TMP@/@PF@/share/man/man1/lli.* diff -Nru clang-2.8/debian/debhelper.in/llvm-runtime.postinst clang-2.9/debian/debhelper.in/llvm-runtime.postinst --- clang-2.8/debian/debhelper.in/llvm-runtime.postinst 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/debhelper.in/llvm-runtime.postinst 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -#!/bin/sh -e - -if test "$1" = "configure"; then - if test -x /usr/sbin/update-binfmts; then - update-binfmts --import llvm.binfmt || true - fi -fi - -#DEBHELPER# diff -Nru clang-2.8/debian/debhelper.in/llvm-runtime.prerm clang-2.9/debian/debhelper.in/llvm-runtime.prerm --- clang-2.8/debian/debhelper.in/llvm-runtime.prerm 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/debhelper.in/llvm-runtime.prerm 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -#!/bin/sh -e - -if test "$1" = "remove"; then - if test -x /usr/sbin/update-binfmts; then - update-binfmts --package llvm \ - --remove llvm /usr/bin/lli || true - fi -fi - -#DEBHELPER# - diff -Nru clang-2.8/debian/debhelper.in/llvm-snapshot.install clang-2.9/debian/debhelper.in/llvm-snapshot.install --- clang-2.8/debian/debhelper.in/llvm-snapshot.install 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/debhelper.in/llvm-snapshot.install 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -debian/@TMP@/@PF@/bin/* @PF@/bin/ -debian/@TMP@/@PF@/lib/* @PF@/lib/ -debian/@TMP@/@PF@/include/* @PF@/include/ - -debian/@TMP@/@PF@/docs/llvm/html usr/share/doc/llvm-snapshot/ -debian/@TMP@/@PF@/docs/llvm/ps usr/share/doc/llvm-snapshot/ - -@BUILD@/Makefile.common @PF@/build/ -@BUILD@/Makefile.config @PF@/build/ -@BUILD@/config.status @PF@/build/ -Makefile.rules @PF@/build/ -configure @PF@/build/ -autoconf/ @PF@/build/ diff -Nru clang-2.8/debian/debian_path.h clang-2.9/debian/debian_path.h --- clang-2.8/debian/debian_path.h 1970-01-01 00:00:00.000000000 +0000 +++ clang-2.9/debian/debian_path.h 2011-06-23 19:48:22.000000000 +0000 @@ -0,0 +1,19 @@ +//===----------------------------------------------------------------------===// +// +// Debian paths declaration management +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef DEBIAN_PATH_H +#define DEBIAN_PATH_H + +// To create the full path to libgcc and other. +// For example: /usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.5/libgcc.a + +#define DEB_HOST_MULTIARCH_TRIPLET "@DEB_HOST_MULTIARCH@" +#define DEB_HOST_GNU_TYPE_TRIPLET "@DEB_HOST_GNU_TYPE@" + +#endif diff -Nru clang-2.8/debian/llvm.binfmt clang-2.9/debian/llvm.binfmt --- clang-2.8/debian/llvm.binfmt 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/llvm.binfmt 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -package llvm -interpreter /usr/bin/lli-2.8 -magic llvc diff -Nru clang-2.8/debian/man/scan-build.1 clang-2.9/debian/man/scan-build.1 --- clang-2.8/debian/man/scan-build.1 1970-01-01 00:00:00.000000000 +0000 +++ clang-2.9/debian/man/scan-build.1 2011-06-17 11:25:24.000000000 +0000 @@ -0,0 +1,130 @@ +.\" generated with Ronn/v0.7.3 +.\" http://github.com/rtomayko/ronn/tree/0.7.3 +. +.TH "SCAN\-BUILD" "1" "December 2010" "" "" +. +.SH "NAME" +\fBscan\-build\fR +. +.P +scan\-build(1) \-\- An utility for running the clang(1) analyzer from the command line +. +.SH "SYNOPSIS" +\fBscan\-build\fR \fIoptions\fR \fIbuild command\fR [build options] +. +.SH "DESCRIPTION" +\fBscan\-build\fR is a command line utility that enables a user to run the clang static analyzer over their codebase as part of performing a regular build (from the command line)\. +. +.SH "OPTIONS" +. +.TP +\fB\-analyze\-headers\fR +Also analyze functions in #included files\. +. +.TP +\fB\-\-experimental\-checks\fR +Enable experimental checks that are currently in heavy testing +. +.TP +\fB\-o\fR +Target directory for HTML report files\. Subdirectories will be created as needed to represent separate "runs" of the analyzer\. If this option is not specified, a directory is created in /tmp (TMPDIR on Mac OS X) to store the reports\. +. +.TP +\fB\-h\fR, \fB\-\-help\fR +Display the help message\. +. +.TP +\fB\-k\fR +Add a "keep on going" option to the specified build command\. +. +.TP +\fB\-\-keep\-going\fR +This option currently supports make and xcodebuild\. This is a convenience option; one can specify this behavior directly using build options\. +. +.TP +\fB\-\-html\-title\fR [title] +Specify the title used on generated HTML pages\. +. +.TP +\fB\-\-html\-title=\fR[title] +If not specified, a default title will be used\. +. +.TP +\fB\-plist\fR +By default the output of scan\-build is a set of HTML files\. This option outputs the results as a set of \.plist files\. +. +.TP +\fB\-\-status\-bugs\fR +By default, the exit status of scan\-build is the same as the executed build command\. Specifying this option causes the exit status of scan\-build to be 1 if it found potential bugs and 0 otherwise\. +. +.TP +\fB\-\-use\-cc\fR [compiler path] +By default, scan\-build uses \'gcc\' to compile and link +. +.TP +\fB\-\-use\-cc=\fR[compiler path] +your C and Objective\-C code\. Use this option to specify an alternate compiler\. +. +.TP +\fB\-\-use\-c++\fR [compiler path] +By default, scan\-build uses \'g++\' to compile and link +. +.TP +\fB\-\-use\-c++=\fR[compiler path] +your C++ and Objective\-C++ code\. Use this option to specify an alternate compiler\. +. +.TP +\fB\-v\fR +Verbose output from scan\-build and the analyzer\. A second and third \'\-v\' increases verbosity\. +. +.TP +\fB\-V\fR +View analysis results in a web browser when the build +. +.TP +\fB\-\-view\fR +completes\. +. +.SH "ADVANCED OPTIONS:" +. +.TP +\fB\-constraints\fR [model] +Specify the contraint engine used by the analyzer\. By default the \'range\' model is used\. Specifying \'basic\' uses a simpler, less powerful constraint model used by checker\-0\.160 and earlier\. +. +.TP +\fB\-store\fR [model] +Specify the store model used by the analyzer\. By default, the \'region\' store model is used\. \'region\' specifies a field sensitive store model\. Users can also specify \'basic\', which is far less precise but can more quickly analyze code\. \'basic\' was the default store model for checker\-0\.221 and earlier\. +. +.TP +\fB\-no\-failure\-reports\fR +Do not create a \'failures\' subdirectory that includes analyzer crash reports and preprocessed source files\. +. +.SH "EXAMPLES" +Basic usage of scan\-build is designed to be simple: just place the word "scan\-build" in front of your build command: +. +.P +$ scan\-build make +. +.P +$ scan\-build xcodebuild +. +.P +In the first case scan\-build analyzes the code of a project built with make and in the second case scan\-build analyzes a project built using xcodebuild\. +. +.P +It is also possible to use scan\-build to analyze specific files: +. +.P +$ scan\-build gcc \-c t1\.c t2\.c +. +.P +This example causes the files t1\.c and t2\.c to be analyzed\. +. +.SH "AUTHORS" +Maintained by the Clang / LLVM Team \fIhttp://clang\.llvm\.org\fR\. +. +.P +This manual page was written by Ermenegildo Fiorito \fIfiorito\.g@gmail\.com\fR for the Debian Project\. +. +.SH "SEE ALSO" +clang(1) scan\-view(1) \fIhttp://clang\-analyzer\.llvm\.org\fR diff -Nru clang-2.8/debian/man/scan-view.1 clang-2.9/debian/man/scan-view.1 --- clang-2.8/debian/man/scan-view.1 1970-01-01 00:00:00.000000000 +0000 +++ clang-2.9/debian/man/scan-view.1 2011-06-17 11:25:24.000000000 +0000 @@ -0,0 +1,55 @@ +.\" generated with Ronn/v0.7.3 +.\" http://github.com/rtomayko/ronn/tree/0.7.3 +. +.TH "SCAN\-VIEW" "1" "December 2010" "" "" +. +.SH "NAME" +\fBscan\-view\fR +. +.P +scan\-view(1) \-\- The clang(1) static analyzer results viewer\. +. +.SH "SYNOPSIS" +\fBscan\-view\fR \fIoptions\fR \fIresults directory\fR +. +.SH "DESCRIPTION" +\fBscan\-view\fR a companion comannd line utility to scan\-build(1), scan\-view is used to view analysis results generated by scan\-build(1)\. There is an option that one can pass to scan\-build to cause scan\-view to run as soon as it the analysis of a build completes +. +.SH "OPTIONS" +. +.TP +\fB\-h\fR, \fB\-\-help\fR +show the help message and exit\. +. +.TP +\fB\-\-host=\fRHOST +Host interface to listen on\. (default=127\.0\.0\.1) +. +.TP +\fB\-\-port=\fRPORT +Port to listen on\. (default=8181) +. +.TP +\fB\-\-debug\fR +Print additional debugging information\. +. +.TP +\fB\-\-auto\-reload\fR +Automatically update module for each request\. +. +.TP +\fB\-\-no\-browser\fR +Don\'t open a webbrowser on startup\. +. +.TP +\fB\-\-allow\-all\-hosts\fR +Allow connections from any host (access restricted to "127\.0\.0\.1" by default) +. +.SH "AUTHORS" +Maintained by the Clang / LLVM Team \fIhttp://clang\.llvm\.org\fR\. +. +.P +This manual page was written by Ermenegildo Fiorito \fIfiorito\.g@gmail\.com\fR for the Debian Project\. +. +.SH "SEE ALSO" +clang(1) scan\-build(1) \fIhttp://clang\-analyzer\.llvm\.org\fR diff -Nru clang-2.8/debian/orig-tar.sh clang-2.9/debian/orig-tar.sh --- clang-2.8/debian/orig-tar.sh 1970-01-01 00:00:00.000000000 +0000 +++ clang-2.9/debian/orig-tar.sh 2011-06-17 11:25:24.000000000 +0000 @@ -0,0 +1,23 @@ +#!/bin/sh + +# called by uscan with '--upstream-version' +DIR=clang-$2 +TAR=../clang_$2.orig.tar.gz + +# clean up the upstream tarball +tar zxvf $3 +mkdir -p tools/clang/ +mv $DIR/* tools/clang/ +mv tools $DIR +tar -c -z -f $TAR $DIR +rm -rf $DIR + +# move to directory 'tarballs' +if [ -r .svn/deb-layout ]; then + . .svn/deb-layout + mv $TAR $origDir + echo "moved $TAR to $origDir" +fi + +exit 0 + diff -Nru clang-2.8/debian/packages.d/llvm-gcc-4.2.mk clang-2.9/debian/packages.d/llvm-gcc-4.2.mk --- clang-2.8/debian/packages.d/llvm-gcc-4.2.mk 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/packages.d/llvm-gcc-4.2.mk 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -builds := llvm-gcc - -BUILDDEPS := llvm-$(UVERSION)-dev (>= $(dev_version)) -BUILDCONFLICTS := ocaml, ocaml-nox - -llvm-gcc_packages := llvm-gcc-4.2 - -llvm-gcc_confargs := $(confargs) \ - --prefix=$(PF)/gcc-$(gcc_version) --enable-llvm=$(PF) \ - --enable-languages=c,c++ --program-prefix=llvm- \ - --enable-threads --disable-nls --disable-shared \ - --disable-multilib --with-pic - -check_archs := amd64 i386 -ifneq (,$(filter $(DEB_HOST_ARCH),$(check_archs))) - llvm-gcc_check := yes -endif - -tarpath := $(firstword $(wildcard $(D)/llvm-gcc-$(gcc_version)-$(UVERSION)*.tar.* \ - /usr/src/llvm/llvm-gcc-$(gcc_version)-$(UVERSION)*.tar.*)) -tarball := $(notdir $(tarpath)) -srcdir := $(subst -dfsg,,$(subst .tar$(suffix $(tarball)),,$(tarball))) - -define llvm-gcc-4.2_extra_binary - if test "x$*" = "xllvm-gcc-4.2" ; then \ - $(RM) $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/gcc-$(gcc_version)/bin/*-$(gcc_version).* ; \ - for i in $$(ls $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/gcc-$(gcc_version)/bin) ; do \ - echo "$(PF)/gcc-$(gcc_version)/bin/$$i usr/bin/$$i-$(gcc_version)" >> $(D)/debian/$(strip $(call pkgname,$*)).links ; \ - done ; \ - fi -endef - diff -Nru clang-2.8/debian/packages.d/llvm.mk clang-2.9/debian/packages.d/llvm.mk --- clang-2.8/debian/packages.d/llvm.mk 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/packages.d/llvm.mk 1970-01-01 00:00:00.000000000 +0000 @@ -1,161 +0,0 @@ -builds := llvm - -# packages which don't need the builds -extra_packages := llvm-source - -ifneq (,$(findstring $(DEB_HOST_GNU_CPU),ia64)) - $(error unsupported processor) -endif - -BUILDDEPS := \ - ocaml-nox (>= 3.11.2), ocaml-best-compilers | ocaml-nox, \ - dh-ocaml (>= 0.9.1) - - -#ifeq (yes,$(shell dpkg --compare-versions $(VERSION) gt $(UVERSION)-1 && echo yes)) -# llvm-priv-dev_version := $(UVERSION)-$(shell expr $(subst $(UVERSION)-,,$(VERSION)) - 1) -# BUILDDEPS := llvm-$(UVERSION)-priv-dev (>= $(llvm-priv-dev_version)), $(BUILDDEPS) -#endif - -# build with RTTI -export REQUIRES_RTTI=1 - -include /usr/share/ocaml/ocamlvars.mk - -llvm_packages := \ - llvm llvm-runtime llvm-dev \ - libllvm-ocaml-dev \ - llvm-doc llvm-examples - -llvm_confargs := $(confargs) \ - --prefix=$(PF) --disable-assertions \ - --enable-optimized --with-optimize-option=' $(opt_flags)' --enable-pic --enable-libffi \ - --with-ocaml-libdir=$(OCAML_STDLIB_DIR)/llvm-$(UVERSION) - -ifeq ($(with_shared),yes) - llvm_packages := libllvm$(pkg_version) $(llvm_packages) - llvm_confargs += --enable-shared -endif - -llvm_MAKEOPTS := $(MAKEOPTS) \ - VERBOSE=1 \ - DebianOpts="-DLLVM_DEBIAN_INFO='\" ($(OS) $(VERSION))\"'" - -# run testsuite -llvm_check := yes - -llvm_MAKECHECKOPTS := $(MAKEOPTS) \ - VERBOSE=1 \ - PATH="$(D)/build-llvm/Release-Asserts/bin:$(srcdir)/test/Scripts:/usr/bin:/bin" - -ifeq (0,1) -define llvm_extra_unpack - rm -rf $(D)/debian/ccache ; \ - if test -f $(PF)/build/ccache.$(DEB_HOST_ARCH).tar.lzma ; then \ - lzcat $(PF)/build/ccache.$(DEB_HOST_ARCH).tar.lzma | tar -C $(D)/debian -x -f - ; \ - fi ; \ - if ! test "x$$($(DEB_HOST_GNU_TYPE)-g++ --version | head -n 1)" = "x$$(cat $(D)/debian/ccache/version 2>/dev/null)" ; then \ - echo "Clearing the cache." && \ - $(RM) -r $(D)/debian/ccache && \ - mkdir $(D)/debian/ccache && \ - $(DEB_HOST_GNU_TYPE)-g++ --version | head -n 1 > $(D)/debian/ccache/version ; \ - fi ; \ - ccache -c -endef -endif - -define llvm_extra_install - if test "x$*-$(with_shared)" = "xllvm-yes" ; then \ - mv $(D)/debian/tmp-llvm/$(PF)/lib/$(shlib_name).so \ - $(D)/debian/tmp-llvm/usr/lib/$(shlib_name).so.1 ; \ - fi -endef - -define llvm-runtime_extra_binary - if test "x$*" = "xllvm-runtime" ; then \ - mv $(D)/debian/$(strip $(call pkgname,$*))/usr/share/binfmts/llvm.binfmt \ - $(D)/debian/$(strip $(call pkgname,$*))/usr/share/binfmts/llvm-$(UVERSION).binfmt ; \ - fi -endef - -define llvm_extra_binary - if test "x$*" = "xllvm" ; then \ - find $(D)/debian/$(strip $(call pkgname,$*)) ! -type d -name "lli*" ; \ - find $(D)/debian/$(strip $(call pkgname,$*)) ! -type d -name "lli*" | xargs $(RM) ; \ - sed -r 's/^(my\s+\$$LLVM_SRC_ROOT\s+=\s+q)\{(.*)\}\;$$/\1\{$(subst /,\/,$(PF))\/build\}\;/' \ - -i $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/bin/llvm-config ; \ - sed -r 's/^(my\s+\$$LLVM_OBJ_ROOT\s+=\s+q)\{(.*)\}\;$$/\1\{$(subst /,\/,$(PF))\/build\}\;/' \ - -i $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/bin/llvm-config ; \ - if test "x$(llvm_check)" = "xyes" ; then \ - install -m 0644 $(D)/build-llvm/test/testrun.sum \ - $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/ ; \ - echo >> $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/testrun.sum ; \ - echo "Compiler version: $(shell $(DEB_HOST_GNU_TYPE)-gcc -dumpversion) (GCC)" \ - >> $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/testrun.sum ; \ - echo "Platform: $(DEB_HOST_GNU_TYPE)" \ - >> $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/testrun.sum ; \ - echo "configure flags: $(llvm_confargs)" \ - >> $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/testrun.sum ; \ - gzip -9nf $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/testrun.sum ; \ - fi ; \ - fi -endef - -define llvm-dev_extra_binary - if test "x$*" = "xllvm-dev" ; then\ - find $(D)/debian/$(strip $(call pkgname,$*)) ! -type d -name "libLLVM-2.8*.so.*" | xargs $(RM) ; \ - for i in llvm llvm-c ; do \ - mv $(D)/debian/$(strip $(call pkgname,$*))/usr/include/$$i \ - $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/include/$$i ; \ - done ; rm -rf $(D)/debian/$(strip $(call pkgname,$*))/usr/include ; \ - for i in $$(ls $(D)/debian/$(strip $(call pkgname,$*))/usr/share/vim/addons/plugin/*.vim 2>/dev/null || echo -n) ; do \ - mv $$i $$(echo $$i | sed -r 's/(\.vim)$$/-2\.7\1/g') ; \ - done ; \ - sed -r 's/^(LLVM_SRC_ROOT\s+\:\=\s+\$$\(shell cd).*\; \$$\(PWD\)\)$$/\1 $(subst /,\/,$(PF))\/build \; \$$\(PWD\)\)/' \ - -i $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/build/Makefile.config ; \ - sed -r 's/^(LLVM_OBJ_ROOT\s+\:\=\s+\$$\(shell cd).*\; \$$\(PWD\)\)$$/\1 $(subst /,\/,$(PF))\/build \; \$$\(PWD\)\)/' \ - -i $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/build/Makefile.config ; \ - sed -r "s/^(ac_pwd\=)'.*'$$/\1'$(subst /,\/,$(PF))\/build'/" \ - -i $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/build/config.status ; \ - chmod 644 $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/build/Makefile* ; \ - find $(D)/debian/$(strip $(call pkgname,$*)) -type f -name "LICENSE.TXT" | xargs $(RM) ; \ - cp $(D)/utils/vim/README $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/README.vim ; \ - cp $(D)/utils/emacs/README $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/README.emacs ; \ - sed -r 's/path-to-llvm\/utils\/emacs/\/usr\/share\/emacs\/site-lisp\/llvm-$(UVERSION)/' \ - -i $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/README.emacs ; \ - fi -endef - -define llvm-priv-dev_extra_binary - if test "x$*" = "xllvm-priv-dev" ; then \ - ccache -c ; \ - cp -r $(D)/debian/ccache $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/build/ ; \ - cd $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/build/ && \ - tar cf ccache.$(DEB_HOST_ARCH).tar ccache && \ - lzma --best ccache.$(DEB_HOST_ARCH).tar ; \ - cd $(D) ; \ - $(RM) -r $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/build/ccache ; \ - fi -endef - -# FIXME: Should separe MAJOR/UVERSION. -define llvm-source_extra_binary - if test "x$*" = "xllvm-source" ; then \ - $(RM) -r $(D)/debian/$(strip $(call pkgname,$*))/usr/src/llvm-$(UVERSION) ; \ - mkdir -p $(D)/debian/$(strip $(call pkgname,$*))/usr/src/llvm-$(UVERSION) ; \ - cp -f ../$(PKGNAME)-$(UVERSION)_$(UXVERSION).orig.tar.gz \ - $(D)/debian/$(strip $(call pkgname,$*))/usr/src/llvm-$(UVERSION)/$(PKGNAME)-$(UVERSION).tar.gz ; \ - gunzip $(D)/debian/$(strip $(call pkgname,$*))/usr/src/llvm-$(UVERSION)/$(PKGNAME)-$(UVERSION).tar.gz ; \ - xz $(D)/debian/$(strip $(call pkgname,$*))/usr/src/llvm-$(UVERSION)/$(PKGNAME)-$(UVERSION).tar ; \ - cp -r $(D)/debian/patches $(D)/debian/$(strip $(call pkgname,$*))/usr/src/llvm-$(UVERSION)/ ; \ - fi -endef - -define libllvm-ocaml-dev_extra_binary - if test "x$*" = "xlibllvm-ocaml-dev" ; then \ - dh_ocaml -p$(call pkgname,$*) ; \ - cp $(D)/debian/$(strip $(call pkgname,$*)).META \ - $(D)/debian/$(strip $(call pkgname,$*))/$(OCAML_STDLIB_DIR)/METAS/META.llvm-$(UVERSION) ; \ - fi -endef - diff -Nru clang-2.8/debian/packages.d/llvm-snapshot.mk clang-2.9/debian/packages.d/llvm-snapshot.mk --- clang-2.8/debian/packages.d/llvm-snapshot.mk 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/packages.d/llvm-snapshot.mk 1970-01-01 00:00:00.000000000 +0000 @@ -1,56 +0,0 @@ -builds := llvm - -BUILDDEPS := ocaml-nox (>= 3.11.2), ocaml-best-compilers | ocaml-nox, \ - dh-ocaml (>= 0.9.1) - -PF := /usr/lib/llvm-snapshot - -include /usr/share/ocaml/ocamlvars.mk - -llvm_packages := llvm-snapshot - -# assertions are not disabled for snapshot builds -llvm_confargs := $(confargs) \ - --prefix=$(PF) \ - --enable-optimized --with-optimize-option=' $(opt_flags)' --enable-pic --enable-libffi \ - --with-ocaml-libdir=$(OCAML_STDLIB_DIR)/llvm-$(UVERSION) - -llvm_MAKEOPTS := $(MAKEOPTS) \ - VERBOSE=1 \ - DebianOpts="-DLLVM_DEBIAN_INFO='\" ($(OS) $(VERSION))\"'" - -# run testsuite -llvm_check := yes - -llvm_MAKECHECKOPTS := $(MAKEOPTS) \ - VERBOSE=1 \ - PATH="$(D)/build-llvm/Release/bin:$(srcdir)/test/Scripts:/usr/bin:/bin" - -define llvm-snapshot_extra_binary - if test "x$*" = "xllvm-snapshot" ; then \ - sed -r 's/^(my\s+\$$LLVM_SRC_ROOT\s+=\s+q)\{(.*)\}\;$$/\1\{$(subst /,\/,$(PF))\/build\}\;/' \ - -i $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/bin/llvm-config ; \ - sed -r 's/^(my\s+\$$LLVM_OBJ_ROOT\s+=\s+q)\{(.*)\}\;$$/\1\{$(subst /,\/,$(PF))\/build\}\;/' \ - -i $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/bin/llvm-config ; \ - sed -r 's/^(LLVM_SRC_ROOT\s+\:\=\s+\$$\(shell cd).*\; \$$\(PWD\)\)$$/\1 $(subst /,\/,$(PF))\/build \; \$$\(PWD\)\)/' \ - -i $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/build/Makefile.config ; \ - sed -r 's/^(LLVM_OBJ_ROOT\s+\:\=\s+\$$\(shell cd).*\; \$$\(PWD\)\)$$/\1 $(subst /,\/,$(PF))\/build \; \$$\(PWD\)\)/' \ - -i $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/build/Makefile.config ; \ - sed -r "s/^(ac_pwd\=)'.*'$$/\1'$(subst /,\/,$(PF))\/build'/" \ - -i $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/build/config.status ; \ - find $(D)/debian/$(strip $(call pkgname,$*)) -type f -name "LICENSE.TXT" | xargs $(RM) ; \ - if test "x$(llvm_check)" = "xyes" ; then \ - install -m 0644 $(D)/build-llvm/test/testrun.sum \ - $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/ ; \ - echo >> $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/testrun.sum ; \ - echo "Compiler version: $(shell $(DEB_HOST_GNU_TYPE)-gcc -dumpversion) (GCC)" \ - >> $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/testrun.sum ; \ - echo "Platform: $(DEB_HOST_GNU_TYPE)" \ - >> $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/testrun.sum ; \ - echo "configure flags: $(llvm_confargs)" \ - >> $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/testrun.sum ; \ - gzip -9nf $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/testrun.sum ; \ - fi ; \ - fi -endef - diff -Nru clang-2.8/debian/patches/10-handleWheezySid.patch clang-2.9/debian/patches/10-handleWheezySid.patch --- clang-2.8/debian/patches/10-handleWheezySid.patch 1970-01-01 00:00:00.000000000 +0000 +++ clang-2.9/debian/patches/10-handleWheezySid.patch 2011-08-12 12:46:51.000000000 +0000 @@ -0,0 +1,50 @@ +--- + ToolChains.cpp | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +Description: Introduce wheezy/sid to clang + Add detection for Debian wheezy/sid in lib/Driver/ToolChains.cpp + +Author: Michael Wild +Bug: http://llvm.org/bugs/show_bug.cgi?id=10064 +Forwarded: http://llvm.org/bugs/attachment.cgi?id=6678 +Last-Update: 2011-06-02 + +--- clang-2.9.orig/tools/clang/lib/Driver/ToolChains.cpp ++++ clang-2.9/tools/clang/lib/Driver/ToolChains.cpp +@@ -1276,6 +1276,7 @@ enum LinuxDistro { + ArchLinux, + DebianLenny, + DebianSqueeze, ++ DebianWheezy, + Exherbo, + Fedora13, + Fedora14, +@@ -1298,7 +1299,8 @@ static bool IsOpenSuse(enum LinuxDistro + } + + static bool IsDebian(enum LinuxDistro Distro) { +- return Distro == DebianLenny || Distro == DebianSqueeze; ++ return Distro == DebianLenny || Distro == DebianSqueeze || ++ Distro == DebianWheezy; + } + + static bool IsUbuntu(enum LinuxDistro Distro) { +@@ -1363,6 +1365,8 @@ static LinuxDistro DetectLinuxDistro(llv + return DebianLenny; + else if (Data.startswith("squeeze/sid")) + return DebianSqueeze; ++ else if (Data.startswith("wheezy/sid")) ++ return DebianWheezy; + return UnknownDistro; + } + +@@ -1510,7 +1514,7 @@ Linux::Linux(const HostInfo &Host, const + + if (Distro == DebianSqueeze || IsOpenSuse(Distro) || + IsFedora(Distro) || Distro == UbuntuLucid || Distro == UbuntuMaverick || +- Distro == UbuntuKarmic) ++ Distro == UbuntuKarmic || Distro == DebianWheezy) + ExtraOpts.push_back("--build-id"); + + if (Distro == ArchLinux) diff -Nru clang-2.8/debian/patches/11-searchMultiArchLibDir.patch clang-2.9/debian/patches/11-searchMultiArchLibDir.patch --- clang-2.8/debian/patches/11-searchMultiArchLibDir.patch 1970-01-01 00:00:00.000000000 +0000 +++ clang-2.9/debian/patches/11-searchMultiArchLibDir.patch 2011-08-12 12:46:51.000000000 +0000 @@ -0,0 +1,30 @@ +--- + ToolChains.cpp | 8 ++++++++ + 1 file changed, 8 insertions(+) + +Description: Add the multi-arch lib directory to the file search path + Otherwise Clang is not able to find crt*.o. + +Author: Michael Wild +Bug: http://llvm.org/bugs/show_bug.cgi?id=10100 +Bug-Debian: http://bugs.debian.org/629594 +Forwarded: http://llvm.org/bugs/attachment.cgi?id=6711 +Last-Update: 2011-06-08 + +--- clang-2.9.orig/tools/clang/lib/Driver/ToolChains.cpp ++++ clang-2.9/tools/clang/lib/Driver/ToolChains.cpp +@@ -1531,6 +1531,14 @@ Linux::Linux(const HostInfo &Host, const + Paths.push_back(Base + "/../../.."); + if (Arch == getArch() && IsUbuntu(Distro)) + Paths.push_back("/usr/lib/" + GccTriple); ++ if (Distro == DebianWheezy && Arch == getArch()) ++ { ++ if (!llvm::sys::fs::exists("/usr/lib/" + GccTriple + "/crt1.o", Exists) && Exists) ++ Paths.push_back("/usr/lib/" + GccTriple); ++ else if (Is32Bits && ++ !llvm::sys::fs::exists("/usr/lib/i386-linux-gnu/crt1.o", Exists) && Exists) ++ Paths.push_back("/usr/lib/i386-linux-gnu"); ++ } + } + + bool Linux::HasNativeLLVMSupport() const { diff -Nru clang-2.8/debian/patches/12-gcc-4.6.patch clang-2.9/debian/patches/12-gcc-4.6.patch --- clang-2.8/debian/patches/12-gcc-4.6.patch 1970-01-01 00:00:00.000000000 +0000 +++ clang-2.9/debian/patches/12-gcc-4.6.patch 2011-08-12 12:46:51.000000000 +0000 @@ -0,0 +1,16 @@ +--- + ToolChains.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- clang-2.9.orig/tools/clang/lib/Driver/ToolChains.cpp 2011-03-21 22:29:27.000000000 +0100 ++++ clang-2.9/tools/clang/lib/Driver/ToolChains.cpp 2011-06-12 10:59:01.000000000 +0200 +@@ -1449,7 +1449,8 @@ + GccTriple = "i586-suse-linux"; + } + +- const char* GccVersions[] = {"4.5.2", "4.5.1", "4.5", "4.4.5", "4.4.4", ++ const char* GccVersions[] = {"4.6.0", "4.6", ++ "4.5.2", "4.5.1", "4.5", "4.4.5", "4.4.4", + "4.4.3", "4.4", "4.3.4", "4.3.3", "4.3.2", + "4.3", "4.2.4", "4.2.3", "4.2.2", "4.2.1", + "4.2"}; diff -Nru clang-2.8/debian/patches/13-search-path-dpkg-based.patch clang-2.9/debian/patches/13-search-path-dpkg-based.patch --- clang-2.8/debian/patches/13-search-path-dpkg-based.patch 1970-01-01 00:00:00.000000000 +0000 +++ clang-2.9/debian/patches/13-search-path-dpkg-based.patch 2011-08-12 12:46:51.000000000 +0000 @@ -0,0 +1,27 @@ +--- + ToolChains.cpp | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --unidirectional-new-file -ur clang-2.9.orig//tools/clang/lib/Driver/ToolChains.cpp clang-2.9/tools/clang/lib/Driver/ToolChains.cpp +--- clang-2.9.orig//tools/clang/lib/Driver/ToolChains.cpp 2011-06-23 15:38:16.000000000 +0200 ++++ clang-2.9/tools/clang/lib/Driver/ToolChains.cpp 2011-06-23 15:32:54.000000000 +0200 +@@ -28,6 +28,7 @@ + #include "llvm/Support/raw_ostream.h" + #include "llvm/Support/Path.h" + #include "llvm/Support/system_error.h" ++#include "debian_path.h" + + #include // ::getenv + +@@ -1460,8 +1461,8 @@ + "4.2"}; + std::string Base = ""; + for (unsigned i = 0; i < sizeof(GccVersions)/sizeof(char*); ++i) { +- std::string Suffix = GccTriple + "/" + GccVersions[i]; +- std::string t1 = "/usr/lib/gcc/" + Suffix; ++ std::string Suffix = std::string(DEB_HOST_GNU_TYPE_TRIPLET) + "/" + GccVersions[i]; ++ std::string t1 = "/usr/lib/" + std::string(DEB_HOST_MULTIARCH_TRIPLET) + "/gcc/" + Suffix; + if (!llvm::sys::fs::exists(t1 + "/crtbegin.o", Exists) && Exists) { + Base = t1; + break; +Seulement dans clang-2.9.orig//tools/clang/lib/Driver: ToolChains.cpp.orig diff -Nru clang-2.8/debian/README.source clang-2.9/debian/README.source --- clang-2.8/debian/README.source 1970-01-01 00:00:00.000000000 +0000 +++ clang-2.9/debian/README.source 2011-06-17 11:25:24.000000000 +0000 @@ -0,0 +1,7 @@ + +In the repack script (orig-tar.sh), we are creating a subdirectory tools/clang/ +and storing all the sources of clang in it. +After that, the llvm sources are unpack, its patches applied + + -- Sylvestre Ledru Tue, 12 Apr 2011 21:21:24 +0200 + diff -Nru clang-2.8/debian/rules clang-2.9/debian/rules --- clang-2.8/debian/rules 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/rules 2011-06-17 11:25:24.000000000 +0000 @@ -1,7 +1,5 @@ #!/usr/bin/make -f -export DEB_GCC_NO_O3=1 - include debian/rules.d/vars.mk ifneq (,$(findstring llvm,$(PKGNAME))) diff -Nru clang-2.8/debian/rules.d/build.mk clang-2.9/debian/rules.d/build.mk --- clang-2.8/debian/rules.d/build.mk 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/rules.d/build.mk 2011-06-23 19:48:22.000000000 +0000 @@ -30,6 +30,9 @@ # GENERIC ------------------- $(configure-stamp)-%: $(unpack-stamp) $(patch-stamp) + sed -e "s|@DEB_HOST_MULTIARCH@|$$(dpkg-architecture -qDEB_HOST_MULTIARCH)|" \ + -e "s|@DEB_HOST_GNU_TYPE@|$$(dpkg-architecture -qDEB_HOST_GNU_TYPE)|" \ + debian/debian_path.h > tools/clang/lib/Driver/debian_path.h -mkdir -p $($*_builddir) 2>/dev/null cd $($*_builddir) && \ ../$(srcdir)/configure $($*_confargs) diff -Nru clang-2.8/debian/rules.d/vars.mk clang-2.9/debian/rules.d/vars.mk --- clang-2.8/debian/rules.d/vars.mk 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/rules.d/vars.mk 2011-06-17 11:25:24.000000000 +0000 @@ -2,7 +2,7 @@ PKGSOURCE := $(shell dpkg-parsechangelog | grep ^Source | sed -e 's/^Source: //') VERSION := $(shell dpkg-parsechangelog | grep ^Version | sed -e 's/^Version: //') UXVERSION := $(shell echo $(VERSION) | cut -d'-' -f1) -UVERSION := 2.8 +UVERSION := 2.9 OS := $(shell lsb_release -is) PF := /usr/lib/llvm-$(UVERSION) D := $(CURDIR) @@ -42,12 +42,6 @@ nocheck := yes endif -# shared lib -with_shared := yes -ifneq ($(DEB_HOST_ARCH_OS),linux) - with_shared := no -endif - stampdir := $(D)/debian/stamps $(foreach target,control unpack patch configure build check install binary, \ $(eval $(target)-stamp := $(stampdir)/$(target)-stamp)) @@ -68,7 +62,18 @@ confargs := \ CC=$(DEB_HOST_GNU_TYPE)-gcc CXX=$(DEB_HOST_GNU_TYPE)-g++ \ CPP=$(DEB_HOST_GNU_TYPE)-cpp \ - --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) + --with-c-include-dirs=/usr/include/$(DEB_HOST_GNU_TYPE):/usr/include \ + --with-cxx-include-root=/usr/include/c++/4.5 \ + --with-cxx-include-arch=$(DEB_HOST_GNU_TYPE) \ + --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) + +ifeq ($(shell dpkg-architecture -qDEB_HOST_ARCH_BITS),64) + confargs += --with-cxx-include-32bit-dir=32 +else + confargs += --with-cxx-include-64bit-dir=64 +endif + + # build not yet prepared to take variables from the environment define unsetenv diff -Nru clang-2.8/debian/source/format clang-2.9/debian/source/format --- clang-2.8/debian/source/format 2011-08-12 13:12:55.000000000 +0000 +++ clang-2.9/debian/source/format 2011-08-12 13:12:57.000000000 +0000 @@ -1 +1 @@ -1.0 +3.0 (quilt) diff -Nru clang-2.8/debian/watch clang-2.9/debian/watch --- clang-2.8/debian/watch 1970-01-01 00:00:00.000000000 +0000 +++ clang-2.9/debian/watch 2011-06-17 11:25:24.000000000 +0000 @@ -0,0 +1,4 @@ +version=3 +opts=uversionmangle=s/\.(tar.*|tgz|zip|gz|bz2)$//i,dversionmangle=s/[-.+~]?(cvs|svn|git|snapshot|pre|hg)(.*)$//i,pasv \ +http://llvm.org/releases/download.html (?:.*/)?clang-?_?([\d+\.]+|\d+)\.(tar.*|tgz|zip|gz|bz2|) debian debian/orig-tar.sh + diff -Nru clang-2.8/tools/clang/bindings/python/clang/cindex.py clang-2.9/tools/clang/bindings/python/clang/cindex.py --- clang-2.8/tools/clang/bindings/python/clang/cindex.py 2010-04-30 21:51:10.000000000 +0000 +++ clang-2.9/tools/clang/bindings/python/clang/cindex.py 2011-02-05 17:54:10.000000000 +0000 @@ -191,19 +191,19 @@ self.ptr = ptr def __del__(self): - _clang_disposeDiagnostic(self.ptr) + _clang_disposeDiagnostic(self) @property def severity(self): - return _clang_getDiagnosticSeverity(self.ptr) + return _clang_getDiagnosticSeverity(self) @property def location(self): - return _clang_getDiagnosticLocation(self.ptr) + return _clang_getDiagnosticLocation(self) @property def spelling(self): - return _clang_getDiagnosticSpelling(self.ptr) + return _clang_getDiagnosticSpelling(self) @property def ranges(self): @@ -215,9 +215,11 @@ return int(_clang_getDiagnosticNumRanges(self.diag)) def __getitem__(self, key): + if (key >= len(self)): + raise IndexError return _clang_getDiagnosticRange(self.diag, key) - return RangeIterator(self.ptr) + return RangeIterator(self) @property def fixits(self): @@ -236,12 +238,15 @@ return FixIt(range, value) - return FixItIterator(self.ptr) + return FixItIterator(self) def __repr__(self): return "" % ( self.severity, self.location, self.spelling) + def from_param(self): + return self.ptr + class FixIt(object): """ A FixIt represents a transformation to be applied to the source to @@ -397,6 +402,51 @@ # A typedef. CursorKind.TYPEDEF_DECL = CursorKind(20) +# A C++ class method. +CursorKind.CXX_METHOD = CursorKind(21) + +# A C++ namespace. +CursorKind.NAMESPACE = CursorKind(22) + +# A linkage specification, e.g. 'extern "C"'. +CursorKind.LINKAGE_SPEC = CursorKind(23) + +# A C++ constructor. +CursorKind.CONSTRUCTOR = CursorKind(24) + +# A C++ destructor. +CursorKind.DESTRUCTOR = CursorKind(25) + +# A C++ conversion function. +CursorKind.CONVERSION_FUNCTION = CursorKind(26) + +# A C++ template type parameter +CursorKind.TEMPLATE_TYPE_PARAMETER = CursorKind(27) + +# A C++ non-type template paramater. +CursorKind.TEMPLATE_NON_TYPE_PARAMETER = CursorKind(28) + +# A C++ template template parameter. +CursorKind.TEMPLATE_TEMPLATE_PARAMTER = CursorKind(29) + +# A C++ function template. +CursorKind.FUNCTION_TEMPLATE = CursorKind(30) + +# A C++ class template. +CursorKind.CLASS_TEMPLATE = CursorKind(31) + +# A C++ class template partial specialization. +CursorKind.CLASS_TEMPLATE_PARTIAL_SPECIALIZATION = CursorKind(32) + +# A C++ namespace alias declaration. +CursorKind.NAMESPACE_ALIAS = CursorKind(33) + +# A C++ using directive +CursorKind.USING_DIRECTIVE = CursorKind(34) + +# A C++ using declaration +CursorKind.USING_DECLARATION = CursorKind(35) + ### # Reference Kinds @@ -415,6 +465,25 @@ # while the type of the variable "size" is referenced. The cursor # referenced by the type of size is the typedef for size_type. CursorKind.TYPE_REF = CursorKind(43) +CursorKind.CXX_BASE_SPECIFIER = CursorKind(44) + +# A reference to a class template, function template, template +# template parameter, or class template partial specialization. +CursorKind.TEMPLATE_REF = CursorKind(45) + +# A reference to a namespace or namepsace alias. +CursorKind.NAMESPACE_REF = CursorKind(46) + +# A reference to a member of a struct, union, or class that occurs in +# some non-expression context, e.g., a designated initializer. +CursorKind.MEMBER_REF = CursorKind(47) + +# A reference to a labeled statement. +CursorKind.LABEL_REF = CursorKind(48) + +# A reference toa a set of overloaded functions or function templates +# that has not yet been resolved to a specific function or function template. +CursorKind.OVERLOADED_DECL_REF = CursorKind(49) ### # Invalid/Error Kinds @@ -422,6 +491,7 @@ CursorKind.INVALID_FILE = CursorKind(70) CursorKind.NO_DECL_FOUND = CursorKind(71) CursorKind.NOT_IMPLEMENTED = CursorKind(72) +CursorKind.INVALID_CODE = CursorKind(73) ### # Expression Kinds @@ -447,6 +517,9 @@ # An expression that sends a message to an Objective-C object or class. CursorKind.OBJC_MESSAGE_EXPR = CursorKind(104) +# An expression that represents a block literal. +CursorKind.BLOCK_EXPR = CursorKind(105) + # A statement whose specific kind is not exposed via this interface. # # Unexposed statements have the same operations as any other kind of statement; @@ -454,6 +527,10 @@ # the specific kind of the statement is not reported. CursorKind.UNEXPOSED_STMT = CursorKind(200) +# A labelled statement in a function. +CursorKind.LABEL_STMT = CursorKind(201) + + ### # Other Kinds @@ -463,6 +540,23 @@ # traversing the contents of a translation unit. CursorKind.TRANSLATION_UNIT = CursorKind(300) +### +# Attributes + +# An attribute whoe specific kind is note exposed via this interface +CursorKind.UNEXPOSED_ATTR = CursorKind(400) + +CursorKind.IB_ACTION_ATTR = CursorKind(401) +CursorKind.IB_OUTLET_ATTR = CursorKind(402) +CursorKind.IB_OUTLET_COLLECTION_ATTR = CursorKind(403) + +### +# Preprocessing +CursorKind.PREPROCESSING_DIRECTIVE = CursorKind(500) +CursorKind.MACRO_DEFINITION = CursorKind(501) +CursorKind.MACRO_INSTANTIATION = CursorKind(502) +CursorKind.INCLUSION_DIRECTIVE = CursorKind(503) + ### Cursors ### class Cursor(Structure): @@ -592,40 +686,209 @@ _clang_getDiagnostic.restype = c_object_p _clang_disposeDiagnostic = lib.clang_disposeDiagnostic -_clang_disposeDiagnostic.argtypes = [c_object_p] +_clang_disposeDiagnostic.argtypes = [Diagnostic] _clang_getDiagnosticSeverity = lib.clang_getDiagnosticSeverity -_clang_getDiagnosticSeverity.argtypes = [c_object_p] +_clang_getDiagnosticSeverity.argtypes = [Diagnostic] _clang_getDiagnosticSeverity.restype = c_int _clang_getDiagnosticLocation = lib.clang_getDiagnosticLocation -_clang_getDiagnosticLocation.argtypes = [c_object_p] +_clang_getDiagnosticLocation.argtypes = [Diagnostic] _clang_getDiagnosticLocation.restype = SourceLocation _clang_getDiagnosticSpelling = lib.clang_getDiagnosticSpelling -_clang_getDiagnosticSpelling.argtypes = [c_object_p] +_clang_getDiagnosticSpelling.argtypes = [Diagnostic] _clang_getDiagnosticSpelling.restype = _CXString _clang_getDiagnosticSpelling.errcheck = _CXString.from_result _clang_getDiagnosticNumRanges = lib.clang_getDiagnosticNumRanges -_clang_getDiagnosticNumRanges.argtypes = [c_object_p] +_clang_getDiagnosticNumRanges.argtypes = [Diagnostic] _clang_getDiagnosticNumRanges.restype = c_uint _clang_getDiagnosticRange = lib.clang_getDiagnosticRange -_clang_getDiagnosticRange.argtypes = [c_object_p, c_uint] +_clang_getDiagnosticRange.argtypes = [Diagnostic, c_uint] _clang_getDiagnosticRange.restype = SourceRange _clang_getDiagnosticNumFixIts = lib.clang_getDiagnosticNumFixIts -_clang_getDiagnosticNumFixIts.argtypes = [c_object_p] +_clang_getDiagnosticNumFixIts.argtypes = [Diagnostic] _clang_getDiagnosticNumFixIts.restype = c_uint _clang_getDiagnosticFixIt = lib.clang_getDiagnosticFixIt -_clang_getDiagnosticFixIt.argtypes = [c_object_p, c_uint, POINTER(SourceRange)] +_clang_getDiagnosticFixIt.argtypes = [Diagnostic, c_uint, POINTER(SourceRange)] _clang_getDiagnosticFixIt.restype = _CXString _clang_getDiagnosticFixIt.errcheck = _CXString.from_result ### +class CompletionChunk: + class Kind: + def __init__(self, name): + self.name = name + + def __str__(self): + return self.name + + def __repr__(self): + return "" % self + + def __init__(self, completionString, key): + self.cs = completionString + self.key = key + + def __repr__(self): + return "{'" + self.spelling + "', " + str(self.kind) + "}" + + @property + def spelling(self): + return _clang_getCompletionChunkText(self.cs, self.key).spelling + + @property + def kind(self): + res = _clang_getCompletionChunkKind(self.cs, self.key) + return completionChunkKindMap[res] + + @property + def string(self): + res = _clang_getCompletionChunkCompletionString(self.cs, self.key) + + if (res): + return CompletionString(res) + else: + None + + def isKindOptional(self): + return self.kind == completionChunkKindMap[0] + + def isKindTypedText(self): + return self.kind == completionChunkKindMap[1] + + def isKindPlaceHolder(self): + return self.kind == completionChunkKindMap[3] + + def isKindInformative(self): + return self.kind == completionChunkKindMap[4] + + def isKindResultType(self): + return self.kind == completionChunkKindMap[15] + +completionChunkKindMap = { + 0: CompletionChunk.Kind("Optional"), + 1: CompletionChunk.Kind("TypedText"), + 2: CompletionChunk.Kind("Text"), + 3: CompletionChunk.Kind("Placeholder"), + 4: CompletionChunk.Kind("Informative"), + 5: CompletionChunk.Kind("CurrentParameter"), + 6: CompletionChunk.Kind("LeftParen"), + 7: CompletionChunk.Kind("RightParen"), + 8: CompletionChunk.Kind("LeftBracket"), + 9: CompletionChunk.Kind("RightBracket"), + 10: CompletionChunk.Kind("LeftBrace"), + 11: CompletionChunk.Kind("RightBrace"), + 12: CompletionChunk.Kind("LeftAngle"), + 13: CompletionChunk.Kind("RightAngle"), + 14: CompletionChunk.Kind("Comma"), + 15: CompletionChunk.Kind("ResultType"), + 16: CompletionChunk.Kind("Colon"), + 17: CompletionChunk.Kind("SemiColon"), + 18: CompletionChunk.Kind("Equal"), + 19: CompletionChunk.Kind("HorizontalSpace"), + 20: CompletionChunk.Kind("VerticalSpace")} + +class CompletionString(ClangObject): + class Availability: + def __init__(self, name): + self.name = name + + def __str__(self): + return self.name + + def __repr__(self): + return "" % self + + def __len__(self): + return _clang_getNumCompletionChunks(self.obj) + + def __getitem__(self, key): + if len(self) <= key: + raise IndexError + return CompletionChunk(self.obj, key) + + @property + def priority(self): + return _clang_getCompletionPriority(self.obj) + + @property + def availability(self): + res = _clang_getCompletionAvailability(self.obj) + return availabilityKinds[res] + + def __repr__(self): + return " | ".join([str(a) for a in self]) \ + + " || Priority: " + str(self.priority) \ + + " || Availability: " + str(self.availability) + +availabilityKinds = { + 0: CompletionChunk.Kind("Available"), + 1: CompletionChunk.Kind("Deprecated"), + 2: CompletionChunk.Kind("NotAvailable")} + +class CodeCompletionResult(Structure): + _fields_ = [('cursorKind', c_int), ('completionString', c_object_p)] + + def __repr__(self): + return str(CompletionString(self.completionString)) + + @property + def kind(self): + return CursorKind.from_id(self.cursorKind) + + @property + def string(self): + return CompletionString(self.completionString) + +class CCRStructure(Structure): + _fields_ = [('results', POINTER(CodeCompletionResult)), + ('numResults', c_int)] + + def __len__(self): + return self.numResults + + def __getitem__(self, key): + if len(self) <= key: + raise IndexError + + return self.results[key] + +class CodeCompletionResults(ClangObject): + def __init__(self, ptr): + assert isinstance(ptr, POINTER(CCRStructure)) and ptr + self.ptr = self._as_parameter_ = ptr + + def from_param(self): + return self._as_parameter_ + + def __del__(self): + CodeCompletionResults_dispose(self) + + @property + def results(self): + return self.ptr.contents + + @property + def diagnostics(self): + class DiagnosticsItr: + def __init__(self, ccr): + self.ccr= ccr + + def __len__(self): + return int(_clang_codeCompleteGetNumDiagnostics(self.ccr)) + + def __getitem__(self, key): + return _clang_codeCompleteGetDiagnostic(self.ccr, key) + + return DiagnosticsItr(self) + + class Index(ClangObject): """ The Index type provides the primary interface to the Clang CIndex library, @@ -650,7 +913,7 @@ ptr = TranslationUnit_read(self, path) return TranslationUnit(ptr) if ptr else None - def parse(self, path, args = [], unsaved_files = []): + def parse(self, path, args = [], unsaved_files = [], options = 0): """ Load the translation unit from the given source code file by running clang and generating the AST before loading. Additional command line @@ -678,8 +941,9 @@ unsaved_files_array[i].name = name unsaved_files_array[i].contents = value unsaved_files_array[i].length = len(value) - ptr = TranslationUnit_parse(self, path, len(args), arg_array, - len(unsaved_files), unsaved_files_array) + ptr = TranslationUnit_parse(self, path, arg_array, len(args), + unsaved_files_array, len(unsaved_files), + options) return TranslationUnit(ptr) if ptr else None @@ -744,6 +1008,63 @@ return DiagIterator(self) + def reparse(self, unsaved_files = [], options = 0): + """ + Reparse an already parsed translation unit. + + In-memory contents for files can be provided by passing a list of pairs + as unsaved_files, the first items should be the filenames to be mapped + and the second should be the contents to be substituted for the + file. The contents may be passed as strings or file objects. + """ + unsaved_files_array = 0 + if len(unsaved_files): + unsaved_files_array = (_CXUnsavedFile * len(unsaved_files))() + for i,(name,value) in enumerate(unsaved_files): + if not isinstance(value, str): + # FIXME: It would be great to support an efficient version + # of this, one day. + value = value.read() + print value + if not isinstance(value, str): + raise TypeError,'Unexpected unsaved file contents.' + unsaved_files_array[i].name = name + unsaved_files_array[i].contents = value + unsaved_files_array[i].length = len(value) + ptr = TranslationUnit_reparse(self, len(unsaved_files), + unsaved_files_array, + options) + def codeComplete(self, path, line, column, unsaved_files = [], options = 0): + """ + Code complete in this translation unit. + + In-memory contents for files can be provided by passing a list of pairs + as unsaved_files, the first items should be the filenames to be mapped + and the second should be the contents to be substituted for the + file. The contents may be passed as strings or file objects. + """ + unsaved_files_array = 0 + if len(unsaved_files): + unsaved_files_array = (_CXUnsavedFile * len(unsaved_files))() + for i,(name,value) in enumerate(unsaved_files): + if not isinstance(value, str): + # FIXME: It would be great to support an efficient version + # of this, one day. + value = value.read() + print value + if not isinstance(value, str): + raise TypeError,'Unexpected unsaved file contents.' + unsaved_files_array[i].name = name + unsaved_files_array[i].contents = value + unsaved_files_array[i].length = len(value) + ptr = TranslationUnit_codeComplete(self, path, + line, column, + unsaved_files_array, + len(unsaved_files), + options) + return CodeCompletionResults(ptr) if ptr else None + + class File(ClangObject): """ The File class represents a particular source file that is part of a @@ -893,11 +1214,20 @@ TranslationUnit_read.argtypes = [Index, c_char_p] TranslationUnit_read.restype = c_object_p -TranslationUnit_parse = lib.clang_createTranslationUnitFromSourceFile -TranslationUnit_parse.argtypes = [Index, c_char_p, c_int, c_void_p, - c_int, c_void_p] +TranslationUnit_parse = lib.clang_parseTranslationUnit +TranslationUnit_parse.argtypes = [Index, c_char_p, c_void_p, + c_int, c_void_p, c_int, c_int] TranslationUnit_parse.restype = c_object_p +TranslationUnit_reparse = lib.clang_reparseTranslationUnit +TranslationUnit_reparse.argtypes = [TranslationUnit, c_int, c_void_p, c_int] +TranslationUnit_reparse.restype = c_int + +TranslationUnit_codeComplete = lib.clang_codeCompleteAt +TranslationUnit_codeComplete.argtypes = [TranslationUnit, c_char_p, c_int, + c_int, c_void_p, c_int, c_int] +TranslationUnit_codeComplete.restype = POINTER(CCRStructure) + TranslationUnit_cursor = lib.clang_getTranslationUnitCursor TranslationUnit_cursor.argtypes = [TranslationUnit] TranslationUnit_cursor.restype = Cursor @@ -929,7 +1259,46 @@ File_time.argtypes = [File] File_time.restype = c_uint +# Code completion + +CodeCompletionResults_dispose = lib.clang_disposeCodeCompleteResults +CodeCompletionResults_dispose.argtypes = [CodeCompletionResults] + +_clang_codeCompleteGetNumDiagnostics = lib.clang_codeCompleteGetNumDiagnostics +_clang_codeCompleteGetNumDiagnostics.argtypes = [CodeCompletionResults] +_clang_codeCompleteGetNumDiagnostics.restype = c_int + +_clang_codeCompleteGetDiagnostic = lib.clang_codeCompleteGetDiagnostic +_clang_codeCompleteGetDiagnostic.argtypes = [CodeCompletionResults, c_int] +_clang_codeCompleteGetDiagnostic.restype = Diagnostic + +_clang_getCompletionChunkText = lib.clang_getCompletionChunkText +_clang_getCompletionChunkText.argtypes = [c_void_p, c_int] +_clang_getCompletionChunkText.restype = _CXString + +_clang_getCompletionChunkKind = lib.clang_getCompletionChunkKind +_clang_getCompletionChunkKind.argtypes = [c_void_p, c_int] +_clang_getCompletionChunkKind.restype = c_int + +_clang_getCompletionChunkCompletionString = lib.clang_getCompletionChunkCompletionString +_clang_getCompletionChunkCompletionString.argtypes = [c_void_p, c_int] +_clang_getCompletionChunkCompletionString.restype = c_object_p + +_clang_getNumCompletionChunks = lib.clang_getNumCompletionChunks +_clang_getNumCompletionChunks.argtypes = [c_void_p] +_clang_getNumCompletionChunks.restype = c_int + +_clang_getCompletionAvailability = lib.clang_getCompletionAvailability +_clang_getCompletionAvailability.argtypes = [c_void_p] +_clang_getCompletionAvailability.restype = c_int + +_clang_getCompletionPriority = lib.clang_getCompletionPriority +_clang_getCompletionPriority.argtypes = [c_void_p] +_clang_getCompletionPriority.restype = c_int + + ### __all__ = ['Index', 'TranslationUnit', 'Cursor', 'CursorKind', - 'Diagnostic', 'FixIt', 'SourceRange', 'SourceLocation', 'File'] + 'Diagnostic', 'FixIt', 'CodeCompletionResults', 'SourceRange', + 'SourceLocation', 'File'] diff -Nru clang-2.8/tools/clang/bindings/python/tests/cindex/test_diagnostics.py clang-2.9/tools/clang/bindings/python/tests/cindex/test_diagnostics.py --- clang-2.8/tools/clang/bindings/python/tests/cindex/test_diagnostics.py 2010-02-14 10:02:57.000000000 +0000 +++ clang-2.9/tools/clang/bindings/python/tests/cindex/test_diagnostics.py 2011-02-05 17:53:53.000000000 +0000 @@ -3,8 +3,6 @@ def tu_from_source(source): index = Index.create() tu = index.parse('INPUT.c', unsaved_files = [('INPUT.c', source)]) - # FIXME: Remove the need for this. - tu.index = index return tu # FIXME: We need support for invalid translation units to test better. @@ -46,3 +44,26 @@ assert tu.diagnostics[0].fixits[0].range.end.line == 1 assert tu.diagnostics[0].fixits[0].range.end.column == 30 assert tu.diagnostics[0].fixits[0].value == '.f0 = ' + +def test_diagnostic_range(): + index = Index.create() + tu = tu_from_source("""void f() { int i = "a" + 1; }""") + assert len(tu.diagnostics) == 1 + assert tu.diagnostics[0].severity == Diagnostic.Warning + assert tu.diagnostics[0].location.line == 1 + assert tu.diagnostics[0].location.column == 16 + assert tu.diagnostics[0].spelling.startswith('incompatible pointer to') + assert len(tu.diagnostics[0].fixits) == 0 + assert len(tu.diagnostics[0].ranges) == 1 + assert tu.diagnostics[0].ranges[0].start.line == 1 + assert tu.diagnostics[0].ranges[0].start.column == 20 + assert tu.diagnostics[0].ranges[0].end.line == 1 + assert tu.diagnostics[0].ranges[0].end.column == 27 + try: + tu.diagnostics[0].ranges[1].start.line + except IndexError: + assert True + else: + assert False + + diff -Nru clang-2.8/tools/clang/bindings/python/tests/cindex/test_translation_unit.py clang-2.9/tools/clang/bindings/python/tests/cindex/test_translation_unit.py --- clang-2.8/tools/clang/bindings/python/tests/cindex/test_translation_unit.py 2010-02-13 18:33:18.000000000 +0000 +++ clang-2.9/tools/clang/bindings/python/tests/cindex/test_translation_unit.py 2011-02-05 17:54:00.000000000 +0000 @@ -25,16 +25,24 @@ assert spellings[-2] == 'hello' assert spellings[-1] == 'hi' +def test_reparse_arguments(): + path = os.path.join(kInputsDir, 'parse_arguments.c') + index = Index.create() + tu = index.parse(path, ['-DDECL_ONE=hello', '-DDECL_TWO=hi']) + tu.reparse() + spellings = [c.spelling for c in tu.cursor.get_children()] + assert spellings[-2] == 'hello' + assert spellings[-1] == 'hi' + def test_unsaved_files(): index = Index.create() - # FIXME: Why can't we just use "fake.h" here (instead of /tmp/fake.h)? - tu = index.parse('fake.c', unsaved_files = [ + tu = index.parse('fake.c', ['-I./'], unsaved_files = [ ('fake.c', """ -#include "/tmp/fake.h" +#include "fake.h" int x; int SOME_DEFINE; """), - ('/tmp/fake.h', """ + ('./fake.h', """ #define SOME_DEFINE y """) ]) diff -Nru clang-2.8/tools/clang/clang.xcodeproj/project.pbxproj clang-2.9/tools/clang/clang.xcodeproj/project.pbxproj --- clang-2.8/tools/clang/clang.xcodeproj/project.pbxproj 2010-09-03 01:11:38.000000000 +0000 +++ clang-2.9/tools/clang/clang.xcodeproj/project.pbxproj 2011-02-23 00:15:56.000000000 +0000 @@ -6,334 +6,6 @@ objectVersion = 42; objects = { -/* Begin PBXBuildFile section */ - 03F50AC60D416EAA00B9CF60 /* Targets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 03F50AC50D416EAA00B9CF60 /* Targets.cpp */; }; - 1A2193CE0F45EEB700C0713D /* Mangle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2193CC0F45EEB700C0713D /* Mangle.cpp */; }; - 1A2A54B60FD1DD1C00F4CE45 /* ASTConsumers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A50FD1DD1C00F4CE45 /* ASTConsumers.cpp */; }; - 1A2A54B80FD1DD1C00F4CE45 /* CacheTokens.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A70FD1DD1C00F4CE45 /* CacheTokens.cpp */; }; - 1A2A54B90FD1DD1C00F4CE45 /* DependencyFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A80FD1DD1C00F4CE45 /* DependencyFile.cpp */; }; - 1A2A54BA0FD1DD1C00F4CE45 /* DiagChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A90FD1DD1C00F4CE45 /* DiagChecker.cpp */; }; - 1A2A54BB0FD1DD1C00F4CE45 /* DocumentXML.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54AA0FD1DD1C00F4CE45 /* DocumentXML.cpp */; }; - 1A2A54BF0FD1DD1C00F4CE45 /* PrintPreprocessedOutput.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54AE0FD1DD1C00F4CE45 /* PrintPreprocessedOutput.cpp */; }; - 1A2A54C40FD1DD1C00F4CE45 /* StmtXML.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54B30FD1DD1C00F4CE45 /* StmtXML.cpp */; }; - 1A2A54C50FD1DD1C00F4CE45 /* Warnings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54B40FD1DD1C00F4CE45 /* Warnings.cpp */; }; - 1A30A9E90B93A4C800201A91 /* ExprCXX.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1A30A9E80B93A4C800201A91 /* ExprCXX.h */; }; - 1A376A2D0D4AED9B002A1C52 /* CGExprConstant.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A376A2C0D4AED9B002A1C52 /* CGExprConstant.cpp */; }; - 1A471AB50F437BC500753CE8 /* CGBlocks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A471AB40F437BC500753CE8 /* CGBlocks.cpp */; }; - 1A4C41BF105B4C0B0047B5E7 /* CGClass.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A4C41BE105B4C0B0047B5E7 /* CGClass.cpp */; }; - 1A5D5E580E5E81010023C059 /* CGCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5D5E570E5E81010023C059 /* CGCXX.cpp */; }; - 1A621BB7110FE6AA009E6834 /* TargetInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A621BB5110FE6AA009E6834 /* TargetInfo.cpp */; }; - 1A621C4211111D61009E6834 /* CIndexCodeCompletion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A621C3A11111D61009E6834 /* CIndexCodeCompletion.cpp */; }; - 1A621C4311111D61009E6834 /* CIndexer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A621C3B11111D61009E6834 /* CIndexer.cpp */; }; - 1A621C4411111D61009E6834 /* CIndexInclusionStack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A621C3D11111D61009E6834 /* CIndexInclusionStack.cpp */; }; - 1A621C4511111D61009E6834 /* CIndexUSRs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A621C3E11111D61009E6834 /* CIndexUSRs.cpp */; }; - 1A621C4611111D61009E6834 /* CXCursor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A621C3F11111D61009E6834 /* CXCursor.cpp */; }; - 1A6B6CD410693FC900BB4A8F /* CodeCompleteConsumer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6B6CD110693FC900BB4A8F /* CodeCompleteConsumer.cpp */; }; - 1A6B6CD510693FC900BB4A8F /* SemaCodeComplete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6B6CD210693FC900BB4A8F /* SemaCodeComplete.cpp */; }; - 1A6B6E9A1069833600BB4A8F /* CGExprCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6B6E991069833600BB4A8F /* CGExprCXX.cpp */; }; - 1A6C01F7108128710072DEE4 /* CGRTTI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6C01F6108128710072DEE4 /* CGRTTI.cpp */; }; - 1A6FE7090FD6F85800E00CA9 /* CGTemporaries.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6FE7080FD6F85800E00CA9 /* CGTemporaries.cpp */; }; - 1A701B640F7C8FE400FEC4D1 /* SemaAccess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A701B630F7C8FE400FEC4D1 /* SemaAccess.cpp */; }; - 1A7342480C7B57D500122F56 /* CGObjC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A7342470C7B57D500122F56 /* CGObjC.cpp */; }; - 1A81AA19108144F40094E50B /* CGVTables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A81AA18108144F40094E50B /* CGVTables.cpp */; }; - 1A869A700BA2164C008DA07A /* LiteralSupport.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1A869A6E0BA2164C008DA07A /* LiteralSupport.h */; }; - 1A869AA80BA21ABA008DA07A /* LiteralSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A869AA70BA21ABA008DA07A /* LiteralSupport.cpp */; }; - 1A97825B1108BA18002B98FC /* CGVTT.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A97825A1108BA18002B98FC /* CGVTT.cpp */; }; - 1A986AB710D0746D00A8EA9E /* CGDeclCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A986AB610D0746D00A8EA9E /* CGDeclCXX.cpp */; }; - 1ABC36940C7A4BDC006DB0AB /* CGBuiltin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABC36930C7A4BDC006DB0AB /* CGBuiltin.cpp */; }; - 1ABD23D61182449800A48E65 /* APValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23B11182449800A48E65 /* APValue.cpp */; }; - 1ABD23D71182449800A48E65 /* ASTConsumer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23B21182449800A48E65 /* ASTConsumer.cpp */; }; - 1ABD23D81182449800A48E65 /* ASTContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23B31182449800A48E65 /* ASTContext.cpp */; }; - 1ABD23D91182449800A48E65 /* ASTDiagnostic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23B41182449800A48E65 /* ASTDiagnostic.cpp */; }; - 1ABD23DA1182449800A48E65 /* ASTImporter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23B51182449800A48E65 /* ASTImporter.cpp */; }; - 1ABD23DB1182449800A48E65 /* AttrImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23B61182449800A48E65 /* AttrImpl.cpp */; }; - 1ABD23DC1182449800A48E65 /* CXXInheritance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23B71182449800A48E65 /* CXXInheritance.cpp */; }; - 1ABD23DD1182449800A48E65 /* Decl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23B81182449800A48E65 /* Decl.cpp */; }; - 1ABD23DE1182449800A48E65 /* DeclarationName.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23B91182449800A48E65 /* DeclarationName.cpp */; }; - 1ABD23DF1182449800A48E65 /* DeclBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23BA1182449800A48E65 /* DeclBase.cpp */; }; - 1ABD23E01182449800A48E65 /* DeclCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23BB1182449800A48E65 /* DeclCXX.cpp */; }; - 1ABD23E11182449800A48E65 /* DeclFriend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23BC1182449800A48E65 /* DeclFriend.cpp */; }; - 1ABD23E21182449800A48E65 /* DeclGroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23BD1182449800A48E65 /* DeclGroup.cpp */; }; - 1ABD23E31182449800A48E65 /* DeclObjC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23BE1182449800A48E65 /* DeclObjC.cpp */; }; - 1ABD23E41182449800A48E65 /* DeclPrinter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23BF1182449800A48E65 /* DeclPrinter.cpp */; }; - 1ABD23E51182449800A48E65 /* DeclTemplate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23C01182449800A48E65 /* DeclTemplate.cpp */; }; - 1ABD23E61182449800A48E65 /* Expr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23C11182449800A48E65 /* Expr.cpp */; }; - 1ABD23E71182449800A48E65 /* ExprConstant.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23C21182449800A48E65 /* ExprConstant.cpp */; }; - 1ABD23E81182449800A48E65 /* ExprCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23C31182449800A48E65 /* ExprCXX.cpp */; }; - 1ABD23E91182449800A48E65 /* FullExpr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23C41182449800A48E65 /* FullExpr.cpp */; }; - 1ABD23EA1182449800A48E65 /* InheritViz.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23C51182449800A48E65 /* InheritViz.cpp */; }; - 1ABD23EB1182449800A48E65 /* NestedNameSpecifier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23C61182449800A48E65 /* NestedNameSpecifier.cpp */; }; - 1ABD23EC1182449800A48E65 /* ParentMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23C71182449800A48E65 /* ParentMap.cpp */; }; - 1ABD23ED1182449800A48E65 /* RecordLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23C81182449800A48E65 /* RecordLayout.cpp */; }; - 1ABD23EE1182449800A48E65 /* RecordLayoutBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23C91182449800A48E65 /* RecordLayoutBuilder.cpp */; }; - 1ABD23EF1182449800A48E65 /* Stmt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23CB1182449800A48E65 /* Stmt.cpp */; }; - 1ABD23F01182449800A48E65 /* StmtDumper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23CC1182449800A48E65 /* StmtDumper.cpp */; }; - 1ABD23F11182449800A48E65 /* StmtIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23CD1182449800A48E65 /* StmtIterator.cpp */; }; - 1ABD23F21182449800A48E65 /* StmtPrinter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23CE1182449800A48E65 /* StmtPrinter.cpp */; }; - 1ABD23F31182449800A48E65 /* StmtProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23CF1182449800A48E65 /* StmtProfile.cpp */; }; - 1ABD23F41182449800A48E65 /* StmtViz.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23D01182449800A48E65 /* StmtViz.cpp */; }; - 1ABD23F51182449800A48E65 /* TemplateBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23D11182449800A48E65 /* TemplateBase.cpp */; }; - 1ABD23F61182449800A48E65 /* TemplateName.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23D21182449800A48E65 /* TemplateName.cpp */; }; - 1ABD23F71182449800A48E65 /* Type.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23D31182449800A48E65 /* Type.cpp */; }; - 1ABD23F81182449800A48E65 /* TypeLoc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23D41182449800A48E65 /* TypeLoc.cpp */; }; - 1ABD23F91182449800A48E65 /* TypePrinter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23D51182449800A48E65 /* TypePrinter.cpp */; }; - 1ACB57E41105820D0047B991 /* CompilerInstance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB57DB1105820D0047B991 /* CompilerInstance.cpp */; }; - 1ACB57E51105820D0047B991 /* CompilerInvocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB57DC1105820D0047B991 /* CompilerInvocation.cpp */; }; - 1ACB57E61105820D0047B991 /* DeclXML.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB57DD1105820D0047B991 /* DeclXML.cpp */; }; - 1ACB57E71105820D0047B991 /* FrontendAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB57DE1105820D0047B991 /* FrontendAction.cpp */; }; - 1ACB57E81105820D0047B991 /* FrontendActions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB57DF1105820D0047B991 /* FrontendActions.cpp */; }; - 1ACB57E91105820D0047B991 /* FrontendOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB57E01105820D0047B991 /* FrontendOptions.cpp */; }; - 1ACB57EA1105820D0047B991 /* LangStandards.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB57E11105820D0047B991 /* LangStandards.cpp */; }; - 1ACB57EB1105820D0047B991 /* TypeXML.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB57E21105820D0047B991 /* TypeXML.cpp */; }; - 1ACB57EC1105820D0047B991 /* VerifyDiagnosticsClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB57E31105820D0047B991 /* VerifyDiagnosticsClient.cpp */; }; - 1ADF47AF0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ADF47AE0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp */; }; - 1AF1B50F109A4FB800AFAFAC /* CGException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AF1B50E109A4FB800AFAFAC /* CGException.cpp */; }; - 1AFDD8721161085D00AE030A /* ASTMerge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFDD8701161085D00AE030A /* ASTMerge.cpp */; }; - 1AFF8AE31012BFC900D248DA /* CGRecordLayoutBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFF8AE11012BFC900D248DA /* CGRecordLayoutBuilder.cpp */; }; - 3507E4C20E27FE2D00FB7B57 /* CheckObjCInstMethSignature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3507E4C10E27FE2D00FB7B57 /* CheckObjCInstMethSignature.cpp */; }; - 352246E80F5C6BE000D0D279 /* InitHeaderSearch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352246E20F5C6BE000D0D279 /* InitHeaderSearch.cpp */; }; - 352246EB0F5C6BE000D0D279 /* TextDiagnosticBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352246E50F5C6BE000D0D279 /* TextDiagnosticBuffer.cpp */; }; - 352246EC0F5C6BE000D0D279 /* TextDiagnosticPrinter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352246E60F5C6BE000D0D279 /* TextDiagnosticPrinter.cpp */; }; - 352712510DAFE54700C76352 /* IdentifierResolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352712500DAFE54700C76352 /* IdentifierResolver.cpp */; }; - 3534A01D0E129849002709B2 /* ParseCXXInlineMethods.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3534A01C0E129849002709B2 /* ParseCXXInlineMethods.cpp */; }; - 3536456B0E23EBF7009C6509 /* Environment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3536456A0E23EBF7009C6509 /* Environment.cpp */; }; - 3537AA0E0ECD08A4008F7CDC /* PreprocessorLexer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3537AA0D0ECD08A4008F7CDC /* PreprocessorLexer.cpp */; }; - 353959D50EE5F88A00E82461 /* ParseTemplate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 353959D40EE5F88A00E82461 /* ParseTemplate.cpp */; }; - 35475B200E79973F0000BFE4 /* CGCall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35475B1F0E79973F0000BFE4 /* CGCall.cpp */; }; - 355106860E9A8507006A4E44 /* MemRegion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 355106850E9A8507006A4E44 /* MemRegion.cpp */; }; - 3551068C0E9A8546006A4E44 /* ParsePragma.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3551068A0E9A8546006A4E44 /* ParsePragma.cpp */; }; - 3551068D0E9A8546006A4E44 /* ParseTentative.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3551068B0E9A8546006A4E44 /* ParseTentative.cpp */; }; - 3552E7550E520D80003A8CA5 /* PPCaching.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3552E7540E520D80003A8CA5 /* PPCaching.cpp */; }; - 3552E7590E520DD7003A8CA5 /* CGObjCMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3552E7580E520DD7003A8CA5 /* CGObjCMac.cpp */; }; - 35544B880F5C7FD700D92AA9 /* RangeConstraintManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35544B850F5C7FD700D92AA9 /* RangeConstraintManager.cpp */; }; - 35544B890F5C7FD700D92AA9 /* SimpleConstraintManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35544B860F5C7FD700D92AA9 /* SimpleConstraintManager.cpp */; }; - 35544B8C0F5C803200D92AA9 /* SemaTemplateInstantiate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35544B8B0F5C803200D92AA9 /* SemaTemplateInstantiate.cpp */; }; - 35585DC00EAFBC4500D0A97A /* SemaOverload.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35585DBE0EAFBC4500D0A97A /* SemaOverload.cpp */; }; - 3558F76D0E267C8300A5B0DF /* BasicStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3558F76C0E267C8300A5B0DF /* BasicStore.cpp */; }; - 356EF9B50C8F7DDF006650F5 /* LiveVariables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 356EF9B40C8F7DDF006650F5 /* LiveVariables.cpp */; }; - 35707EFE0CD0F5CC000B2204 /* SourceLocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35707EFD0CD0F5CC000B2204 /* SourceLocation.cpp */; }; - 357EA27D0F2526F300439B60 /* SemaLookup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 357EA27C0F2526F300439B60 /* SemaLookup.cpp */; }; - 35862B0D0E3628CB0009F542 /* CheckDeadStores.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35862B0C0E3628CB0009F542 /* CheckDeadStores.cpp */; }; - 35862B120E3629850009F542 /* GRExprEngineInternalChecks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35862B110E3629850009F542 /* GRExprEngineInternalChecks.cpp */; }; - 358CFBB80E65AB04002A8E19 /* BasicConstraintManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 358CFBB70E65AB04002A8E19 /* BasicConstraintManager.cpp */; }; - 358F51520E529AA4007F2102 /* GRState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 358F51510E529AA4007F2102 /* GRState.cpp */; }; - 3591853F0EFB1088000039AF /* SemaTemplate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3591853E0EFB1088000039AF /* SemaTemplate.cpp */; }; - 3593790A0DA48ABA0043B19C /* BugReporter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 359379090DA48ABA0043B19C /* BugReporter.cpp */; }; - 3595AFB80E1C8D62004CDF09 /* CheckObjCDealloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3595AFB70E1C8D62004CDF09 /* CheckObjCDealloc.cpp */; }; - 3599299B0DE2425300A8A33E /* SemaInit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3599299A0DE2425300A8A33E /* SemaInit.cpp */; }; - 35A057E20EAE2D950069249F /* RegionStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35A057E00EAE2D950069249F /* RegionStore.cpp */; }; - 35A057E30EAE2D950069249F /* SVals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35A057E10EAE2D950069249F /* SVals.cpp */; }; - 35A3E7020DD3874400757F74 /* CGDebugInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35A3E7000DD3874400757F74 /* CGDebugInfo.cpp */; }; - 35A8FCF90D9B4B2A001C2F97 /* PathDiagnostic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35A8FCF80D9B4B29001C2F97 /* PathDiagnostic.cpp */; }; - 35BAC1E80E82C5B7003FB76F /* CheckNSError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35BAC1E70E82C5B7003FB76F /* CheckNSError.cpp */; }; - 35D55B270D81D8C60092E734 /* BasicValueFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35D55B240D81D8C60092E734 /* BasicValueFactory.cpp */; }; - 35D55B280D81D8C60092E734 /* CFRefCount.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35D55B250D81D8C60092E734 /* CFRefCount.cpp */; }; - 35E194690ECB82FB00F21733 /* SemaCXXScopeSpec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35E194670ECB82FB00F21733 /* SemaCXXScopeSpec.cpp */; }; - 35E1946A0ECB82FB00F21733 /* SemaCXXCast.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35E194680ECB82FB00F21733 /* SemaCXXCast.cpp */; }; - 35E1946D0ECB83C100F21733 /* PTHLexer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35E1946C0ECB83C100F21733 /* PTHLexer.cpp */; }; - 35EF67700DAD1D2C00B19414 /* SemaDeclCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35EF676F0DAD1D2C00B19414 /* SemaDeclCXX.cpp */; }; - 35EFEFB60DB67ED60020783D /* GRTransferFuncs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35EFEFB50DB67ED60020783D /* GRTransferFuncs.cpp */; }; - 35F2A01E0E36AFF100D17527 /* CheckObjCUnusedIVars.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35F2A01D0E36AFF100D17527 /* CheckObjCUnusedIVars.cpp */; }; - 35F8D0D60D9B82CD00D91C5E /* BasicObjCFoundationChecks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35F8D0D50D9B82CD00D91C5E /* BasicObjCFoundationChecks.cpp */; }; - 57AA9250121C8B9400B4AA6C /* ASTReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57AA924D121C8B9400B4AA6C /* ASTReader.cpp */; }; - 57AA9251121C8B9400B4AA6C /* ASTReaderDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57AA924E121C8B9400B4AA6C /* ASTReaderDecl.cpp */; }; - 57AA9252121C8B9400B4AA6C /* ASTReaderStmt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57AA924F121C8B9400B4AA6C /* ASTReaderStmt.cpp */; }; - 57EB566A121B034300ECA335 /* GeneratePCH.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57EB5662121B034300ECA335 /* GeneratePCH.cpp */; }; - 57EB566B121B034300ECA335 /* Makefile in Sources */ = {isa = PBXBuildFile; fileRef = 57EB5663121B034300ECA335 /* Makefile */; }; - 57F66612121B4DE600DCE3B7 /* ASTWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57F6660F121B4DE600DCE3B7 /* ASTWriter.cpp */; }; - 57F66613121B4DE600DCE3B7 /* ASTWriterDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57F66610121B4DE600DCE3B7 /* ASTWriterDecl.cpp */; }; - 57F66614121B4DE600DCE3B7 /* ASTWriterStmt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57F66611121B4DE600DCE3B7 /* ASTWriterStmt.cpp */; }; - 72D16C1F0D9975C400E6DA4A /* HTMLRewrite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 72D16C1E0D9975C400E6DA4A /* HTMLRewrite.cpp */; }; - 84AF36A10CB17A3B00C820A5 /* DeclObjC.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 84AF36A00CB17A3B00C820A5 /* DeclObjC.h */; }; - 9012911D1048068D0083456D /* ASTUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9012911C1048068D0083456D /* ASTUnit.cpp */; }; - 90129121104812F90083456D /* CIndex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9012911F104812F90083456D /* CIndex.cpp */; }; - 906BF4B00F83BA2E001071FA /* ConvertUTF.c in Sources */ = {isa = PBXBuildFile; fileRef = 906BF4AF0F83BA2E001071FA /* ConvertUTF.c */; }; - 90F9EFAA104ABDED00D09A15 /* c-index-test.c in Sources */ = {isa = PBXBuildFile; fileRef = 90F9EFA9104ABDED00D09A15 /* c-index-test.c */; }; - 90FD6D7B103C3D49005F5B73 /* Analyzer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6D6D103C3D49005F5B73 /* Analyzer.cpp */; }; - 90FD6D7C103C3D49005F5B73 /* ASTLocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6D6E103C3D49005F5B73 /* ASTLocation.cpp */; }; - 90FD6D7D103C3D49005F5B73 /* DeclReferenceMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6D70103C3D49005F5B73 /* DeclReferenceMap.cpp */; }; - 90FD6D7E103C3D49005F5B73 /* Entity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6D71103C3D49005F5B73 /* Entity.cpp */; }; - 90FD6D7F103C3D49005F5B73 /* GlobalSelector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6D73103C3D49005F5B73 /* GlobalSelector.cpp */; }; - 90FD6D80103C3D49005F5B73 /* Handlers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6D74103C3D49005F5B73 /* Handlers.cpp */; }; - 90FD6D81103C3D49005F5B73 /* Indexer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6D75103C3D49005F5B73 /* Indexer.cpp */; }; - 90FD6D82103C3D49005F5B73 /* IndexProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6D76103C3D49005F5B73 /* IndexProvider.cpp */; }; - 90FD6D83103C3D49005F5B73 /* Program.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6D77103C3D49005F5B73 /* Program.cpp */; }; - 90FD6D85103C3D49005F5B73 /* SelectorMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6D7A103C3D49005F5B73 /* SelectorMap.cpp */; }; - 90FD6DB6103D977E005F5B73 /* index-test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6DB5103D977E005F5B73 /* index-test.cpp */; }; - BDF87CF70FD746F300BBF872 /* SemaTemplateDeduction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BDF87CF60FD746F300BBF872 /* SemaTemplateDeduction.cpp */; }; - BF89C3E211595818001C2D68 /* AnalysisBasedWarnings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF89C3E111595818001C2D68 /* AnalysisBasedWarnings.cpp */; }; - BF89C3E91159594A001C2D68 /* SemaObjCProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF89C3E81159594A001C2D68 /* SemaObjCProperty.cpp */; }; - BF89C3F911595A01001C2D68 /* SemaType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF89C3F811595A01001C2D68 /* SemaType.cpp */; }; - BF89C3FB11595A37001C2D68 /* SemaCodeComplete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF89C3FA11595A37001C2D68 /* SemaCodeComplete.cpp */; }; - BF89C3FD11595A5D001C2D68 /* SemaExceptionSpec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF89C3FC11595A5D001C2D68 /* SemaExceptionSpec.cpp */; }; - BF9FEDF91225E67B003A8B71 /* Action.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEDF81225E67B003A8B71 /* Action.cpp */; }; - BF9FEDFB1225E6A9003A8B71 /* AttributeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEDFA1225E6A9003A8B71 /* AttributeList.cpp */; }; - BF9FEDFD1225E6C6003A8B71 /* DeclSpec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEDFC1225E6C6003A8B71 /* DeclSpec.cpp */; }; - BF9FEDFF1225E6DD003A8B71 /* TargetAttributesSema.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEDFE1225E6DD003A8B71 /* TargetAttributesSema.cpp */; }; - BF9FEE021225E73F003A8B71 /* ExprClassification.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEE011225E73F003A8B71 /* ExprClassification.cpp */; }; - BF9FEE041225E759003A8B71 /* ItaniumCXXABI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEE031225E759003A8B71 /* ItaniumCXXABI.cpp */; }; - BF9FEE061225E770003A8B71 /* MicrosoftCXXABI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEE051225E770003A8B71 /* MicrosoftCXXABI.cpp */; }; - BF9FEE2C1225E7EA003A8B71 /* BackendUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEE2B1225E7EA003A8B71 /* BackendUtil.cpp */; }; - BF9FEE311225E86C003A8B71 /* CodeGenAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEE301225E86C003A8B71 /* CodeGenAction.cpp */; }; - BF9FEE331225E898003A8B71 /* ItaniumCXXABI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEE321225E898003A8B71 /* ItaniumCXXABI.cpp */; }; - BF9FEE351225E8B1003A8B71 /* MicrosoftCXXABI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEE341225E8B1003A8B71 /* MicrosoftCXXABI.cpp */; }; - BF9FEE381225E925003A8B71 /* BoostConAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEE371225E925003A8B71 /* BoostConAction.cpp */; }; - BF9FEE521226FE9F003A8B71 /* ParseAST.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEE511226FE9F003A8B71 /* ParseAST.cpp */; }; - BF9FEEF2122D8068003A8B71 /* PreprocessingRecord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEEF1122D8068003A8B71 /* PreprocessingRecord.cpp */; }; - BFE2F6AB11DA955A0007EDC0 /* DeltaTree.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F67D11DA95590007EDC0 /* DeltaTree.d */; }; - BFE2F6AC11DA955A0007EDC0 /* DeltaTree.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F67E11DA955A0007EDC0 /* DeltaTree.o */; }; - BFE2F6AD11DA955A0007EDC0 /* FixItRewriter.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F67F11DA955A0007EDC0 /* FixItRewriter.d */; }; - BFE2F6AE11DA955A0007EDC0 /* FixItRewriter.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F68011DA955A0007EDC0 /* FixItRewriter.o */; }; - BFE2F6AF11DA955A0007EDC0 /* FrontendActions.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68111DA955A0007EDC0 /* FrontendActions.d */; }; - BFE2F6B011DA955A0007EDC0 /* FrontendActions.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F68211DA955A0007EDC0 /* FrontendActions.o */; }; - BFE2F6B111DA955A0007EDC0 /* HTMLPrint.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68311DA955A0007EDC0 /* HTMLPrint.d */; }; - BFE2F6B211DA955A0007EDC0 /* HTMLPrint.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F68411DA955A0007EDC0 /* HTMLPrint.o */; }; - BFE2F6B311DA955A0007EDC0 /* HTMLRewrite.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68511DA955A0007EDC0 /* HTMLRewrite.d */; }; - BFE2F6B411DA955A0007EDC0 /* HTMLRewrite.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F68611DA955A0007EDC0 /* HTMLRewrite.o */; }; - BFE2F6B511DA955A0007EDC0 /* RewriteMacros.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68711DA955A0007EDC0 /* RewriteMacros.d */; }; - BFE2F6B711DA955A0007EDC0 /* RewriteObjC.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68911DA955A0007EDC0 /* RewriteObjC.d */; }; - BFE2F6B911DA955A0007EDC0 /* Rewriter.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68B11DA955A0007EDC0 /* Rewriter.d */; }; - BFE2F6BF11DA955A0007EDC0 /* TokenRewriter.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69111DA955A0007EDC0 /* TokenRewriter.d */; }; - BFE2F6C011DA955A0007EDC0 /* TokenRewriter.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F69211DA955A0007EDC0 /* TokenRewriter.o */; }; - BFE2F6C111DA955A0007EDC0 /* DeltaTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69311DA955A0007EDC0 /* DeltaTree.cpp */; }; - BFE2F6C211DA955A0007EDC0 /* FixItRewriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69411DA955A0007EDC0 /* FixItRewriter.cpp */; }; - BFE2F6C311DA955A0007EDC0 /* FrontendActions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69511DA955A0007EDC0 /* FrontendActions.cpp */; }; - BFE2F6C411DA955A0007EDC0 /* HTMLPrint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69611DA955A0007EDC0 /* HTMLPrint.cpp */; }; - BFE2F6C511DA955A0007EDC0 /* HTMLRewrite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69711DA955A0007EDC0 /* HTMLRewrite.cpp */; }; - BFE2F6C611DA955A0007EDC0 /* Makefile in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69811DA955A0007EDC0 /* Makefile */; }; - BFE2F6C711DA955A0007EDC0 /* DeltaTree.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69B11DA955A0007EDC0 /* DeltaTree.d */; }; - BFE2F6C811DA955A0007EDC0 /* DeltaTree.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F69C11DA955A0007EDC0 /* DeltaTree.o */; }; - BFE2F6C911DA955A0007EDC0 /* HTMLRewrite.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69D11DA955A0007EDC0 /* HTMLRewrite.d */; }; - BFE2F6CA11DA955A0007EDC0 /* HTMLRewrite.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F69E11DA955A0007EDC0 /* HTMLRewrite.o */; }; - BFE2F6CB11DA955A0007EDC0 /* Rewriter.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69F11DA955A0007EDC0 /* Rewriter.d */; }; - BFE2F6CF11DA955A0007EDC0 /* TokenRewriter.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F6A311DA955A0007EDC0 /* TokenRewriter.d */; }; - BFE2F6D011DA955A0007EDC0 /* TokenRewriter.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F6A411DA955A0007EDC0 /* TokenRewriter.o */; }; - BFE2F6D111DA955A0007EDC0 /* RewriteMacros.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F6A511DA955A0007EDC0 /* RewriteMacros.cpp */; }; - BFE2F6D211DA955A0007EDC0 /* RewriteObjC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F6A611DA955A0007EDC0 /* RewriteObjC.cpp */; }; - BFE2F6D311DA955A0007EDC0 /* Rewriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F6A711DA955A0007EDC0 /* Rewriter.cpp */; }; - BFE2F6D411DA955A0007EDC0 /* RewriteRope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F6A811DA955A0007EDC0 /* RewriteRope.cpp */; }; - BFE2F6D511DA955A0007EDC0 /* RewriteTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F6A911DA955A0007EDC0 /* RewriteTest.cpp */; }; - BFE2F6D611DA955A0007EDC0 /* TokenRewriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F6AA11DA955A0007EDC0 /* TokenRewriter.cpp */; }; - DE01DA490B12ADA300AC22CE /* PPCallbacks.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE01DA480B12ADA300AC22CE /* PPCallbacks.h */; }; - DE06756C0C051CFE00EBBFD8 /* ParseExprCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE06756B0C051CFE00EBBFD8 /* ParseExprCXX.cpp */; }; - DE06B73E0A8307640050E87E /* LangOptions.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE06B73D0A8307640050E87E /* LangOptions.h */; }; - DE06D4310A8BB52D0050E87E /* Parser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE06D42F0A8BB52D0050E87E /* Parser.cpp */; }; - DE0FCA630A95859D00248FD5 /* Expr.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE0FCA620A95859D00248FD5 /* Expr.h */; }; - DE1F22030A7D852A00FBF588 /* Parser.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE1F22020A7D852A00FBF588 /* Parser.h */; }; - DE224FF80C7AA98800D370A5 /* CGExprComplex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE224FF70C7AA98800D370A5 /* CGExprComplex.cpp */; }; - DE2252700C7E82D000D370A5 /* CGExprScalar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE22526F0C7E82D000D370A5 /* CGExprScalar.cpp */; }; - DE2255FC0C8004E600D370A5 /* ParseDeclCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE2255FB0C8004E600D370A5 /* ParseDeclCXX.cpp */; }; - DE22BCF20E14197E0094DC60 /* SemaDeclAttr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE22BCF10E14197E0094DC60 /* SemaDeclAttr.cpp */; }; - DE344AB80AE5DF6D00DBC861 /* HeaderSearch.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE344AB70AE5DF6D00DBC861 /* HeaderSearch.h */; }; - DE344B540AE5E46C00DBC861 /* HeaderSearch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE344B530AE5E46C00DBC861 /* HeaderSearch.cpp */; }; - DE3450D70AEB543100DBC861 /* DirectoryLookup.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE3450D60AEB543100DBC861 /* DirectoryLookup.h */; }; - DE3452810AEF1B1800DBC861 /* Stmt.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE3452800AEF1B1800DBC861 /* Stmt.h */; }; - DE345C1A0AFC658B00DBC861 /* StmtVisitor.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE345C190AFC658B00DBC861 /* StmtVisitor.h */; }; - DE3460000AFDCC1900DBC861 /* ParseObjc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE345FFF0AFDCC1900DBC861 /* ParseObjc.cpp */; }; - DE3460050AFDCC6500DBC861 /* ParseInit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE3460040AFDCC6500DBC861 /* ParseInit.cpp */; }; - DE34600B0AFDCCBF00DBC861 /* ParseStmt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE34600A0AFDCCBF00DBC861 /* ParseStmt.cpp */; }; - DE34600F0AFDCCCE00DBC861 /* ParseDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE34600E0AFDCCCE00DBC861 /* ParseDecl.cpp */; }; - DE3460130AFDCCDA00DBC861 /* ParseExpr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE3460120AFDCCDA00DBC861 /* ParseExpr.cpp */; }; - DE3464220B03040900DBC861 /* Type.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE3464210B03040900DBC861 /* Type.h */; }; - DE37252E0FE481AD00CF2CC2 /* Builtins.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE37252D0FE481AD00CF2CC2 /* Builtins.cpp */; }; - DE38CD500D794D0100A273B6 /* CGObjCGNU.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE38CD4F0D794D0100A273B6 /* CGObjCGNU.cpp */; }; - DE3986F00CB8D4B300223765 /* IdentifierTable.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE3986EF0CB8D4B300223765 /* IdentifierTable.h */; }; - DE3986F40CB8D50C00223765 /* IdentifierTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE3986F30CB8D50C00223765 /* IdentifierTable.cpp */; }; - DE4121350D7F1C1C0080F80A /* SymbolManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE4121270D7F1C1C0080F80A /* SymbolManager.cpp */; }; - DE4121360D7F1C1C0080F80A /* ExplodedGraph.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE4121280D7F1C1C0080F80A /* ExplodedGraph.cpp */; }; - DE4121370D7F1C1C0080F80A /* UninitializedValues.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE4121290D7F1C1C0080F80A /* UninitializedValues.cpp */; }; - DE4121380D7F1C1C0080F80A /* GRCoreEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE41212A0D7F1C1C0080F80A /* GRCoreEngine.cpp */; }; - DE41213C0D7F1C1C0080F80A /* GRSimpleVals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE41212F0D7F1C1C0080F80A /* GRSimpleVals.cpp */; }; - DE41213D0D7F1C1C0080F80A /* GRBlockCounter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE4121300D7F1C1C0080F80A /* GRBlockCounter.cpp */; }; - DE41213E0D7F1C1C0080F80A /* GRExprEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE4121310D7F1C1C0080F80A /* GRExprEngine.cpp */; }; - DE4264FC0C113592005A861D /* CGDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE4264FB0C113592005A861D /* CGDecl.cpp */; }; - DE46BF280AE0A82D00CC047C /* TargetInfo.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE46BF270AE0A82D00CC047C /* TargetInfo.h */; }; - DE4772FA0C10EAE5002239E8 /* CGStmt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE4772F90C10EAE5002239E8 /* CGStmt.cpp */; }; - DE4772FC0C10EAEC002239E8 /* CGExpr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE4772FB0C10EAEC002239E8 /* CGExpr.cpp */; }; - DE47999C0D2EBE1A00706D2D /* SemaExprObjC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE47999B0D2EBE1A00706D2D /* SemaExprObjC.cpp */; }; - DE4DC7A30EA1C33E00069E5A /* TokenRewriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE4DC7A20EA1C33E00069E5A /* TokenRewriter.cpp */; }; - DE67E70B0C020EC500F66BC5 /* SemaType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE67E70A0C020EC500F66BC5 /* SemaType.cpp */; }; - DE67E70D0C020ECA00F66BC5 /* SemaStmt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE67E70C0C020ECA00F66BC5 /* SemaStmt.cpp */; }; - DE67E70F0C020ECF00F66BC5 /* SemaExprCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE67E70E0C020ECF00F66BC5 /* SemaExprCXX.cpp */; }; - DE67E7110C020ED400F66BC5 /* SemaExpr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE67E7100C020ED400F66BC5 /* SemaExpr.cpp */; }; - DE67E7130C020ED900F66BC5 /* SemaDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE67E7120C020ED900F66BC5 /* SemaDecl.cpp */; }; - DE67E7170C020EE400F66BC5 /* Sema.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE67E7160C020EE400F66BC5 /* Sema.cpp */; }; - DE6951C70C4D1F5D00A5826B /* RecordLayout.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE6951C60C4D1F5D00A5826B /* RecordLayout.h */; }; - DE6954640C5121BD00A5826B /* Token.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE6954630C5121BD00A5826B /* Token.h */; }; - DE704B260D0FBEBE009C7762 /* SemaDeclObjC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE704B250D0FBEBE009C7762 /* SemaDeclObjC.cpp */; }; - DE704DD20D1668A4009C7762 /* HeaderMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE704DD10D1668A4009C7762 /* HeaderMap.cpp */; }; - DE75ED290B044DC90020CF81 /* ASTContext.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE75ED280B044DC90020CF81 /* ASTContext.h */; }; - DE85CD810D8380B10070E26E /* TokenLexer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE85CD800D8380B10070E26E /* TokenLexer.cpp */; }; - DE85CDA30D8383B20070E26E /* MacroArgs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE85CDA20D8383B20070E26E /* MacroArgs.cpp */; }; - DE85CDAC0D838C120070E26E /* PPMacroExpansion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE85CDAB0D838C120070E26E /* PPMacroExpansion.cpp */; }; - DE85CDB00D838C390070E26E /* PPDirectives.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE85CDAF0D838C390070E26E /* PPDirectives.cpp */; }; - DE85CDB60D839BAE0070E26E /* PPLexerChange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE85CDB50D839BAE0070E26E /* PPLexerChange.cpp */; }; - DE928B130C05659200231DA4 /* ModuleBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE928B120C05659200231DA4 /* ModuleBuilder.cpp */; }; - DE928B200C0565B000231DA4 /* ModuleBuilder.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE928B1F0C0565B000231DA4 /* ModuleBuilder.h */; }; - DE928B7D0C0A615100231DA4 /* CodeGenModule.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE928B7C0C0A615100231DA4 /* CodeGenModule.h */; }; - DE928B7F0C0A615600231DA4 /* CodeGenModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE928B7E0C0A615600231DA4 /* CodeGenModule.cpp */; }; - DE928B810C0A615B00231DA4 /* CodeGenFunction.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE928B800C0A615B00231DA4 /* CodeGenFunction.h */; }; - DE928B830C0A616000231DA4 /* CodeGenFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE928B820C0A616000231DA4 /* CodeGenFunction.cpp */; }; - DEAEE98B0A5A2B970045101B /* MultipleIncludeOpt.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DEAEE98A0A5A2B970045101B /* MultipleIncludeOpt.h */; }; - DEAEED4B0A5AF89A0045101B /* NOTES.txt in CopyFiles */ = {isa = PBXBuildFile; fileRef = DEAEED4A0A5AF89A0045101B /* NOTES.txt */; }; - DEB077990F44F97800F5A2BE /* TokenConcatenation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEB077980F44F97800F5A2BE /* TokenConcatenation.cpp */; }; - DEB07AC80F4A427E00F5A2BE /* SemaAttr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEB07AC70F4A427E00F5A2BE /* SemaAttr.cpp */; }; - DEC8D9910A9433CD00353FCA /* Decl.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DEC8D9900A9433CD00353FCA /* Decl.h */; }; - DEC8D9A40A94346E00353FCA /* AST.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DEC8D9A30A94346E00353FCA /* AST.h */; }; - DECAB0D00DB3C84200E13CCB /* RewriteRope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DECAB0CF0DB3C84200E13CCB /* RewriteRope.cpp */; }; - DECB6D650F9AE26600F5FBC7 /* JumpDiagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DECB6D640F9AE26600F5FBC7 /* JumpDiagnostics.cpp */; }; - DECB6F070F9D93A800F5FBC7 /* InitPreprocessor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DECB6F060F9D93A800F5FBC7 /* InitPreprocessor.cpp */; }; - DED626C90AE0C065001E80A4 /* TargetInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DED626C80AE0C065001E80A4 /* TargetInfo.cpp */; }; - DED7D7410A524295003AD0FB /* Diagnostic.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D7310A524295003AD0FB /* Diagnostic.h */; }; - DED7D7430A524295003AD0FB /* FileManager.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D7330A524295003AD0FB /* FileManager.h */; }; - DED7D7450A524295003AD0FB /* SourceLocation.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D7350A524295003AD0FB /* SourceLocation.h */; }; - DED7D7460A524295003AD0FB /* SourceManager.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D7360A524295003AD0FB /* SourceManager.h */; }; - DED7D7470A524295003AD0FB /* TokenKinds.def in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D7370A524295003AD0FB /* TokenKinds.def */; }; - DED7D7480A524295003AD0FB /* TokenKinds.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D7380A524295003AD0FB /* TokenKinds.h */; }; - DED7D74A0A524295003AD0FB /* Lexer.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D73B0A524295003AD0FB /* Lexer.h */; }; - DED7D74D0A524295003AD0FB /* MacroInfo.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D73E0A524295003AD0FB /* MacroInfo.h */; }; - DED7D74E0A524295003AD0FB /* Pragma.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D73F0A524295003AD0FB /* Pragma.h */; }; - DED7D74F0A524295003AD0FB /* Preprocessor.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D7400A524295003AD0FB /* Preprocessor.h */; }; - DED7D77A0A5242C7003AD0FB /* Diagnostic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DED7D75D0A5242C7003AD0FB /* Diagnostic.cpp */; }; - DED7D77B0A5242C7003AD0FB /* FileManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DED7D75E0A5242C7003AD0FB /* FileManager.cpp */; }; - DED7D7890A5242C7003AD0FB /* SourceManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DED7D76D0A5242C7003AD0FB /* SourceManager.cpp */; }; - DED7D78A0A5242C7003AD0FB /* TokenKinds.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DED7D76E0A5242C7003AD0FB /* TokenKinds.cpp */; }; - DED7D7C30A5242E6003AD0FB /* Lexer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DED7D79E0A5242E6003AD0FB /* Lexer.cpp */; }; - DED7D7C50A5242E6003AD0FB /* MacroInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DED7D7A00A5242E6003AD0FB /* MacroInfo.cpp */; }; - DED7D7C70A5242E6003AD0FB /* PPExpressions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DED7D7A20A5242E6003AD0FB /* PPExpressions.cpp */; }; - DED7D7C80A5242E6003AD0FB /* Pragma.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DED7D7A30A5242E6003AD0FB /* Pragma.cpp */; }; - DED7D7C90A5242E6003AD0FB /* Preprocessor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DED7D7A40A5242E6003AD0FB /* Preprocessor.cpp */; }; - DED7D7D80A524302003AD0FB /* README.txt in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D7D70A524302003AD0FB /* README.txt */; }; - DED7D9180A52518C003AD0FB /* ScratchBuffer.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D9170A52518C003AD0FB /* ScratchBuffer.h */; }; - DED7D9E50A5257F6003AD0FB /* ScratchBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DED7D9E40A5257F6003AD0FB /* ScratchBuffer.cpp */; }; - DEDFE6460F7B3B4E0035BD10 /* driver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEDFE6450F7B3B4E0035BD10 /* driver.cpp */; }; - DEDFE65A0F7B3B830035BD10 /* Types.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEDFE6480F7B3B830035BD10 /* Types.cpp */; }; - DEDFE65B0F7B3B830035BD10 /* Tools.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEDFE64A0F7B3B830035BD10 /* Tools.cpp */; }; - DEDFE65C0F7B3B830035BD10 /* Compilation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEDFE64C0F7B3B830035BD10 /* Compilation.cpp */; }; - DEDFE65D0F7B3B830035BD10 /* ArgList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEDFE64D0F7B3B830035BD10 /* ArgList.cpp */; }; - DEDFE65E0F7B3B830035BD10 /* Arg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEDFE64E0F7B3B830035BD10 /* Arg.cpp */; }; - DEDFE65F0F7B3B830035BD10 /* Action.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEDFE64F0F7B3B830035BD10 /* Action.cpp */; }; - DEDFE6600F7B3B830035BD10 /* Phases.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEDFE6500F7B3B830035BD10 /* Phases.cpp */; }; - DEDFE6610F7B3B830035BD10 /* OptTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEDFE6510F7B3B830035BD10 /* OptTable.cpp */; }; - DEDFE6620F7B3B830035BD10 /* Option.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEDFE6520F7B3B830035BD10 /* Option.cpp */; }; - DEDFE6630F7B3B830035BD10 /* Job.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEDFE6530F7B3B830035BD10 /* Job.cpp */; }; - DEDFE6640F7B3B830035BD10 /* ToolChains.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEDFE6550F7B3B830035BD10 /* ToolChains.cpp */; }; - DEDFE6650F7B3B830035BD10 /* ToolChain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEDFE6560F7B3B830035BD10 /* ToolChain.cpp */; }; - DEDFE6660F7B3B830035BD10 /* Tool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEDFE6570F7B3B830035BD10 /* Tool.cpp */; }; - DEDFE6670F7B3B830035BD10 /* HostInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEDFE6580F7B3B830035BD10 /* HostInfo.cpp */; }; - DEDFE6680F7B3B830035BD10 /* Driver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEDFE6590F7B3B830035BD10 /* Driver.cpp */; }; - DEEBBD440C19C5D200A9FE82 /* TODO.txt in CopyFiles */ = {isa = PBXBuildFile; fileRef = DEEBBD430C19C5D200A9FE82 /* TODO.txt */; }; - DEEBC3BA0C2363B800A9FE82 /* CodeGenTypes.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DEEBC3B90C2363B800A9FE82 /* CodeGenTypes.h */; }; - DEEBC3BC0C2363BC00A9FE82 /* CodeGenTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEEBC3BB0C2363BC00A9FE82 /* CodeGenTypes.cpp */; }; - DEF2E95F0C5FBD74000C4259 /* InternalsManual.html in CopyFiles */ = {isa = PBXBuildFile; fileRef = DEF2E95E0C5FBD74000C4259 /* InternalsManual.html */; }; - DEF2EFF30C6CDD74000C4259 /* CGExprAgg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEF2EFF20C6CDD74000C4259 /* CGExprAgg.cpp */; }; - DEF2F0100C6CFED5000C4259 /* SemaChecking.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEF2F00F0C6CFED5000C4259 /* SemaChecking.cpp */; }; - DEF7D9F70C9C8B1A0001F598 /* Rewriter.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DEF7D9F60C9C8B1A0001F598 /* Rewriter.h */; }; - DEF7D9F90C9C8B1D0001F598 /* Rewriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEF7D9F80C9C8B1D0001F598 /* Rewriter.cpp */; }; - DEFFECA70DB1546600B4E7C3 /* DeltaTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEFFECA60DB1546600B4E7C3 /* DeltaTree.cpp */; }; - E16B523510D30B2400430AC9 /* cc1_main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E16B523410D30B2400430AC9 /* cc1_main.cpp */; }; -/* End PBXBuildFile section */ - /* Begin PBXCopyFilesBuildPhase section */ 8DD76F690486A84900D96B5E /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; @@ -341,46 +13,6 @@ dstPath = /usr/share/man/man1/; dstSubfolderSpec = 0; files = ( - DED7D7410A524295003AD0FB /* Diagnostic.h in CopyFiles */, - DED7D7430A524295003AD0FB /* FileManager.h in CopyFiles */, - DED7D7450A524295003AD0FB /* SourceLocation.h in CopyFiles */, - DED7D7460A524295003AD0FB /* SourceManager.h in CopyFiles */, - DED7D7470A524295003AD0FB /* TokenKinds.def in CopyFiles */, - DED7D7480A524295003AD0FB /* TokenKinds.h in CopyFiles */, - DED7D74A0A524295003AD0FB /* Lexer.h in CopyFiles */, - DED7D74D0A524295003AD0FB /* MacroInfo.h in CopyFiles */, - DED7D74E0A524295003AD0FB /* Pragma.h in CopyFiles */, - DED7D74F0A524295003AD0FB /* Preprocessor.h in CopyFiles */, - DED7D7D80A524302003AD0FB /* README.txt in CopyFiles */, - DED7D9180A52518C003AD0FB /* ScratchBuffer.h in CopyFiles */, - DEAEE98B0A5A2B970045101B /* MultipleIncludeOpt.h in CopyFiles */, - DEAEED4B0A5AF89A0045101B /* NOTES.txt in CopyFiles */, - DE1F22030A7D852A00FBF588 /* Parser.h in CopyFiles */, - DE06B73E0A8307640050E87E /* LangOptions.h in CopyFiles */, - DEC8D9910A9433CD00353FCA /* Decl.h in CopyFiles */, - DEC8D9A40A94346E00353FCA /* AST.h in CopyFiles */, - DE0FCA630A95859D00248FD5 /* Expr.h in CopyFiles */, - DE46BF280AE0A82D00CC047C /* TargetInfo.h in CopyFiles */, - DE344AB80AE5DF6D00DBC861 /* HeaderSearch.h in CopyFiles */, - DE3450D70AEB543100DBC861 /* DirectoryLookup.h in CopyFiles */, - DE3452810AEF1B1800DBC861 /* Stmt.h in CopyFiles */, - DE345C1A0AFC658B00DBC861 /* StmtVisitor.h in CopyFiles */, - DE3464220B03040900DBC861 /* Type.h in CopyFiles */, - DE75ED290B044DC90020CF81 /* ASTContext.h in CopyFiles */, - DE01DA490B12ADA300AC22CE /* PPCallbacks.h in CopyFiles */, - 1A30A9E90B93A4C800201A91 /* ExprCXX.h in CopyFiles */, - 1A869A700BA2164C008DA07A /* LiteralSupport.h in CopyFiles */, - DE928B200C0565B000231DA4 /* ModuleBuilder.h in CopyFiles */, - DE928B7D0C0A615100231DA4 /* CodeGenModule.h in CopyFiles */, - DE928B810C0A615B00231DA4 /* CodeGenFunction.h in CopyFiles */, - DEEBBD440C19C5D200A9FE82 /* TODO.txt in CopyFiles */, - DEEBC3BA0C2363B800A9FE82 /* CodeGenTypes.h in CopyFiles */, - DE6951C70C4D1F5D00A5826B /* RecordLayout.h in CopyFiles */, - DE6954640C5121BD00A5826B /* Token.h in CopyFiles */, - DEF2E95F0C5FBD74000C4259 /* InternalsManual.html in CopyFiles */, - DEF7D9F70C9C8B1A0001F598 /* Rewriter.h in CopyFiles */, - 84AF36A10CB17A3B00C820A5 /* DeclObjC.h in CopyFiles */, - DE3986F00CB8D4B300223765 /* IdentifierTable.h in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 1; }; @@ -412,6 +44,7 @@ 1A30A9E80B93A4C800201A91 /* ExprCXX.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ExprCXX.h; path = clang/AST/ExprCXX.h; sourceTree = ""; tabWidth = 2; }; 1A31B27210ACE6DA009E0C8B /* GlobalDecl.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = GlobalDecl.h; path = lib/CodeGen/GlobalDecl.h; sourceTree = ""; tabWidth = 2; }; 1A376A2C0D4AED9B002A1C52 /* CGExprConstant.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGExprConstant.cpp; path = lib/CodeGen/CGExprConstant.cpp; sourceTree = ""; tabWidth = 2; }; + 1A3D2C4D12A2CD3D0088C44A /* CGCXXABI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CGCXXABI.cpp; path = lib/CodeGen/CGCXXABI.cpp; sourceTree = ""; }; 1A471AB40F437BC500753CE8 /* CGBlocks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGBlocks.cpp; path = lib/CodeGen/CGBlocks.cpp; sourceTree = ""; tabWidth = 2; }; 1A4C41BE105B4C0B0047B5E7 /* CGClass.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGClass.cpp; path = lib/CodeGen/CGClass.cpp; sourceTree = ""; tabWidth = 2; }; 1A535EDB107BC47B000C3AE7 /* CanonicalType.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CanonicalType.h; path = clang/AST/CanonicalType.h; sourceTree = ""; tabWidth = 2; }; @@ -493,6 +126,101 @@ 1ABD23D31182449800A48E65 /* Type.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = Type.cpp; sourceTree = ""; tabWidth = 2; }; 1ABD23D41182449800A48E65 /* TypeLoc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = TypeLoc.cpp; sourceTree = ""; tabWidth = 2; }; 1ABD23D51182449800A48E65 /* TypePrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = TypePrinter.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A67212999D8E006FBC77 /* AnalysisContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = AnalysisContext.cpp; path = lib/Analysis/AnalysisContext.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A67312999D8E006FBC77 /* CFG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CFG.cpp; path = lib/Analysis/CFG.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A67412999D8E006FBC77 /* CFGStmtMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CFGStmtMap.cpp; path = lib/Analysis/CFGStmtMap.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A67512999D8E006FBC77 /* FormatString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = FormatString.cpp; path = lib/Analysis/FormatString.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A67612999D8E006FBC77 /* FormatStringParsing.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = FormatStringParsing.h; path = lib/Analysis/FormatStringParsing.h; sourceTree = ""; tabWidth = 2; }; + 1AC1A67712999D8E006FBC77 /* LiveVariables.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = LiveVariables.cpp; path = lib/Analysis/LiveVariables.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A67812999D8E006FBC77 /* PrintfFormatString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = PrintfFormatString.cpp; path = lib/Analysis/PrintfFormatString.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A67912999D8E006FBC77 /* PseudoConstantAnalysis.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = PseudoConstantAnalysis.cpp; path = lib/Analysis/PseudoConstantAnalysis.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A67A12999D8E006FBC77 /* ReachableCode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ReachableCode.cpp; path = lib/Analysis/ReachableCode.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A67B12999D8E006FBC77 /* ScanfFormatString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ScanfFormatString.cpp; path = lib/Analysis/ScanfFormatString.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A67C12999D8E006FBC77 /* UninitializedValues.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = UninitializedValues.cpp; path = lib/Analysis/UninitializedValues.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6881299A284006FBC77 /* AdjustedReturnValueChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = AdjustedReturnValueChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6891299A284006FBC77 /* AggExprVisitor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = AggExprVisitor.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A68A1299A284006FBC77 /* AnalysisConsumer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = AnalysisConsumer.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A68B1299A284006FBC77 /* AnalysisManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = AnalysisManager.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A68C1299A284006FBC77 /* AnalyzerStatsChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = AnalyzerStatsChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A68D1299A284006FBC77 /* ArrayBoundChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = ArrayBoundChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A68E1299A284006FBC77 /* AttrNonNullChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = AttrNonNullChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A68F1299A284006FBC77 /* BasicConstraintManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = BasicConstraintManager.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6901299A284006FBC77 /* BasicObjCFoundationChecks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = BasicObjCFoundationChecks.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6911299A284006FBC77 /* BasicObjCFoundationChecks.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = BasicObjCFoundationChecks.h; sourceTree = ""; tabWidth = 2; }; + 1AC1A6921299A284006FBC77 /* BasicStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = BasicStore.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6931299A284006FBC77 /* BasicValueFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = BasicValueFactory.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6941299A284006FBC77 /* BugReporter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = BugReporter.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6951299A284006FBC77 /* BugReporterVisitors.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = BugReporterVisitors.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6961299A284006FBC77 /* BuiltinFunctionChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = BuiltinFunctionChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6971299A284006FBC77 /* CallAndMessageChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = CallAndMessageChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6981299A284006FBC77 /* CastSizeChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = CastSizeChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6991299A284006FBC77 /* CastToStructChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = CastToStructChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A69A1299A284006FBC77 /* CFRefCount.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = CFRefCount.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A69B1299A284006FBC77 /* CheckDeadStores.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = CheckDeadStores.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A69C1299A284006FBC77 /* Checker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = Checker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A69D1299A284006FBC77 /* CheckerHelpers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = CheckerHelpers.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A69E1299A284006FBC77 /* CheckObjCDealloc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = CheckObjCDealloc.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A69F1299A284006FBC77 /* CheckObjCInstMethSignature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = CheckObjCInstMethSignature.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6A01299A284006FBC77 /* CheckSecuritySyntaxOnly.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = CheckSecuritySyntaxOnly.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6A11299A284006FBC77 /* CheckSizeofPointer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = CheckSizeofPointer.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6A21299A284006FBC77 /* ChrootChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = ChrootChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6A41299A284006FBC77 /* CocoaConventions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = CocoaConventions.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6A51299A284006FBC77 /* CStringChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = CStringChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7DC1299A285006FBC77 /* DereferenceChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = DereferenceChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7DD1299A285006FBC77 /* DivZeroChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = DivZeroChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7DE1299A285006FBC77 /* Environment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = Environment.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7DF1299A285006FBC77 /* ExplodedGraph.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = ExplodedGraph.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7E01299A285006FBC77 /* FixedAddressChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = FixedAddressChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7E11299A285006FBC77 /* FlatStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = FlatStore.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7E21299A285006FBC77 /* FrontendActions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = FrontendActions.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7E31299A285006FBC77 /* GRBlockCounter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = GRBlockCounter.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7E41299A285006FBC77 /* GRCoreEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = GRCoreEngine.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7E51299A285006FBC77 /* GRCXXExprEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = GRCXXExprEngine.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7E61299A285006FBC77 /* GRExprEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = GRExprEngine.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7E71299A285006FBC77 /* GRExprEngineExperimentalChecks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = GRExprEngineExperimentalChecks.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7E81299A285006FBC77 /* GRExprEngineExperimentalChecks.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = GRExprEngineExperimentalChecks.h; sourceTree = ""; tabWidth = 2; }; + 1AC1A7E91299A285006FBC77 /* GRExprEngineInternalChecks.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = GRExprEngineInternalChecks.h; sourceTree = ""; tabWidth = 2; }; + 1AC1A7EA1299A285006FBC77 /* GRState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = GRState.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7EB1299A285006FBC77 /* HTMLDiagnostics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLDiagnostics.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7EC1299A285006FBC77 /* IdempotentOperationChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = IdempotentOperationChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7ED1299A285006FBC77 /* LLVMConventionsChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = LLVMConventionsChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7EE1299A285006FBC77 /* MacOSXAPIChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = MacOSXAPIChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7F01299A285006FBC77 /* MallocChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = MallocChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7F11299A285006FBC77 /* ManagerRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = ManagerRegistry.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7F21299A285006FBC77 /* MemRegion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = MemRegion.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7F31299A285006FBC77 /* NoReturnFunctionChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = NoReturnFunctionChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7F41299A285006FBC77 /* NSAutoreleasePoolChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = NSAutoreleasePoolChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7F51299A285006FBC77 /* NSErrorChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = NSErrorChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7F61299A285006FBC77 /* ObjCAtSyncChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = ObjCAtSyncChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7F71299A285006FBC77 /* ObjCUnusedIVarsChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = ObjCUnusedIVarsChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7F81299A285006FBC77 /* OSAtomicChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = OSAtomicChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7F91299A285006FBC77 /* PathDiagnostic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = PathDiagnostic.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7FA1299A285006FBC77 /* PlistDiagnostics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = PlistDiagnostics.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7FB1299A285006FBC77 /* PointerArithChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = PointerArithChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7FC1299A285006FBC77 /* PointerSubChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = PointerSubChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7FD1299A285006FBC77 /* PthreadLockChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = PthreadLockChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7FE1299A285006FBC77 /* RangeConstraintManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = RangeConstraintManager.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A8001299A285006FBC77 /* RegionStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = RegionStore.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9DB1299A287006FBC77 /* ReturnPointerRangeChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = ReturnPointerRangeChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9DC1299A287006FBC77 /* ReturnUndefChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = ReturnUndefChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9DD1299A287006FBC77 /* SimpleConstraintManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = SimpleConstraintManager.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9DE1299A287006FBC77 /* SimpleConstraintManager.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = SimpleConstraintManager.h; sourceTree = ""; tabWidth = 2; }; + 1AC1A9DF1299A287006FBC77 /* SimpleSValuator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = SimpleSValuator.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9E01299A287006FBC77 /* StackAddrLeakChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = StackAddrLeakChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9E11299A287006FBC77 /* Store.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = Store.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9E21299A287006FBC77 /* StreamChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = StreamChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9E31299A287006FBC77 /* SVals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = SVals.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9E41299A287006FBC77 /* SValuator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = SValuator.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9E51299A287006FBC77 /* SymbolManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolManager.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9E61299A287006FBC77 /* UndefBranchChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = UndefBranchChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9E71299A287006FBC77 /* UndefCapturedBlockVarChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = UndefCapturedBlockVarChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9E81299A287006FBC77 /* UndefinedArraySubscriptChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = UndefinedArraySubscriptChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9E91299A287006FBC77 /* UndefinedAssignmentChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = UndefinedAssignmentChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9EA1299A287006FBC77 /* UndefResultChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = UndefResultChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9EB1299A287006FBC77 /* UnixAPIChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = UnixAPIChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9EC1299A287006FBC77 /* UnreachableCodeChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = UnreachableCodeChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9ED1299A287006FBC77 /* ValueManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = ValueManager.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9EE1299A287006FBC77 /* VLASizeChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = VLASizeChecker.cpp; sourceTree = ""; tabWidth = 2; }; 1ACB57DB1105820D0047B991 /* CompilerInstance.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CompilerInstance.cpp; path = lib/Frontend/CompilerInstance.cpp; sourceTree = ""; }; 1ACB57DC1105820D0047B991 /* CompilerInvocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CompilerInvocation.cpp; path = lib/Frontend/CompilerInvocation.cpp; sourceTree = ""; }; 1ACB57DD1105820D0047B991 /* DeclXML.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DeclXML.cpp; path = lib/Frontend/DeclXML.cpp; sourceTree = ""; }; @@ -504,10 +232,12 @@ 1ACB57E31105820D0047B991 /* VerifyDiagnosticsClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VerifyDiagnosticsClient.cpp; path = lib/Frontend/VerifyDiagnosticsClient.cpp; sourceTree = ""; }; 1ADF47AE0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaTemplateInstantiateDecl.cpp; path = lib/Sema/SemaTemplateInstantiateDecl.cpp; sourceTree = ""; tabWidth = 2; }; 1AE4EE3B103B89CA00888A23 /* TreeTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = TreeTransform.h; path = lib/Sema/TreeTransform.h; sourceTree = ""; tabWidth = 2; }; + 1AECEFAF12DE387800F1D539 /* AnalysisContext.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = AnalysisContext.h; path = clang/Analysis/AnalysisContext.h; sourceTree = ""; tabWidth = 2; }; + 1AECEFB012DE387800F1D539 /* CFG.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CFG.h; path = clang/Analysis/CFG.h; sourceTree = ""; tabWidth = 2; }; + 1AECEFB112DE387800F1D539 /* CFGStmtMap.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CFGStmtMap.h; path = clang/Analysis/CFGStmtMap.h; sourceTree = ""; tabWidth = 2; }; 1AF1B50E109A4FB800AFAFAC /* CGException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGException.cpp; path = lib/CodeGen/CGException.cpp; sourceTree = ""; tabWidth = 2; }; 1AFDD8701161085D00AE030A /* ASTMerge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ASTMerge.cpp; path = lib/Frontend/ASTMerge.cpp; sourceTree = ""; }; 1AFF8AE11012BFC900D248DA /* CGRecordLayoutBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGRecordLayoutBuilder.cpp; path = lib/CodeGen/CGRecordLayoutBuilder.cpp; sourceTree = ""; tabWidth = 2; }; - 3507E4C10E27FE2D00FB7B57 /* CheckObjCInstMethSignature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CheckObjCInstMethSignature.cpp; path = lib/Analysis/CheckObjCInstMethSignature.cpp; sourceTree = ""; }; 352246E20F5C6BE000D0D279 /* InitHeaderSearch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InitHeaderSearch.cpp; path = lib/Frontend/InitHeaderSearch.cpp; sourceTree = ""; }; 352246E50F5C6BE000D0D279 /* TextDiagnosticBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TextDiagnosticBuffer.cpp; path = lib/Frontend/TextDiagnosticBuffer.cpp; sourceTree = ""; }; 352246E60F5C6BE000D0D279 /* TextDiagnosticPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TextDiagnosticPrinter.cpp; path = lib/Frontend/TextDiagnosticPrinter.cpp; sourceTree = ""; }; @@ -517,7 +247,6 @@ 352C19DE0CA321C80045DB98 /* CFGStmtVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFGStmtVisitor.h; path = clang/Analysis/Visitors/CFGStmtVisitor.h; sourceTree = ""; }; 352C19DF0CA321C80045DB98 /* CFGVarDeclVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFGVarDeclVisitor.h; path = clang/Analysis/Visitors/CFGVarDeclVisitor.h; sourceTree = ""; }; 3534A01C0E129849002709B2 /* ParseCXXInlineMethods.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParseCXXInlineMethods.cpp; path = lib/Parse/ParseCXXInlineMethods.cpp; sourceTree = ""; tabWidth = 2; }; - 3536456A0E23EBF7009C6509 /* Environment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Environment.cpp; path = lib/Analysis/Environment.cpp; sourceTree = ""; }; 3536457C0E2406B0009C6509 /* Environment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Environment.h; path = clang/Analysis/PathSensitive/Environment.h; sourceTree = ""; }; 3537AA0C0ECD088F008F7CDC /* BlkExprDeclBitVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BlkExprDeclBitVector.h; path = clang/Analysis/Support/BlkExprDeclBitVector.h; sourceTree = ""; }; 3537AA0D0ECD08A4008F7CDC /* PreprocessorLexer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PreprocessorLexer.cpp; sourceTree = ""; }; @@ -527,7 +256,6 @@ 35475B1F0E79973F0000BFE4 /* CGCall.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGCall.cpp; path = lib/CodeGen/CGCall.cpp; sourceTree = ""; tabWidth = 2; }; 35475B220E7997680000BFE4 /* CGCall.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CGCall.h; path = lib/CodeGen/CGCall.h; sourceTree = ""; tabWidth = 2; }; 35475B230E7997680000BFE4 /* CGValue.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CGValue.h; path = lib/CodeGen/CGValue.h; sourceTree = ""; tabWidth = 2; }; - 355106850E9A8507006A4E44 /* MemRegion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MemRegion.cpp; path = lib/Analysis/MemRegion.cpp; sourceTree = ""; }; 355106880E9A851B006A4E44 /* MemRegion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MemRegion.h; path = clang/Analysis/PathSensitive/MemRegion.h; sourceTree = ""; }; 3551068A0E9A8546006A4E44 /* ParsePragma.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParsePragma.cpp; path = lib/Parse/ParsePragma.cpp; sourceTree = ""; tabWidth = 2; }; 3551068B0E9A8546006A4E44 /* ParseTentative.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParseTentative.cpp; path = lib/Parse/ParseTentative.cpp; sourceTree = ""; tabWidth = 2; }; @@ -535,48 +263,28 @@ 3552E7540E520D80003A8CA5 /* PPCaching.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCaching.cpp; sourceTree = ""; }; 3552E7580E520DD7003A8CA5 /* CGObjCMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGObjCMac.cpp; path = lib/CodeGen/CGObjCMac.cpp; sourceTree = ""; tabWidth = 2; }; 3553EB9A0E5F7089007D7359 /* GRStateTrait.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GRStateTrait.h; path = clang/Analysis/PathSensitive/GRStateTrait.h; sourceTree = ""; }; - 35544B850F5C7FD700D92AA9 /* RangeConstraintManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RangeConstraintManager.cpp; path = lib/Analysis/RangeConstraintManager.cpp; sourceTree = ""; }; - 35544B860F5C7FD700D92AA9 /* SimpleConstraintManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SimpleConstraintManager.cpp; path = lib/Analysis/SimpleConstraintManager.cpp; sourceTree = ""; }; - 35544B870F5C7FD700D92AA9 /* SimpleConstraintManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SimpleConstraintManager.h; path = lib/Analysis/SimpleConstraintManager.h; sourceTree = ""; }; 35544B8B0F5C803200D92AA9 /* SemaTemplateInstantiate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaTemplateInstantiate.cpp; path = lib/Sema/SemaTemplateInstantiate.cpp; sourceTree = ""; tabWidth = 2; }; 35585DBE0EAFBC4500D0A97A /* SemaOverload.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaOverload.cpp; path = lib/Sema/SemaOverload.cpp; sourceTree = ""; tabWidth = 2; }; - 3558F76C0E267C8300A5B0DF /* BasicStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BasicStore.cpp; path = lib/Analysis/BasicStore.cpp; sourceTree = ""; }; 3558F76F0E267C9A00A5B0DF /* Store.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Store.h; path = clang/Analysis/PathSensitive/Store.h; sourceTree = ""; }; - 355CF6820C90A8B600A08AA3 /* LocalCheckers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LocalCheckers.h; path = clang/Analysis/LocalCheckers.h; sourceTree = ""; }; - 356B89760D9BFDC100CBEBE9 /* BasicObjCFoundationChecks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BasicObjCFoundationChecks.h; path = lib/Analysis/BasicObjCFoundationChecks.h; sourceTree = ""; }; - 356EF9B40C8F7DDF006650F5 /* LiveVariables.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LiveVariables.cpp; path = lib/Analysis/LiveVariables.cpp; sourceTree = ""; }; 35707EFD0CD0F5CC000B2204 /* SourceLocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = SourceLocation.cpp; sourceTree = ""; tabWidth = 2; }; 357EA27C0F2526F300439B60 /* SemaLookup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaLookup.cpp; path = lib/Sema/SemaLookup.cpp; sourceTree = ""; tabWidth = 2; }; 35847BE30CC7DB9000C40FFF /* StmtIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = StmtIterator.h; path = clang/AST/StmtIterator.h; sourceTree = ""; tabWidth = 2; }; - 35862B0C0E3628CB0009F542 /* CheckDeadStores.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CheckDeadStores.cpp; path = lib/Analysis/CheckDeadStores.cpp; sourceTree = ""; }; - 35862B110E3629850009F542 /* GRExprEngineInternalChecks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GRExprEngineInternalChecks.cpp; path = lib/Analysis/GRExprEngineInternalChecks.cpp; sourceTree = ""; }; - 358CFBB70E65AB04002A8E19 /* BasicConstraintManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BasicConstraintManager.cpp; path = lib/Analysis/BasicConstraintManager.cpp; sourceTree = ""; }; 358D23090E8BEB850003DDCC /* DeclGroup.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = DeclGroup.h; path = clang/AST/DeclGroup.h; sourceTree = ""; tabWidth = 2; }; 358F514F0E529A87007F2102 /* GRState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GRState.h; path = clang/Analysis/PathSensitive/GRState.h; sourceTree = ""; }; - 358F51510E529AA4007F2102 /* GRState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GRState.cpp; path = lib/Analysis/GRState.cpp; sourceTree = ""; }; 3591853E0EFB1088000039AF /* SemaTemplate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaTemplate.cpp; path = lib/Sema/SemaTemplate.cpp; sourceTree = ""; tabWidth = 2; }; 359378FF0DA486490043B19C /* BugReporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BugReporter.h; path = clang/Analysis/PathSensitive/BugReporter.h; sourceTree = ""; }; - 359379090DA48ABA0043B19C /* BugReporter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BugReporter.cpp; path = lib/Analysis/BugReporter.cpp; sourceTree = ""; }; - 3595AFB70E1C8D62004CDF09 /* CheckObjCDealloc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CheckObjCDealloc.cpp; path = lib/Analysis/CheckObjCDealloc.cpp; sourceTree = ""; }; 3598EBEB0EDE23EF0070CA16 /* PTHManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTHManager.h; sourceTree = ""; }; 3599299A0DE2425300A8A33E /* SemaInit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaInit.cpp; path = lib/Sema/SemaInit.cpp; sourceTree = ""; tabWidth = 2; }; 35A057D20EAE2D2B0069249F /* SVals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SVals.h; path = clang/Analysis/PathSensitive/SVals.h; sourceTree = ""; }; - 35A057E00EAE2D950069249F /* RegionStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegionStore.cpp; path = lib/Analysis/RegionStore.cpp; sourceTree = ""; }; - 35A057E10EAE2D950069249F /* SVals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SVals.cpp; path = lib/Analysis/SVals.cpp; sourceTree = ""; }; 35A3E7000DD3874400757F74 /* CGDebugInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGDebugInfo.cpp; path = lib/CodeGen/CGDebugInfo.cpp; sourceTree = ""; tabWidth = 2; wrapsLines = 1; }; 35A3E7010DD3874400757F74 /* CGDebugInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CGDebugInfo.h; path = lib/CodeGen/CGDebugInfo.h; sourceTree = ""; tabWidth = 2; }; - 35A8FCF60D9B4ADD001C2F97 /* ProgramPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProgramPoint.h; path = clang/Analysis/ProgramPoint.h; sourceTree = ""; }; - 35A8FCF70D9B4ADD001C2F97 /* PathDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PathDiagnostic.h; path = clang/Analysis/PathDiagnostic.h; sourceTree = ""; }; - 35A8FCF80D9B4B29001C2F97 /* PathDiagnostic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PathDiagnostic.cpp; path = lib/Analysis/PathDiagnostic.cpp; sourceTree = ""; }; + 35A8FCF60D9B4ADD001C2F97 /* ProgramPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ProgramPoint.h; path = clang/Analysis/ProgramPoint.h; sourceTree = ""; tabWidth = 2; }; 35B820740ECB811A0020BEC0 /* PreprocessorLexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PreprocessorLexer.h; sourceTree = ""; }; - 35BAC1E70E82C5B7003FB76F /* CheckNSError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CheckNSError.cpp; path = lib/Analysis/CheckNSError.cpp; sourceTree = ""; }; 35BFBD2B0C9EDE1E006CB644 /* ASTConsumer.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ASTConsumer.h; path = clang/AST/ASTConsumer.h; sourceTree = ""; tabWidth = 2; }; 35CEA05A0DF9E82700A41296 /* ExprObjC.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ExprObjC.h; path = clang/AST/ExprObjC.h; sourceTree = ""; tabWidth = 2; }; 35CFFE010CA1CBDD00E6F2BE /* StmtGraphTraits.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = StmtGraphTraits.h; path = clang/AST/StmtGraphTraits.h; sourceTree = ""; tabWidth = 2; }; 35D1DDD10CA9C6D50096E967 /* DataflowSolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DataflowSolver.h; path = clang/Analysis/FlowSensitive/DataflowSolver.h; sourceTree = ""; }; 35D1DDD20CA9C6D50096E967 /* DataflowValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DataflowValues.h; path = clang/Analysis/FlowSensitive/DataflowValues.h; sourceTree = ""; }; - 35D55B240D81D8C60092E734 /* BasicValueFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BasicValueFactory.cpp; path = lib/Analysis/BasicValueFactory.cpp; sourceTree = ""; }; - 35D55B250D81D8C60092E734 /* CFRefCount.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CFRefCount.cpp; path = lib/Analysis/CFRefCount.cpp; sourceTree = ""; }; 35D55B290D81D8E50092E734 /* BasicValueFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BasicValueFactory.h; path = clang/Analysis/PathSensitive/BasicValueFactory.h; sourceTree = ""; }; 35E194670ECB82FB00F21733 /* SemaCXXScopeSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaCXXScopeSpec.cpp; path = lib/Sema/SemaCXXScopeSpec.cpp; sourceTree = ""; tabWidth = 2; }; 35E194680ECB82FB00F21733 /* SemaCXXCast.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaCXXCast.cpp; path = lib/Sema/SemaCXXCast.cpp; sourceTree = ""; tabWidth = 2; }; @@ -584,13 +292,10 @@ 35EE48AD0E0C4CB200715C54 /* DeclCXX.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = DeclCXX.h; path = clang/AST/DeclCXX.h; sourceTree = ""; tabWidth = 2; }; 35EE48AE0E0C4CB200715C54 /* ParentMap.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ParentMap.h; path = clang/AST/ParentMap.h; sourceTree = ""; tabWidth = 2; }; 35EF676F0DAD1D2C00B19414 /* SemaDeclCXX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaDeclCXX.cpp; path = lib/Sema/SemaDeclCXX.cpp; sourceTree = ""; tabWidth = 2; }; - 35EFEFB50DB67ED60020783D /* GRTransferFuncs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GRTransferFuncs.cpp; path = lib/Analysis/GRTransferFuncs.cpp; sourceTree = ""; }; 35F1ACE60E66166C001F4532 /* ConstraintManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ConstraintManager.h; path = clang/Analysis/PathSensitive/ConstraintManager.h; sourceTree = ""; }; - 35F2A01D0E36AFF100D17527 /* CheckObjCUnusedIVars.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CheckObjCUnusedIVars.cpp; path = lib/Analysis/CheckObjCUnusedIVars.cpp; sourceTree = ""; }; 35F2BE7B0DAC2963006E7668 /* HTMLRewrite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLRewrite.h; path = clang/Rewrite/HTMLRewrite.h; sourceTree = ""; }; 35F8D0CA0D9B7E8200D91C5E /* GRSimpleAPICheck.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GRSimpleAPICheck.h; path = clang/Analysis/PathSensitive/GRSimpleAPICheck.h; sourceTree = ""; }; 35F8D0CB0D9B7E8200D91C5E /* GRAuditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GRAuditor.h; path = clang/Analysis/PathSensitive/GRAuditor.h; sourceTree = ""; }; - 35F8D0D50D9B82CD00D91C5E /* BasicObjCFoundationChecks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BasicObjCFoundationChecks.cpp; path = lib/Analysis/BasicObjCFoundationChecks.cpp; sourceTree = ""; }; 35F9B1550D1C6B2E00DDFDAE /* LiveVariables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LiveVariables.h; path = clang/Analysis/Analyses/LiveVariables.h; sourceTree = ""; }; 35F9B1560D1C6B2E00DDFDAE /* UninitializedValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UninitializedValues.h; path = clang/Analysis/Analyses/UninitializedValues.h; sourceTree = ""; }; 574F4C25121B4EF000AEAC20 /* ASTWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTWriter.h; path = clang/Serialization/ASTWriter.h; sourceTree = ""; }; @@ -599,9 +304,6 @@ 57AA924F121C8B9400B4AA6C /* ASTReaderStmt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASTReaderStmt.cpp; sourceTree = ""; }; 57E15B21121C8D2B0051C2CC /* ASTDeserializationListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTDeserializationListener.h; path = clang/Serialization/ASTDeserializationListener.h; sourceTree = ""; }; 57E15B22121C8D2B0051C2CC /* ASTReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTReader.h; path = clang/Serialization/ASTReader.h; sourceTree = ""; }; - 57EB5661121B034300ECA335 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; - 57EB5662121B034300ECA335 /* GeneratePCH.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeneratePCH.cpp; sourceTree = ""; }; - 57EB5663121B034300ECA335 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; 57F6660F121B4DE600DCE3B7 /* ASTWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASTWriter.cpp; sourceTree = ""; }; 57F66610121B4DE600DCE3B7 /* ASTWriterDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASTWriterDecl.cpp; sourceTree = ""; }; 57F66611121B4DE600DCE3B7 /* ASTWriterStmt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASTWriterStmt.cpp; sourceTree = ""; }; @@ -665,6 +367,99 @@ 90FD6D90103C3D80005F5B73 /* TypeXML.def */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = TypeXML.def; path = clang/Frontend/TypeXML.def; sourceTree = ""; }; 90FD6D91103C3D80005F5B73 /* Utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Utils.h; path = clang/Frontend/Utils.h; sourceTree = ""; }; 90FD6DB5103D977E005F5B73 /* index-test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "index-test.cpp"; path = "tools/index-test/index-test.cpp"; sourceTree = ""; }; + BB5C372812A5057500259F53 /* DumpXML.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DumpXML.cpp; path = /Volumes/Data/llvm/tools/clang/lib/AST/DumpXML.cpp; sourceTree = ""; }; + BBA5AB141309C2FA000B38F1 /* AdjustedReturnValueChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AdjustedReturnValueChecker.cpp; sourceTree = ""; }; + BBA5AB151309C2FA000B38F1 /* AnalyzerStatsChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnalyzerStatsChecker.cpp; sourceTree = ""; }; + BBA5AB161309C2FA000B38F1 /* ArrayBoundChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArrayBoundChecker.cpp; sourceTree = ""; }; + BBA5AB171309C2FA000B38F1 /* ArrayBoundCheckerV2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArrayBoundCheckerV2.cpp; sourceTree = ""; }; + BBA5AB181309C2FA000B38F1 /* AttrNonNullChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AttrNonNullChecker.cpp; sourceTree = ""; }; + BBA5AB191309C2FA000B38F1 /* BasicObjCFoundationChecks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BasicObjCFoundationChecks.cpp; sourceTree = ""; }; + BBA5AB1A1309C2FA000B38F1 /* BasicObjCFoundationChecks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BasicObjCFoundationChecks.h; sourceTree = ""; }; + BBA5AB1B1309C2FA000B38F1 /* BuiltinFunctionChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BuiltinFunctionChecker.cpp; sourceTree = ""; }; + BBA5AB1C1309C2FA000B38F1 /* CallAndMessageChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CallAndMessageChecker.cpp; sourceTree = ""; }; + BBA5AB1D1309C2FA000B38F1 /* CastSizeChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CastSizeChecker.cpp; sourceTree = ""; }; + BBA5AB1E1309C2FA000B38F1 /* CastToStructChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CastToStructChecker.cpp; sourceTree = ""; }; + BBA5AB1F1309C2FA000B38F1 /* Checkers.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Checkers.td; sourceTree = ""; }; + BBA5AB201309C2FA000B38F1 /* CheckObjCDealloc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CheckObjCDealloc.cpp; sourceTree = ""; }; + BBA5AB211309C2FA000B38F1 /* CheckObjCInstMethSignature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CheckObjCInstMethSignature.cpp; sourceTree = ""; }; + BBA5AB221309C2FA000B38F1 /* CheckSecuritySyntaxOnly.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CheckSecuritySyntaxOnly.cpp; sourceTree = ""; }; + BBA5AB231309C2FA000B38F1 /* CheckSizeofPointer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CheckSizeofPointer.cpp; sourceTree = ""; }; + BBA5AB241309C2FA000B38F1 /* ChrootChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ChrootChecker.cpp; sourceTree = ""; }; + BBA5AB251309C2FA000B38F1 /* ClangSACheckerProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ClangSACheckerProvider.cpp; sourceTree = ""; }; + BBA5AB261309C2FA000B38F1 /* ClangSACheckerProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClangSACheckerProvider.h; sourceTree = ""; }; + BBA5AB271309C2FA000B38F1 /* ClangSACheckers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClangSACheckers.h; sourceTree = ""; }; + BBA5AB291309C2FA000B38F1 /* CStringChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CStringChecker.cpp; sourceTree = ""; }; + BBA5AB2A1309C2FA000B38F1 /* DeadStoresChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeadStoresChecker.cpp; sourceTree = ""; }; + BBA5AB2B1309C2FA000B38F1 /* DereferenceChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DereferenceChecker.cpp; sourceTree = ""; }; + BBA5AB2C1309C2FA000B38F1 /* DivZeroChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DivZeroChecker.cpp; sourceTree = ""; }; + BBA5AB2D1309C2FA000B38F1 /* ExperimentalChecks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExperimentalChecks.cpp; sourceTree = ""; }; + BBA5AB2E1309C2FA000B38F1 /* ExperimentalChecks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExperimentalChecks.h; sourceTree = ""; }; + BBA5AB2F1309C2FA000B38F1 /* ExprEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExprEngine.cpp; sourceTree = ""; }; + BBA5AB301309C2FA000B38F1 /* FixedAddressChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FixedAddressChecker.cpp; sourceTree = ""; }; + BBA5AB311309C2FA000B38F1 /* IdempotentOperationChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IdempotentOperationChecker.cpp; sourceTree = ""; }; + BBA5AB321309C2FA000B38F1 /* InternalChecks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InternalChecks.h; sourceTree = ""; }; + BBA5AB331309C2FA000B38F1 /* LLVMConventionsChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LLVMConventionsChecker.cpp; sourceTree = ""; }; + BBA5AB341309C2FA000B38F1 /* MacOSXAPIChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MacOSXAPIChecker.cpp; sourceTree = ""; }; + BBA5AB361309C2FA000B38F1 /* MallocChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MallocChecker.cpp; sourceTree = ""; }; + BBA5AB371309C2FA000B38F1 /* NoReturnFunctionChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NoReturnFunctionChecker.cpp; sourceTree = ""; }; + BBA5AB381309C2FA000B38F1 /* NSAutoreleasePoolChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NSAutoreleasePoolChecker.cpp; sourceTree = ""; }; + BBA5AB3A1309C2FA000B38F1 /* NSErrorChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NSErrorChecker.cpp; sourceTree = ""; }; + BBA5AB3B1309C2FA000B38F1 /* ObjCAtSyncChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjCAtSyncChecker.cpp; sourceTree = ""; }; + BBA5AB3D1309C2FA000B38F1 /* ObjCSelfInitChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjCSelfInitChecker.cpp; sourceTree = ""; }; + BBA5AB3F1309C2FA000B38F1 /* ObjCUnusedIVarsChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjCUnusedIVarsChecker.cpp; sourceTree = ""; }; + BBA5AB401309C2FA000B38F1 /* OSAtomicChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OSAtomicChecker.cpp; sourceTree = ""; }; + BBA5AB411309C2FA000B38F1 /* PointerArithChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PointerArithChecker.cpp; sourceTree = ""; }; + BBA5AB421309C2FA000B38F1 /* PointerSubChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PointerSubChecker.cpp; sourceTree = ""; }; + BBA5AB431309C2FA000B38F1 /* PthreadLockChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PthreadLockChecker.cpp; sourceTree = ""; }; + BBA5AB441309C2FA000B38F1 /* ReturnPointerRangeChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReturnPointerRangeChecker.cpp; sourceTree = ""; }; + BBA5AB451309C2FA000B38F1 /* ReturnUndefChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReturnUndefChecker.cpp; sourceTree = ""; }; + BBA5AB461309C2FA000B38F1 /* StackAddrLeakChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StackAddrLeakChecker.cpp; sourceTree = ""; }; + BBA5AB471309C2FA000B38F1 /* StreamChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StreamChecker.cpp; sourceTree = ""; }; + BBA5AB481309C2FA000B38F1 /* UndefBranchChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UndefBranchChecker.cpp; sourceTree = ""; }; + BBA5AB491309C2FA000B38F1 /* UndefCapturedBlockVarChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UndefCapturedBlockVarChecker.cpp; sourceTree = ""; }; + BBA5AB4A1309C2FA000B38F1 /* UndefinedArraySubscriptChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UndefinedArraySubscriptChecker.cpp; sourceTree = ""; }; + BBA5AB4B1309C2FA000B38F1 /* UndefinedAssignmentChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UndefinedAssignmentChecker.cpp; sourceTree = ""; }; + BBA5AB4C1309C2FA000B38F1 /* UndefResultChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UndefResultChecker.cpp; sourceTree = ""; }; + BBA5AB4D1309C2FA000B38F1 /* UnixAPIChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UnixAPIChecker.cpp; sourceTree = ""; }; + BBA5AB4E1309C2FA000B38F1 /* UnreachableCodeChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UnreachableCodeChecker.cpp; sourceTree = ""; }; + BBA5AB4F1309C2FA000B38F1 /* VLASizeChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VLASizeChecker.cpp; sourceTree = ""; }; + BBA5AB521309C2FA000B38F1 /* AggExprVisitor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AggExprVisitor.cpp; sourceTree = ""; }; + BBA5AB531309C2FA000B38F1 /* AnalysisManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnalysisManager.cpp; sourceTree = ""; }; + BBA5AB541309C2FA000B38F1 /* BasicConstraintManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BasicConstraintManager.cpp; sourceTree = ""; }; + BBA5AB551309C2FA000B38F1 /* BasicStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BasicStore.cpp; sourceTree = ""; }; + BBA5AB561309C2FA000B38F1 /* BasicValueFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BasicValueFactory.cpp; sourceTree = ""; }; + BBA5AB571309C2FA000B38F1 /* BlockCounter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BlockCounter.cpp; sourceTree = ""; }; + BBA5AB581309C2FA000B38F1 /* BugReporter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BugReporter.cpp; sourceTree = ""; }; + BBA5AB591309C2FA000B38F1 /* BugReporterVisitors.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BugReporterVisitors.cpp; sourceTree = ""; }; + BBA5AB5A1309C2FA000B38F1 /* CFRefCount.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CFRefCount.cpp; sourceTree = ""; }; + BBA5AB5B1309C2FA000B38F1 /* Checker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Checker.cpp; sourceTree = ""; }; + BBA5AB5C1309C2FA000B38F1 /* CheckerHelpers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CheckerHelpers.cpp; sourceTree = ""; }; + BBA5AB5D1309C2FA000B38F1 /* CheckerManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CheckerManager.cpp; sourceTree = ""; }; + BBA5AB5F1309C2FA000B38F1 /* CoreEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CoreEngine.cpp; sourceTree = ""; }; + BBA5AB601309C2FA000B38F1 /* CXXExprEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CXXExprEngine.cpp; sourceTree = ""; }; + BBA5AB611309C2FA000B38F1 /* Environment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Environment.cpp; sourceTree = ""; }; + BBA5AB621309C2FA000B38F1 /* ExplodedGraph.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExplodedGraph.cpp; sourceTree = ""; }; + BBA5AB631309C2FA000B38F1 /* FlatStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FlatStore.cpp; sourceTree = ""; }; + BBA5AB641309C2FA000B38F1 /* GRState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GRState.cpp; sourceTree = ""; }; + BBA5AB651309C2FA000B38F1 /* HTMLDiagnostics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLDiagnostics.cpp; sourceTree = ""; }; + BBA5AB671309C2FA000B38F1 /* MemRegion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemRegion.cpp; sourceTree = ""; }; + BBA5AB681309C2FA000B38F1 /* ObjCMessage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjCMessage.cpp; sourceTree = ""; }; + BBA5AB691309C2FA000B38F1 /* PathDiagnostic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PathDiagnostic.cpp; sourceTree = ""; }; + BBA5AB6A1309C2FA000B38F1 /* PlistDiagnostics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlistDiagnostics.cpp; sourceTree = ""; }; + BBA5AB6B1309C2FA000B38F1 /* RangeConstraintManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RangeConstraintManager.cpp; sourceTree = ""; }; + BBA5AB6C1309C2FA000B38F1 /* RegionStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegionStore.cpp; sourceTree = ""; }; + BBA5AB6D1309C2FA000B38F1 /* SimpleConstraintManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SimpleConstraintManager.cpp; sourceTree = ""; }; + BBA5AB6E1309C2FA000B38F1 /* SimpleConstraintManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleConstraintManager.h; sourceTree = ""; }; + BBA5AB6F1309C2FA000B38F1 /* SimpleSValBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SimpleSValBuilder.cpp; sourceTree = ""; }; + BBA5AB701309C2FA000B38F1 /* Store.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Store.cpp; sourceTree = ""; }; + BBA5AB711309C2FA000B38F1 /* SValBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SValBuilder.cpp; sourceTree = ""; }; + BBA5AB721309C2FA000B38F1 /* SVals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVals.cpp; sourceTree = ""; }; + BBA5AB731309C2FA000B38F1 /* SymbolManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolManager.cpp; sourceTree = ""; }; + BBA5AB741309C2FA000B38F1 /* TextPathDiagnostics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextPathDiagnostics.cpp; sourceTree = ""; }; + BBA5AB761309C2FA000B38F1 /* AnalysisConsumer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnalysisConsumer.cpp; sourceTree = ""; }; + BBA5AB771309C2FA000B38F1 /* AnalysisConsumer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnalysisConsumer.h; sourceTree = ""; }; + BBA5AB781309C2FA000B38F1 /* CheckerRegistration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CheckerRegistration.cpp; sourceTree = ""; }; + BBA5AB7A1309C2FA000B38F1 /* FrontendActions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FrontendActions.cpp; sourceTree = ""; }; BD59A948121496B9003A5A02 /* AnalysisBasedWarnings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnalysisBasedWarnings.h; path = clang/Sema/AnalysisBasedWarnings.h; sourceTree = ""; }; BD59A949121496B9003A5A02 /* CodeCompleteConsumer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CodeCompleteConsumer.h; path = clang/Sema/CodeCompleteConsumer.h; sourceTree = ""; }; BD59A94A121496B9003A5A02 /* CXXFieldCollector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CXXFieldCollector.h; path = clang/Sema/CXXFieldCollector.h; sourceTree = ""; }; @@ -742,14 +537,13 @@ BF9FEDF51225E5D5003A8B71 /* MacroBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacroBuilder.h; sourceTree = ""; }; BF9FEDF61225E5FB003A8B71 /* Version.inc.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Version.inc.in; sourceTree = ""; }; BF9FEDF71225E613003A8B71 /* DiagnosticCategories.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DiagnosticCategories.td; sourceTree = ""; }; - BF9FEDF81225E67B003A8B71 /* Action.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Action.cpp; path = lib/Sema/Action.cpp; sourceTree = ""; }; BF9FEDFA1225E6A9003A8B71 /* AttributeList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AttributeList.cpp; path = lib/Sema/AttributeList.cpp; sourceTree = ""; }; BF9FEDFC1225E6C6003A8B71 /* DeclSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DeclSpec.cpp; path = lib/Sema/DeclSpec.cpp; sourceTree = ""; }; BF9FEDFE1225E6DD003A8B71 /* TargetAttributesSema.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TargetAttributesSema.cpp; path = lib/Sema/TargetAttributesSema.cpp; sourceTree = ""; }; - BF9FEE001225E718003A8B71 /* CXXABI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CXXABI.h; sourceTree = ""; }; - BF9FEE011225E73F003A8B71 /* ExprClassification.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExprClassification.cpp; sourceTree = ""; }; - BF9FEE031225E759003A8B71 /* ItaniumCXXABI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ItaniumCXXABI.cpp; sourceTree = ""; }; - BF9FEE051225E770003A8B71 /* MicrosoftCXXABI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MicrosoftCXXABI.cpp; sourceTree = ""; }; + BF9FEE001225E718003A8B71 /* CXXABI.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = CXXABI.h; sourceTree = ""; tabWidth = 2; }; + BF9FEE011225E73F003A8B71 /* ExprClassification.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = ExprClassification.cpp; sourceTree = ""; tabWidth = 2; }; + BF9FEE031225E759003A8B71 /* ItaniumCXXABI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = ItaniumCXXABI.cpp; sourceTree = ""; tabWidth = 2; }; + BF9FEE051225E770003A8B71 /* MicrosoftCXXABI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = MicrosoftCXXABI.cpp; sourceTree = ""; tabWidth = 2; }; BF9FEE2B1225E7EA003A8B71 /* BackendUtil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BackendUtil.cpp; path = lib/CodeGen/BackendUtil.cpp; sourceTree = ""; }; BF9FEE2D1225E80F003A8B71 /* CGCXXABI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CGCXXABI.h; path = lib/CodeGen/CGCXXABI.h; sourceTree = ""; }; BF9FEE2E1225E82D003A8B71 /* CGException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CGException.h; path = lib/CodeGen/CGException.h; sourceTree = ""; }; @@ -763,37 +557,11 @@ BF9FEE511226FE9F003A8B71 /* ParseAST.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ParseAST.cpp; path = lib/Parse/ParseAST.cpp; sourceTree = ""; }; BF9FEE531226FEC1003A8B71 /* RAIIObjectsForParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RAIIObjectsForParser.h; path = lib/Parse/RAIIObjectsForParser.h; sourceTree = ""; }; BF9FEEF1122D8068003A8B71 /* PreprocessingRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PreprocessingRecord.cpp; sourceTree = ""; }; - BFE2F67A11DA95590007EDC0 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; - BFE2F67C11DA95590007EDC0 /* .dir */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .dir; sourceTree = ""; }; - BFE2F67D11DA95590007EDC0 /* DeltaTree.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = DeltaTree.d; sourceTree = ""; }; - BFE2F67E11DA955A0007EDC0 /* DeltaTree.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = DeltaTree.o; sourceTree = ""; }; - BFE2F67F11DA955A0007EDC0 /* FixItRewriter.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = FixItRewriter.d; sourceTree = ""; }; - BFE2F68011DA955A0007EDC0 /* FixItRewriter.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = FixItRewriter.o; sourceTree = ""; }; - BFE2F68111DA955A0007EDC0 /* FrontendActions.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = FrontendActions.d; sourceTree = ""; }; - BFE2F68211DA955A0007EDC0 /* FrontendActions.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = FrontendActions.o; sourceTree = ""; }; - BFE2F68311DA955A0007EDC0 /* HTMLPrint.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = HTMLPrint.d; sourceTree = ""; }; - BFE2F68411DA955A0007EDC0 /* HTMLPrint.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = HTMLPrint.o; sourceTree = ""; }; - BFE2F68511DA955A0007EDC0 /* HTMLRewrite.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = HTMLRewrite.d; sourceTree = ""; }; - BFE2F68611DA955A0007EDC0 /* HTMLRewrite.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = HTMLRewrite.o; sourceTree = ""; }; - BFE2F68711DA955A0007EDC0 /* RewriteMacros.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = RewriteMacros.d; sourceTree = ""; }; - BFE2F68911DA955A0007EDC0 /* RewriteObjC.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = RewriteObjC.d; sourceTree = ""; }; - BFE2F68B11DA955A0007EDC0 /* Rewriter.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = Rewriter.d; sourceTree = ""; }; - BFE2F69111DA955A0007EDC0 /* TokenRewriter.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = TokenRewriter.d; sourceTree = ""; }; - BFE2F69211DA955A0007EDC0 /* TokenRewriter.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = TokenRewriter.o; sourceTree = ""; }; BFE2F69311DA955A0007EDC0 /* DeltaTree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeltaTree.cpp; sourceTree = ""; }; BFE2F69411DA955A0007EDC0 /* FixItRewriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FixItRewriter.cpp; sourceTree = ""; }; BFE2F69511DA955A0007EDC0 /* FrontendActions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FrontendActions.cpp; sourceTree = ""; }; BFE2F69611DA955A0007EDC0 /* HTMLPrint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLPrint.cpp; sourceTree = ""; }; BFE2F69711DA955A0007EDC0 /* HTMLRewrite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLRewrite.cpp; sourceTree = ""; }; - BFE2F69811DA955A0007EDC0 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; - BFE2F69A11DA955A0007EDC0 /* .dir */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .dir; sourceTree = ""; }; - BFE2F69B11DA955A0007EDC0 /* DeltaTree.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = DeltaTree.d; sourceTree = ""; }; - BFE2F69C11DA955A0007EDC0 /* DeltaTree.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = DeltaTree.o; sourceTree = ""; }; - BFE2F69D11DA955A0007EDC0 /* HTMLRewrite.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = HTMLRewrite.d; sourceTree = ""; }; - BFE2F69E11DA955A0007EDC0 /* HTMLRewrite.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = HTMLRewrite.o; sourceTree = ""; }; - BFE2F69F11DA955A0007EDC0 /* Rewriter.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = Rewriter.d; sourceTree = ""; }; - BFE2F6A311DA955A0007EDC0 /* TokenRewriter.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = TokenRewriter.d; sourceTree = ""; }; - BFE2F6A411DA955A0007EDC0 /* TokenRewriter.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = TokenRewriter.o; sourceTree = ""; }; BFE2F6A511DA955A0007EDC0 /* RewriteMacros.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RewriteMacros.cpp; sourceTree = ""; }; BFE2F6A611DA955A0007EDC0 /* RewriteObjC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RewriteObjC.cpp; sourceTree = ""; }; BFE2F6A711DA955A0007EDC0 /* Rewriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Rewriter.cpp; sourceTree = ""; }; @@ -838,14 +606,6 @@ DE4121210D7F1BBE0080F80A /* GRExprEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GRExprEngine.h; path = clang/Analysis/PathSensitive/GRExprEngine.h; sourceTree = ""; }; DE4121220D7F1BBE0080F80A /* GRTransferFuncs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GRTransferFuncs.h; path = clang/Analysis/PathSensitive/GRTransferFuncs.h; sourceTree = ""; }; DE4121230D7F1BBE0080F80A /* GRCoreEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GRCoreEngine.h; path = clang/Analysis/PathSensitive/GRCoreEngine.h; sourceTree = ""; }; - DE4121270D7F1C1C0080F80A /* SymbolManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SymbolManager.cpp; path = lib/Analysis/SymbolManager.cpp; sourceTree = ""; }; - DE4121280D7F1C1C0080F80A /* ExplodedGraph.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ExplodedGraph.cpp; path = lib/Analysis/ExplodedGraph.cpp; sourceTree = ""; }; - DE4121290D7F1C1C0080F80A /* UninitializedValues.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UninitializedValues.cpp; path = lib/Analysis/UninitializedValues.cpp; sourceTree = ""; }; - DE41212A0D7F1C1C0080F80A /* GRCoreEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GRCoreEngine.cpp; path = lib/Analysis/GRCoreEngine.cpp; sourceTree = ""; }; - DE41212C0D7F1C1C0080F80A /* GRSimpleVals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GRSimpleVals.h; path = lib/Analysis/GRSimpleVals.h; sourceTree = ""; }; - DE41212F0D7F1C1C0080F80A /* GRSimpleVals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GRSimpleVals.cpp; path = lib/Analysis/GRSimpleVals.cpp; sourceTree = ""; }; - DE4121300D7F1C1C0080F80A /* GRBlockCounter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GRBlockCounter.cpp; path = lib/Analysis/GRBlockCounter.cpp; sourceTree = ""; }; - DE4121310D7F1C1C0080F80A /* GRExprEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GRExprEngine.cpp; path = lib/Analysis/GRExprEngine.cpp; sourceTree = ""; }; DE4264FB0C113592005A861D /* CGDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGDecl.cpp; path = lib/CodeGen/CGDecl.cpp; sourceTree = ""; tabWidth = 2; }; DE46BF270AE0A82D00CC047C /* TargetInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = TargetInfo.h; sourceTree = ""; tabWidth = 2; }; DE4772F90C10EAE5002239E8 /* CGStmt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGStmt.cpp; path = lib/CodeGen/CGStmt.cpp; sourceTree = ""; tabWidth = 2; }; @@ -855,7 +615,6 @@ DE4DC7A20EA1C33E00069E5A /* TokenRewriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TokenRewriter.cpp; path = lib/Rewrite/TokenRewriter.cpp; sourceTree = ""; }; DE53370B0CE2D96F00D9A028 /* RewriteRope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RewriteRope.h; path = clang/Rewrite/RewriteRope.h; sourceTree = ""; }; DE613EF30E0E148D00B05B79 /* APValue.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = APValue.h; path = clang/AST/APValue.h; sourceTree = ""; tabWidth = 2; }; - DE67E70A0C020EC500F66BC5 /* SemaType.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaType.cpp; path = lib/Sema/SemaType.cpp; sourceTree = ""; tabWidth = 2; }; DE67E70C0C020ECA00F66BC5 /* SemaStmt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaStmt.cpp; path = lib/Sema/SemaStmt.cpp; sourceTree = ""; tabWidth = 2; }; DE67E70E0C020ECF00F66BC5 /* SemaExprCXX.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaExprCXX.cpp; path = lib/Sema/SemaExprCXX.cpp; sourceTree = ""; tabWidth = 2; }; DE67E7100C020ED400F66BC5 /* SemaExpr.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaExpr.cpp; path = lib/Sema/SemaExpr.cpp; sourceTree = ""; tabWidth = 2; }; @@ -970,7 +729,7 @@ DEF165230F8D46980098507F /* Phases.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Phases.h; path = clang/Driver/Phases.h; sourceTree = ""; }; DEF165240F8D46980098507F /* DriverDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DriverDiagnostic.h; path = clang/Driver/DriverDiagnostic.h; sourceTree = ""; }; DEF169220F9645960098507F /* FrontendDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FrontendDiagnostic.h; path = clang/Frontend/FrontendDiagnostic.h; sourceTree = ""; }; - DEF1692C0F9645BF0098507F /* AnalysisDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnalysisDiagnostic.h; path = clang/Analysis/AnalysisDiagnostic.h; sourceTree = ""; }; + DEF1692C0F9645BF0098507F /* AnalysisDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = AnalysisDiagnostic.h; path = clang/Analysis/AnalysisDiagnostic.h; sourceTree = ""; tabWidth = 2; }; DEF16BE40FA13A5B0098507F /* TypeNodes.def */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = text; name = TypeNodes.def; path = clang/AST/TypeNodes.def; sourceTree = ""; tabWidth = 2; }; DEF16BE50FA13A650098507F /* TypeOrdering.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = TypeOrdering.h; path = clang/AST/TypeOrdering.h; sourceTree = ""; tabWidth = 2; }; DEF2E95E0C5FBD74000C4259 /* InternalsManual.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; name = InternalsManual.html; path = docs/InternalsManual.html; sourceTree = ""; }; @@ -988,15 +747,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - BFE2F6AC11DA955A0007EDC0 /* DeltaTree.o in Frameworks */, - BFE2F6AE11DA955A0007EDC0 /* FixItRewriter.o in Frameworks */, - BFE2F6B011DA955A0007EDC0 /* FrontendActions.o in Frameworks */, - BFE2F6B211DA955A0007EDC0 /* HTMLPrint.o in Frameworks */, - BFE2F6B411DA955A0007EDC0 /* HTMLRewrite.o in Frameworks */, - BFE2F6C011DA955A0007EDC0 /* TokenRewriter.o in Frameworks */, - BFE2F6C811DA955A0007EDC0 /* DeltaTree.o in Frameworks */, - BFE2F6CA11DA955A0007EDC0 /* HTMLRewrite.o in Frameworks */, - BFE2F6D011DA955A0007EDC0 /* TokenRewriter.o in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1018,6 +768,7 @@ 08FB7795FE84155DC02AAC07 /* Libraries */ = { isa = PBXGroup; children = ( + BBA5AB121309C2FA000B38F1 /* StaticAnalyzer */, 57EB5660121B034300ECA335 /* Serialization */, BFE2F67911DA95590007EDC0 /* Rewrite */, 90FD6D6C103C3D2D005F5B73 /* Index */, @@ -1028,6 +779,7 @@ DE67E7070C020EAB00F66BC5 /* Sema */, DE927FCC0C0557CD00231DA4 /* CodeGen */, 356EF9B30C8F7DCA006650F5 /* Analysis */, + 1AC1A6871299A284006FBC77 /* Checker */, DEF7D9F50C9C8B0C0001F598 /* Rewrite */, 352246E00F5C6BC000D0D279 /* Frontend */, DEDFE6470F7B3B560035BD10 /* Driver */, @@ -1043,55 +795,96 @@ name = Products; sourceTree = ""; }; - 3507E4C30E27FE3800FB7B57 /* Checks */ = { - isa = PBXGroup; - children = ( - 35BAC1E70E82C5B7003FB76F /* CheckNSError.cpp */, - 356B89760D9BFDC100CBEBE9 /* BasicObjCFoundationChecks.h */, - 35F8D0D50D9B82CD00D91C5E /* BasicObjCFoundationChecks.cpp */, - 35862B0C0E3628CB0009F542 /* CheckDeadStores.cpp */, - 3595AFB70E1C8D62004CDF09 /* CheckObjCDealloc.cpp */, - 3507E4C10E27FE2D00FB7B57 /* CheckObjCInstMethSignature.cpp */, - 35F2A01D0E36AFF100D17527 /* CheckObjCUnusedIVars.cpp */, - DE4121290D7F1C1C0080F80A /* UninitializedValues.cpp */, - ); - name = Checks; - sourceTree = ""; - }; - 3507E4C60E27FE5500FB7B57 /* Core */ = { - isa = PBXGroup; - children = ( - 35A057E10EAE2D950069249F /* SVals.cpp */, - 355106850E9A8507006A4E44 /* MemRegion.cpp */, - 35D55B240D81D8C60092E734 /* BasicValueFactory.cpp */, - 3536456A0E23EBF7009C6509 /* Environment.cpp */, - DE4121280D7F1C1C0080F80A /* ExplodedGraph.cpp */, - DE4121300D7F1C1C0080F80A /* GRBlockCounter.cpp */, - DE41212A0D7F1C1C0080F80A /* GRCoreEngine.cpp */, - DE4121310D7F1C1C0080F80A /* GRExprEngine.cpp */, - 35862B110E3629850009F542 /* GRExprEngineInternalChecks.cpp */, - 358F51510E529AA4007F2102 /* GRState.cpp */, - 35EFEFB50DB67ED60020783D /* GRTransferFuncs.cpp */, - DE4121270D7F1C1C0080F80A /* SymbolManager.cpp */, - ); - name = Core; - sourceTree = ""; - }; - 3507E4C90E27FE9000FB7B57 /* Bug Reporting */ = { - isa = PBXGroup; - children = ( - 35A8FCF80D9B4B29001C2F97 /* PathDiagnostic.cpp */, - 359379090DA48ABA0043B19C /* BugReporter.cpp */, - ); - name = "Bug Reporting"; - sourceTree = ""; - }; - 3507E4CC0E27FEB900FB7B57 /* Flow-Sensitive Analyses */ = { + 1AC1A6871299A284006FBC77 /* Checker */ = { isa = PBXGroup; children = ( - 356EF9B40C8F7DDF006650F5 /* LiveVariables.cpp */, + 1AC1A6881299A284006FBC77 /* AdjustedReturnValueChecker.cpp */, + 1AC1A6891299A284006FBC77 /* AggExprVisitor.cpp */, + 1AC1A68A1299A284006FBC77 /* AnalysisConsumer.cpp */, + 1AC1A68B1299A284006FBC77 /* AnalysisManager.cpp */, + 1AC1A68C1299A284006FBC77 /* AnalyzerStatsChecker.cpp */, + 1AC1A68D1299A284006FBC77 /* ArrayBoundChecker.cpp */, + 1AC1A68E1299A284006FBC77 /* AttrNonNullChecker.cpp */, + 1AC1A68F1299A284006FBC77 /* BasicConstraintManager.cpp */, + 1AC1A6901299A284006FBC77 /* BasicObjCFoundationChecks.cpp */, + 1AC1A6911299A284006FBC77 /* BasicObjCFoundationChecks.h */, + 1AC1A6921299A284006FBC77 /* BasicStore.cpp */, + 1AC1A6931299A284006FBC77 /* BasicValueFactory.cpp */, + 1AC1A6941299A284006FBC77 /* BugReporter.cpp */, + 1AC1A6951299A284006FBC77 /* BugReporterVisitors.cpp */, + 1AC1A6961299A284006FBC77 /* BuiltinFunctionChecker.cpp */, + 1AC1A6971299A284006FBC77 /* CallAndMessageChecker.cpp */, + 1AC1A6981299A284006FBC77 /* CastSizeChecker.cpp */, + 1AC1A6991299A284006FBC77 /* CastToStructChecker.cpp */, + 1AC1A69A1299A284006FBC77 /* CFRefCount.cpp */, + 1AC1A69B1299A284006FBC77 /* CheckDeadStores.cpp */, + 1AC1A69C1299A284006FBC77 /* Checker.cpp */, + 1AC1A69D1299A284006FBC77 /* CheckerHelpers.cpp */, + 1AC1A69E1299A284006FBC77 /* CheckObjCDealloc.cpp */, + 1AC1A69F1299A284006FBC77 /* CheckObjCInstMethSignature.cpp */, + 1AC1A6A01299A284006FBC77 /* CheckSecuritySyntaxOnly.cpp */, + 1AC1A6A11299A284006FBC77 /* CheckSizeofPointer.cpp */, + 1AC1A6A21299A284006FBC77 /* ChrootChecker.cpp */, + 1AC1A6A41299A284006FBC77 /* CocoaConventions.cpp */, + 1AC1A6A51299A284006FBC77 /* CStringChecker.cpp */, + 1AC1A7DC1299A285006FBC77 /* DereferenceChecker.cpp */, + 1AC1A7DD1299A285006FBC77 /* DivZeroChecker.cpp */, + 1AC1A7DE1299A285006FBC77 /* Environment.cpp */, + 1AC1A7DF1299A285006FBC77 /* ExplodedGraph.cpp */, + 1AC1A7E01299A285006FBC77 /* FixedAddressChecker.cpp */, + 1AC1A7E11299A285006FBC77 /* FlatStore.cpp */, + 1AC1A7E21299A285006FBC77 /* FrontendActions.cpp */, + 1AC1A7E31299A285006FBC77 /* GRBlockCounter.cpp */, + 1AC1A7E41299A285006FBC77 /* GRCoreEngine.cpp */, + 1AC1A7E51299A285006FBC77 /* GRCXXExprEngine.cpp */, + 1AC1A7E61299A285006FBC77 /* GRExprEngine.cpp */, + 1AC1A7E71299A285006FBC77 /* GRExprEngineExperimentalChecks.cpp */, + 1AC1A7E81299A285006FBC77 /* GRExprEngineExperimentalChecks.h */, + 1AC1A7E91299A285006FBC77 /* GRExprEngineInternalChecks.h */, + 1AC1A7EA1299A285006FBC77 /* GRState.cpp */, + 1AC1A7EB1299A285006FBC77 /* HTMLDiagnostics.cpp */, + 1AC1A7EC1299A285006FBC77 /* IdempotentOperationChecker.cpp */, + 1AC1A7ED1299A285006FBC77 /* LLVMConventionsChecker.cpp */, + 1AC1A7EE1299A285006FBC77 /* MacOSXAPIChecker.cpp */, + 1AC1A7F01299A285006FBC77 /* MallocChecker.cpp */, + 1AC1A7F11299A285006FBC77 /* ManagerRegistry.cpp */, + 1AC1A7F21299A285006FBC77 /* MemRegion.cpp */, + 1AC1A7F31299A285006FBC77 /* NoReturnFunctionChecker.cpp */, + 1AC1A7F41299A285006FBC77 /* NSAutoreleasePoolChecker.cpp */, + 1AC1A7F51299A285006FBC77 /* NSErrorChecker.cpp */, + 1AC1A7F61299A285006FBC77 /* ObjCAtSyncChecker.cpp */, + 1AC1A7F71299A285006FBC77 /* ObjCUnusedIVarsChecker.cpp */, + 1AC1A7F81299A285006FBC77 /* OSAtomicChecker.cpp */, + 1AC1A7F91299A285006FBC77 /* PathDiagnostic.cpp */, + 1AC1A7FA1299A285006FBC77 /* PlistDiagnostics.cpp */, + 1AC1A7FB1299A285006FBC77 /* PointerArithChecker.cpp */, + 1AC1A7FC1299A285006FBC77 /* PointerSubChecker.cpp */, + 1AC1A7FD1299A285006FBC77 /* PthreadLockChecker.cpp */, + 1AC1A7FE1299A285006FBC77 /* RangeConstraintManager.cpp */, + 1AC1A8001299A285006FBC77 /* RegionStore.cpp */, + 1AC1A9DB1299A287006FBC77 /* ReturnPointerRangeChecker.cpp */, + 1AC1A9DC1299A287006FBC77 /* ReturnUndefChecker.cpp */, + 1AC1A9DD1299A287006FBC77 /* SimpleConstraintManager.cpp */, + 1AC1A9DE1299A287006FBC77 /* SimpleConstraintManager.h */, + 1AC1A9DF1299A287006FBC77 /* SimpleSValuator.cpp */, + 1AC1A9E01299A287006FBC77 /* StackAddrLeakChecker.cpp */, + 1AC1A9E11299A287006FBC77 /* Store.cpp */, + 1AC1A9E21299A287006FBC77 /* StreamChecker.cpp */, + 1AC1A9E31299A287006FBC77 /* SVals.cpp */, + 1AC1A9E41299A287006FBC77 /* SValuator.cpp */, + 1AC1A9E51299A287006FBC77 /* SymbolManager.cpp */, + 1AC1A9E61299A287006FBC77 /* UndefBranchChecker.cpp */, + 1AC1A9E71299A287006FBC77 /* UndefCapturedBlockVarChecker.cpp */, + 1AC1A9E81299A287006FBC77 /* UndefinedArraySubscriptChecker.cpp */, + 1AC1A9E91299A287006FBC77 /* UndefinedAssignmentChecker.cpp */, + 1AC1A9EA1299A287006FBC77 /* UndefResultChecker.cpp */, + 1AC1A9EB1299A287006FBC77 /* UnixAPIChecker.cpp */, + 1AC1A9EC1299A287006FBC77 /* UnreachableCodeChecker.cpp */, + 1AC1A9ED1299A287006FBC77 /* ValueManager.cpp */, + 1AC1A9EE1299A287006FBC77 /* VLASizeChecker.cpp */, ); - name = "Flow-Sensitive Analyses"; + name = Checker; + path = lib/Checker; sourceTree = ""; }; 352246E00F5C6BC000D0D279 /* Frontend */ = { @@ -1102,6 +895,7 @@ 9012911C1048068D0083456D /* ASTUnit.cpp */, 1A2A54A50FD1DD1C00F4CE45 /* ASTConsumers.cpp */, 1A2A54A70FD1DD1C00F4CE45 /* CacheTokens.cpp */, + DE4DC7A20EA1C33E00069E5A /* TokenRewriter.cpp */, 1ACB57DB1105820D0047B991 /* CompilerInstance.cpp */, 1ACB57DC1105820D0047B991 /* CompilerInvocation.cpp */, 1ACB57DD1105820D0047B991 /* DeclXML.cpp */, @@ -1136,44 +930,14 @@ name = Visitors; sourceTree = ""; }; - 35544B820F5C7F6600D92AA9 /* StoreManagers */ = { - isa = PBXGroup; - children = ( - 35A057E00EAE2D950069249F /* RegionStore.cpp */, - 3558F76C0E267C8300A5B0DF /* BasicStore.cpp */, - ); - name = StoreManagers; - sourceTree = ""; - }; - 35544B830F5C7F8900D92AA9 /* ConstraintManagers */ = { - isa = PBXGroup; - children = ( - 35544B870F5C7FD700D92AA9 /* SimpleConstraintManager.h */, - 35544B860F5C7FD700D92AA9 /* SimpleConstraintManager.cpp */, - 358CFBB70E65AB04002A8E19 /* BasicConstraintManager.cpp */, - 35544B850F5C7FD700D92AA9 /* RangeConstraintManager.cpp */, - ); - name = ConstraintManagers; - sourceTree = ""; - }; - 35544B840F5C7F9D00D92AA9 /* Path-Sensitive */ = { - isa = PBXGroup; - children = ( - 3507E4C60E27FE5500FB7B57 /* Core */, - 35544B820F5C7F6600D92AA9 /* StoreManagers */, - 35862B130E3629BC0009F542 /* Transfer Function Analyses */, - 35544B830F5C7F8900D92AA9 /* ConstraintManagers */, - ); - name = "Path-Sensitive"; - sourceTree = ""; - }; 356EF9AF0C8F7DA4006650F5 /* Analysis */ = { isa = PBXGroup; children = ( + 1AECEFAF12DE387800F1D539 /* AnalysisContext.h */, + 1AECEFB012DE387800F1D539 /* CFG.h */, + 1AECEFB112DE387800F1D539 /* CFGStmtMap.h */, DEF1692C0F9645BF0098507F /* AnalysisDiagnostic.h */, 35A8FCF60D9B4ADD001C2F97 /* ProgramPoint.h */, - 35A8FCF70D9B4ADD001C2F97 /* PathDiagnostic.h */, - 355CF6820C90A8B600A08AA3 /* LocalCheckers.h */, 35F9B1540D1C6AFC00DDFDAE /* Analyses */, 35D1DDCF0CA9C6BE0096E967 /* FlowSensitive */, DE4121130D7F1B980080F80A /* PathSensitive */, @@ -1186,25 +950,21 @@ 356EF9B30C8F7DCA006650F5 /* Analysis */ = { isa = PBXGroup; children = ( - DE67E70A0C020EC500F66BC5 /* SemaType.cpp */, - 35544B840F5C7F9D00D92AA9 /* Path-Sensitive */, - 3507E4CC0E27FEB900FB7B57 /* Flow-Sensitive Analyses */, - 3507E4C30E27FE3800FB7B57 /* Checks */, - 3507E4C90E27FE9000FB7B57 /* Bug Reporting */, + 1AC1A67212999D8E006FBC77 /* AnalysisContext.cpp */, + 1AC1A67312999D8E006FBC77 /* CFG.cpp */, + 1AC1A67412999D8E006FBC77 /* CFGStmtMap.cpp */, + 1AC1A67512999D8E006FBC77 /* FormatString.cpp */, + 1AC1A67612999D8E006FBC77 /* FormatStringParsing.h */, + 1AC1A67712999D8E006FBC77 /* LiveVariables.cpp */, + 1AC1A67812999D8E006FBC77 /* PrintfFormatString.cpp */, + 1AC1A67912999D8E006FBC77 /* PseudoConstantAnalysis.cpp */, + 1AC1A67A12999D8E006FBC77 /* ReachableCode.cpp */, + 1AC1A67B12999D8E006FBC77 /* ScanfFormatString.cpp */, + 1AC1A67C12999D8E006FBC77 /* UninitializedValues.cpp */, ); name = Analysis; sourceTree = ""; }; - 35862B130E3629BC0009F542 /* Transfer Function Analyses */ = { - isa = PBXGroup; - children = ( - 35D55B250D81D8C60092E734 /* CFRefCount.cpp */, - DE41212F0D7F1C1C0080F80A /* GRSimpleVals.cpp */, - DE41212C0D7F1C1C0080F80A /* GRSimpleVals.h */, - ); - name = "Transfer Function Analyses"; - sourceTree = ""; - }; 35D1DDCF0CA9C6BE0096E967 /* FlowSensitive */ = { isa = PBXGroup; children = ( @@ -1251,9 +1011,6 @@ 57F6660F121B4DE600DCE3B7 /* ASTWriter.cpp */, 57F66610121B4DE600DCE3B7 /* ASTWriterDecl.cpp */, 57F66611121B4DE600DCE3B7 /* ASTWriterStmt.cpp */, - 57EB5661121B034300ECA335 /* CMakeLists.txt */, - 57EB5662121B034300ECA335 /* GeneratePCH.cpp */, - 57EB5663121B034300ECA335 /* Makefile */, ); name = Serialization; path = lib/Serialization; @@ -1339,18 +1096,138 @@ name = "index-test"; sourceTree = ""; }; + BBA5AB121309C2FA000B38F1 /* StaticAnalyzer */ = { + isa = PBXGroup; + children = ( + BBA5AB131309C2FA000B38F1 /* Checkers */, + BBA5AB511309C2FA000B38F1 /* Core */, + BBA5AB751309C2FA000B38F1 /* Frontend */, + ); + name = StaticAnalyzer; + path = lib/StaticAnalyzer; + sourceTree = ""; + }; + BBA5AB131309C2FA000B38F1 /* Checkers */ = { + isa = PBXGroup; + children = ( + BBA5AB141309C2FA000B38F1 /* AdjustedReturnValueChecker.cpp */, + BBA5AB151309C2FA000B38F1 /* AnalyzerStatsChecker.cpp */, + BBA5AB161309C2FA000B38F1 /* ArrayBoundChecker.cpp */, + BBA5AB171309C2FA000B38F1 /* ArrayBoundCheckerV2.cpp */, + BBA5AB181309C2FA000B38F1 /* AttrNonNullChecker.cpp */, + BBA5AB191309C2FA000B38F1 /* BasicObjCFoundationChecks.cpp */, + BBA5AB1A1309C2FA000B38F1 /* BasicObjCFoundationChecks.h */, + BBA5AB1B1309C2FA000B38F1 /* BuiltinFunctionChecker.cpp */, + BBA5AB1C1309C2FA000B38F1 /* CallAndMessageChecker.cpp */, + BBA5AB1D1309C2FA000B38F1 /* CastSizeChecker.cpp */, + BBA5AB1E1309C2FA000B38F1 /* CastToStructChecker.cpp */, + BBA5AB1F1309C2FA000B38F1 /* Checkers.td */, + BBA5AB201309C2FA000B38F1 /* CheckObjCDealloc.cpp */, + BBA5AB211309C2FA000B38F1 /* CheckObjCInstMethSignature.cpp */, + BBA5AB221309C2FA000B38F1 /* CheckSecuritySyntaxOnly.cpp */, + BBA5AB231309C2FA000B38F1 /* CheckSizeofPointer.cpp */, + BBA5AB241309C2FA000B38F1 /* ChrootChecker.cpp */, + BBA5AB251309C2FA000B38F1 /* ClangSACheckerProvider.cpp */, + BBA5AB261309C2FA000B38F1 /* ClangSACheckerProvider.h */, + BBA5AB271309C2FA000B38F1 /* ClangSACheckers.h */, + BBA5AB291309C2FA000B38F1 /* CStringChecker.cpp */, + BBA5AB2A1309C2FA000B38F1 /* DeadStoresChecker.cpp */, + BBA5AB2B1309C2FA000B38F1 /* DereferenceChecker.cpp */, + BBA5AB2C1309C2FA000B38F1 /* DivZeroChecker.cpp */, + BBA5AB2D1309C2FA000B38F1 /* ExperimentalChecks.cpp */, + BBA5AB2E1309C2FA000B38F1 /* ExperimentalChecks.h */, + BBA5AB2F1309C2FA000B38F1 /* ExprEngine.cpp */, + BBA5AB301309C2FA000B38F1 /* FixedAddressChecker.cpp */, + BBA5AB311309C2FA000B38F1 /* IdempotentOperationChecker.cpp */, + BBA5AB321309C2FA000B38F1 /* InternalChecks.h */, + BBA5AB331309C2FA000B38F1 /* LLVMConventionsChecker.cpp */, + BBA5AB341309C2FA000B38F1 /* MacOSXAPIChecker.cpp */, + BBA5AB361309C2FA000B38F1 /* MallocChecker.cpp */, + BBA5AB371309C2FA000B38F1 /* NoReturnFunctionChecker.cpp */, + BBA5AB381309C2FA000B38F1 /* NSAutoreleasePoolChecker.cpp */, + BBA5AB3A1309C2FA000B38F1 /* NSErrorChecker.cpp */, + BBA5AB3B1309C2FA000B38F1 /* ObjCAtSyncChecker.cpp */, + BBA5AB3D1309C2FA000B38F1 /* ObjCSelfInitChecker.cpp */, + BBA5AB3F1309C2FA000B38F1 /* ObjCUnusedIVarsChecker.cpp */, + BBA5AB401309C2FA000B38F1 /* OSAtomicChecker.cpp */, + BBA5AB411309C2FA000B38F1 /* PointerArithChecker.cpp */, + BBA5AB421309C2FA000B38F1 /* PointerSubChecker.cpp */, + BBA5AB431309C2FA000B38F1 /* PthreadLockChecker.cpp */, + BBA5AB441309C2FA000B38F1 /* ReturnPointerRangeChecker.cpp */, + BBA5AB451309C2FA000B38F1 /* ReturnUndefChecker.cpp */, + BBA5AB461309C2FA000B38F1 /* StackAddrLeakChecker.cpp */, + BBA5AB471309C2FA000B38F1 /* StreamChecker.cpp */, + BBA5AB481309C2FA000B38F1 /* UndefBranchChecker.cpp */, + BBA5AB491309C2FA000B38F1 /* UndefCapturedBlockVarChecker.cpp */, + BBA5AB4A1309C2FA000B38F1 /* UndefinedArraySubscriptChecker.cpp */, + BBA5AB4B1309C2FA000B38F1 /* UndefinedAssignmentChecker.cpp */, + BBA5AB4C1309C2FA000B38F1 /* UndefResultChecker.cpp */, + BBA5AB4D1309C2FA000B38F1 /* UnixAPIChecker.cpp */, + BBA5AB4E1309C2FA000B38F1 /* UnreachableCodeChecker.cpp */, + BBA5AB4F1309C2FA000B38F1 /* VLASizeChecker.cpp */, + ); + path = Checkers; + sourceTree = ""; + }; + BBA5AB511309C2FA000B38F1 /* Core */ = { + isa = PBXGroup; + children = ( + BBA5AB521309C2FA000B38F1 /* AggExprVisitor.cpp */, + BBA5AB531309C2FA000B38F1 /* AnalysisManager.cpp */, + BBA5AB541309C2FA000B38F1 /* BasicConstraintManager.cpp */, + BBA5AB551309C2FA000B38F1 /* BasicStore.cpp */, + BBA5AB561309C2FA000B38F1 /* BasicValueFactory.cpp */, + BBA5AB571309C2FA000B38F1 /* BlockCounter.cpp */, + BBA5AB581309C2FA000B38F1 /* BugReporter.cpp */, + BBA5AB591309C2FA000B38F1 /* BugReporterVisitors.cpp */, + BBA5AB5A1309C2FA000B38F1 /* CFRefCount.cpp */, + BBA5AB5B1309C2FA000B38F1 /* Checker.cpp */, + BBA5AB5C1309C2FA000B38F1 /* CheckerHelpers.cpp */, + BBA5AB5D1309C2FA000B38F1 /* CheckerManager.cpp */, + BBA5AB5F1309C2FA000B38F1 /* CoreEngine.cpp */, + BBA5AB601309C2FA000B38F1 /* CXXExprEngine.cpp */, + BBA5AB611309C2FA000B38F1 /* Environment.cpp */, + BBA5AB621309C2FA000B38F1 /* ExplodedGraph.cpp */, + BBA5AB631309C2FA000B38F1 /* FlatStore.cpp */, + BBA5AB641309C2FA000B38F1 /* GRState.cpp */, + BBA5AB651309C2FA000B38F1 /* HTMLDiagnostics.cpp */, + BBA5AB671309C2FA000B38F1 /* MemRegion.cpp */, + BBA5AB681309C2FA000B38F1 /* ObjCMessage.cpp */, + BBA5AB691309C2FA000B38F1 /* PathDiagnostic.cpp */, + BBA5AB6A1309C2FA000B38F1 /* PlistDiagnostics.cpp */, + BBA5AB6B1309C2FA000B38F1 /* RangeConstraintManager.cpp */, + BBA5AB6C1309C2FA000B38F1 /* RegionStore.cpp */, + BBA5AB6D1309C2FA000B38F1 /* SimpleConstraintManager.cpp */, + BBA5AB6E1309C2FA000B38F1 /* SimpleConstraintManager.h */, + BBA5AB6F1309C2FA000B38F1 /* SimpleSValBuilder.cpp */, + BBA5AB701309C2FA000B38F1 /* Store.cpp */, + BBA5AB711309C2FA000B38F1 /* SValBuilder.cpp */, + BBA5AB721309C2FA000B38F1 /* SVals.cpp */, + BBA5AB731309C2FA000B38F1 /* SymbolManager.cpp */, + BBA5AB741309C2FA000B38F1 /* TextPathDiagnostics.cpp */, + ); + path = Core; + sourceTree = ""; + }; + BBA5AB751309C2FA000B38F1 /* Frontend */ = { + isa = PBXGroup; + children = ( + BBA5AB761309C2FA000B38F1 /* AnalysisConsumer.cpp */, + BBA5AB771309C2FA000B38F1 /* AnalysisConsumer.h */, + BBA5AB781309C2FA000B38F1 /* CheckerRegistration.cpp */, + BBA5AB7A1309C2FA000B38F1 /* FrontendActions.cpp */, + ); + path = Frontend; + sourceTree = ""; + }; BFE2F67911DA95590007EDC0 /* Rewrite */ = { isa = PBXGroup; children = ( - BFE2F67A11DA95590007EDC0 /* CMakeLists.txt */, - BFE2F67B11DA95590007EDC0 /* Debug */, BFE2F69311DA955A0007EDC0 /* DeltaTree.cpp */, BFE2F69411DA955A0007EDC0 /* FixItRewriter.cpp */, BFE2F69511DA955A0007EDC0 /* FrontendActions.cpp */, BFE2F69611DA955A0007EDC0 /* HTMLPrint.cpp */, BFE2F69711DA955A0007EDC0 /* HTMLRewrite.cpp */, - BFE2F69811DA955A0007EDC0 /* Makefile */, - BFE2F69911DA955A0007EDC0 /* Release-Asserts */, BFE2F6A511DA955A0007EDC0 /* RewriteMacros.cpp */, BFE2F6A611DA955A0007EDC0 /* RewriteObjC.cpp */, BFE2F6A711DA955A0007EDC0 /* Rewriter.cpp */, @@ -1362,44 +1239,6 @@ path = lib/Rewrite; sourceTree = ""; }; - BFE2F67B11DA95590007EDC0 /* Debug */ = { - isa = PBXGroup; - children = ( - BFE2F67C11DA95590007EDC0 /* .dir */, - BFE2F67D11DA95590007EDC0 /* DeltaTree.d */, - BFE2F67E11DA955A0007EDC0 /* DeltaTree.o */, - BFE2F67F11DA955A0007EDC0 /* FixItRewriter.d */, - BFE2F68011DA955A0007EDC0 /* FixItRewriter.o */, - BFE2F68111DA955A0007EDC0 /* FrontendActions.d */, - BFE2F68211DA955A0007EDC0 /* FrontendActions.o */, - BFE2F68311DA955A0007EDC0 /* HTMLPrint.d */, - BFE2F68411DA955A0007EDC0 /* HTMLPrint.o */, - BFE2F68511DA955A0007EDC0 /* HTMLRewrite.d */, - BFE2F68611DA955A0007EDC0 /* HTMLRewrite.o */, - BFE2F68711DA955A0007EDC0 /* RewriteMacros.d */, - BFE2F68911DA955A0007EDC0 /* RewriteObjC.d */, - BFE2F68B11DA955A0007EDC0 /* Rewriter.d */, - BFE2F69111DA955A0007EDC0 /* TokenRewriter.d */, - BFE2F69211DA955A0007EDC0 /* TokenRewriter.o */, - ); - path = Debug; - sourceTree = ""; - }; - BFE2F69911DA955A0007EDC0 /* Release-Asserts */ = { - isa = PBXGroup; - children = ( - BFE2F69A11DA955A0007EDC0 /* .dir */, - BFE2F69B11DA955A0007EDC0 /* DeltaTree.d */, - BFE2F69C11DA955A0007EDC0 /* DeltaTree.o */, - BFE2F69D11DA955A0007EDC0 /* HTMLRewrite.d */, - BFE2F69E11DA955A0007EDC0 /* HTMLRewrite.o */, - BFE2F69F11DA955A0007EDC0 /* Rewriter.d */, - BFE2F6A311DA955A0007EDC0 /* TokenRewriter.d */, - BFE2F6A411DA955A0007EDC0 /* TokenRewriter.o */, - ); - path = "Release-Asserts"; - sourceTree = ""; - }; C6859E8C029090F304C91782 /* Documentation */ = { isa = PBXGroup; children = ( @@ -1474,7 +1313,6 @@ BF9FEDFE1225E6DD003A8B71 /* TargetAttributesSema.cpp */, BF9FEDFC1225E6C6003A8B71 /* DeclSpec.cpp */, BF9FEDFA1225E6A9003A8B71 /* AttributeList.cpp */, - BF9FEDF81225E67B003A8B71 /* Action.cpp */, BF89C3E111595818001C2D68 /* AnalysisBasedWarnings.cpp */, 1A6B6CD110693FC900BB4A8F /* CodeCompleteConsumer.cpp */, 352712500DAFE54700C76352 /* IdentifierResolver.cpp */, @@ -1551,6 +1389,7 @@ BF9FEE301225E86C003A8B71 /* CodeGenAction.cpp */, BF9FEE2F1225E854003A8B71 /* CGRecordLayout.h */, BF9FEE2E1225E82D003A8B71 /* CGException.h */, + 1A3D2C4D12A2CD3D0088C44A /* CGCXXABI.cpp */, BF9FEE2D1225E80F003A8B71 /* CGCXXABI.h */, BF9FEE2B1225E7EA003A8B71 /* BackendUtil.cpp */, 1A2193CB0F45EEB700C0713D /* ABIInfo.h */, @@ -1695,6 +1534,7 @@ 1ABD23BE1182449800A48E65 /* DeclObjC.cpp */, 1ABD23BF1182449800A48E65 /* DeclPrinter.cpp */, 1ABD23C01182449800A48E65 /* DeclTemplate.cpp */, + BB5C372812A5057500259F53 /* DumpXML.cpp */, 1ABD23C11182449800A48E65 /* Expr.cpp */, 1ABD23C21182449800A48E65 /* ExprConstant.cpp */, 1ABD23C31182449800A48E65 /* ExprCXX.cpp */, @@ -2006,7 +1846,6 @@ 72D16C1E0D9975C400E6DA4A /* HTMLRewrite.cpp */, DEF7D9F80C9C8B1D0001F598 /* Rewriter.cpp */, DECAB0CF0DB3C84200E13CCB /* RewriteRope.cpp */, - DE4DC7A20EA1C33E00069E5A /* TokenRewriter.cpp */, ); name = Rewrite; sourceTree = ""; @@ -2039,6 +1878,7 @@ isa = PBXProject; buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */; compatibilityVersion = "Xcode 2.4"; + developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( English, @@ -2060,282 +1900,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - DED7D77A0A5242C7003AD0FB /* Diagnostic.cpp in Sources */, - DED7D77B0A5242C7003AD0FB /* FileManager.cpp in Sources */, - DED7D7890A5242C7003AD0FB /* SourceManager.cpp in Sources */, - DED7D78A0A5242C7003AD0FB /* TokenKinds.cpp in Sources */, - DED7D7C30A5242E6003AD0FB /* Lexer.cpp in Sources */, - DED7D7C50A5242E6003AD0FB /* MacroInfo.cpp in Sources */, - DED7D7C70A5242E6003AD0FB /* PPExpressions.cpp in Sources */, - DED7D7C80A5242E6003AD0FB /* Pragma.cpp in Sources */, - DED7D7C90A5242E6003AD0FB /* Preprocessor.cpp in Sources */, - DED7D9E50A5257F6003AD0FB /* ScratchBuffer.cpp in Sources */, - DE06D4310A8BB52D0050E87E /* Parser.cpp in Sources */, - DED626C90AE0C065001E80A4 /* TargetInfo.cpp in Sources */, - DE344B540AE5E46C00DBC861 /* HeaderSearch.cpp in Sources */, - DE3460000AFDCC1900DBC861 /* ParseObjc.cpp in Sources */, - DE3460050AFDCC6500DBC861 /* ParseInit.cpp in Sources */, - DE34600B0AFDCCBF00DBC861 /* ParseStmt.cpp in Sources */, - DE34600F0AFDCCCE00DBC861 /* ParseDecl.cpp in Sources */, - DE3460130AFDCCDA00DBC861 /* ParseExpr.cpp in Sources */, - 1A869AA80BA21ABA008DA07A /* LiteralSupport.cpp in Sources */, - DE67E70B0C020EC500F66BC5 /* SemaType.cpp in Sources */, - DE67E70D0C020ECA00F66BC5 /* SemaStmt.cpp in Sources */, - DE67E70F0C020ECF00F66BC5 /* SemaExprCXX.cpp in Sources */, - DE67E7110C020ED400F66BC5 /* SemaExpr.cpp in Sources */, - DE67E7130C020ED900F66BC5 /* SemaDecl.cpp in Sources */, - DE67E7170C020EE400F66BC5 /* Sema.cpp in Sources */, - DE06756C0C051CFE00EBBFD8 /* ParseExprCXX.cpp in Sources */, - DE928B130C05659200231DA4 /* ModuleBuilder.cpp in Sources */, - DE928B7F0C0A615600231DA4 /* CodeGenModule.cpp in Sources */, - DE928B830C0A616000231DA4 /* CodeGenFunction.cpp in Sources */, - DE4772FA0C10EAE5002239E8 /* CGStmt.cpp in Sources */, - DE4772FC0C10EAEC002239E8 /* CGExpr.cpp in Sources */, - DE4264FC0C113592005A861D /* CGDecl.cpp in Sources */, - DEEBC3BC0C2363BC00A9FE82 /* CodeGenTypes.cpp in Sources */, - DEF2EFF30C6CDD74000C4259 /* CGExprAgg.cpp in Sources */, - DEF2F0100C6CFED5000C4259 /* SemaChecking.cpp in Sources */, - 1ABC36940C7A4BDC006DB0AB /* CGBuiltin.cpp in Sources */, - DE224FF80C7AA98800D370A5 /* CGExprComplex.cpp in Sources */, - 1A7342480C7B57D500122F56 /* CGObjC.cpp in Sources */, - DE2252700C7E82D000D370A5 /* CGExprScalar.cpp in Sources */, - DE2255FC0C8004E600D370A5 /* ParseDeclCXX.cpp in Sources */, - 356EF9B50C8F7DDF006650F5 /* LiveVariables.cpp in Sources */, - DEF7D9F90C9C8B1D0001F598 /* Rewriter.cpp in Sources */, - DE3986F40CB8D50C00223765 /* IdentifierTable.cpp in Sources */, - 35707EFE0CD0F5CC000B2204 /* SourceLocation.cpp in Sources */, - DE704B260D0FBEBE009C7762 /* SemaDeclObjC.cpp in Sources */, - DE704DD20D1668A4009C7762 /* HeaderMap.cpp in Sources */, - DE47999C0D2EBE1A00706D2D /* SemaExprObjC.cpp in Sources */, - 03F50AC60D416EAA00B9CF60 /* Targets.cpp in Sources */, - 1A376A2D0D4AED9B002A1C52 /* CGExprConstant.cpp in Sources */, - DE38CD500D794D0100A273B6 /* CGObjCGNU.cpp in Sources */, - DE4121350D7F1C1C0080F80A /* SymbolManager.cpp in Sources */, - DE4121360D7F1C1C0080F80A /* ExplodedGraph.cpp in Sources */, - DE4121370D7F1C1C0080F80A /* UninitializedValues.cpp in Sources */, - DE4121380D7F1C1C0080F80A /* GRCoreEngine.cpp in Sources */, - DE41213C0D7F1C1C0080F80A /* GRSimpleVals.cpp in Sources */, - DE41213D0D7F1C1C0080F80A /* GRBlockCounter.cpp in Sources */, - DE41213E0D7F1C1C0080F80A /* GRExprEngine.cpp in Sources */, - 35D55B270D81D8C60092E734 /* BasicValueFactory.cpp in Sources */, - 35D55B280D81D8C60092E734 /* CFRefCount.cpp in Sources */, - DE85CD810D8380B10070E26E /* TokenLexer.cpp in Sources */, - DE85CDA30D8383B20070E26E /* MacroArgs.cpp in Sources */, - DE85CDAC0D838C120070E26E /* PPMacroExpansion.cpp in Sources */, - DE85CDB00D838C390070E26E /* PPDirectives.cpp in Sources */, - DE85CDB60D839BAE0070E26E /* PPLexerChange.cpp in Sources */, - 72D16C1F0D9975C400E6DA4A /* HTMLRewrite.cpp in Sources */, - 35A8FCF90D9B4B2A001C2F97 /* PathDiagnostic.cpp in Sources */, - 35F8D0D60D9B82CD00D91C5E /* BasicObjCFoundationChecks.cpp in Sources */, - 3593790A0DA48ABA0043B19C /* BugReporter.cpp in Sources */, - 35EF67700DAD1D2C00B19414 /* SemaDeclCXX.cpp in Sources */, - 352712510DAFE54700C76352 /* IdentifierResolver.cpp in Sources */, - DEFFECA70DB1546600B4E7C3 /* DeltaTree.cpp in Sources */, - DECAB0D00DB3C84200E13CCB /* RewriteRope.cpp in Sources */, - 35EFEFB60DB67ED60020783D /* GRTransferFuncs.cpp in Sources */, - 35A3E7020DD3874400757F74 /* CGDebugInfo.cpp in Sources */, - 3599299B0DE2425300A8A33E /* SemaInit.cpp in Sources */, - 3534A01D0E129849002709B2 /* ParseCXXInlineMethods.cpp in Sources */, - DE22BCF20E14197E0094DC60 /* SemaDeclAttr.cpp in Sources */, - 3595AFB80E1C8D62004CDF09 /* CheckObjCDealloc.cpp in Sources */, - 3536456B0E23EBF7009C6509 /* Environment.cpp in Sources */, - 3558F76D0E267C8300A5B0DF /* BasicStore.cpp in Sources */, - 3507E4C20E27FE2D00FB7B57 /* CheckObjCInstMethSignature.cpp in Sources */, - 35862B0D0E3628CB0009F542 /* CheckDeadStores.cpp in Sources */, - 35862B120E3629850009F542 /* GRExprEngineInternalChecks.cpp in Sources */, - 35F2A01E0E36AFF100D17527 /* CheckObjCUnusedIVars.cpp in Sources */, - 3552E7550E520D80003A8CA5 /* PPCaching.cpp in Sources */, - 3552E7590E520DD7003A8CA5 /* CGObjCMac.cpp in Sources */, - 358F51520E529AA4007F2102 /* GRState.cpp in Sources */, - 1A5D5E580E5E81010023C059 /* CGCXX.cpp in Sources */, - 358CFBB80E65AB04002A8E19 /* BasicConstraintManager.cpp in Sources */, - 35475B200E79973F0000BFE4 /* CGCall.cpp in Sources */, - 35BAC1E80E82C5B7003FB76F /* CheckNSError.cpp in Sources */, - 355106860E9A8507006A4E44 /* MemRegion.cpp in Sources */, - 3551068C0E9A8546006A4E44 /* ParsePragma.cpp in Sources */, - 3551068D0E9A8546006A4E44 /* ParseTentative.cpp in Sources */, - DE4DC7A30EA1C33E00069E5A /* TokenRewriter.cpp in Sources */, - 35A057E20EAE2D950069249F /* RegionStore.cpp in Sources */, - 35A057E30EAE2D950069249F /* SVals.cpp in Sources */, - 35585DC00EAFBC4500D0A97A /* SemaOverload.cpp in Sources */, - 35E194690ECB82FB00F21733 /* SemaCXXScopeSpec.cpp in Sources */, - 35E1946A0ECB82FB00F21733 /* SemaCXXCast.cpp in Sources */, - 35E1946D0ECB83C100F21733 /* PTHLexer.cpp in Sources */, - 3537AA0E0ECD08A4008F7CDC /* PreprocessorLexer.cpp in Sources */, - 353959D50EE5F88A00E82461 /* ParseTemplate.cpp in Sources */, - 3591853F0EFB1088000039AF /* SemaTemplate.cpp in Sources */, - 357EA27D0F2526F300439B60 /* SemaLookup.cpp in Sources */, - 1A471AB50F437BC500753CE8 /* CGBlocks.cpp in Sources */, - DEB077990F44F97800F5A2BE /* TokenConcatenation.cpp in Sources */, - 1A2193CE0F45EEB700C0713D /* Mangle.cpp in Sources */, - DEB07AC80F4A427E00F5A2BE /* SemaAttr.cpp in Sources */, - 352246E80F5C6BE000D0D279 /* InitHeaderSearch.cpp in Sources */, - 352246EB0F5C6BE000D0D279 /* TextDiagnosticBuffer.cpp in Sources */, - 352246EC0F5C6BE000D0D279 /* TextDiagnosticPrinter.cpp in Sources */, - 35544B880F5C7FD700D92AA9 /* RangeConstraintManager.cpp in Sources */, - 35544B890F5C7FD700D92AA9 /* SimpleConstraintManager.cpp in Sources */, - 35544B8C0F5C803200D92AA9 /* SemaTemplateInstantiate.cpp in Sources */, - 1ADF47AF0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp in Sources */, - DEDFE6460F7B3B4E0035BD10 /* driver.cpp in Sources */, - DEDFE65A0F7B3B830035BD10 /* Types.cpp in Sources */, - DEDFE65B0F7B3B830035BD10 /* Tools.cpp in Sources */, - DEDFE65C0F7B3B830035BD10 /* Compilation.cpp in Sources */, - DEDFE65D0F7B3B830035BD10 /* ArgList.cpp in Sources */, - DEDFE65E0F7B3B830035BD10 /* Arg.cpp in Sources */, - DEDFE65F0F7B3B830035BD10 /* Action.cpp in Sources */, - DEDFE6600F7B3B830035BD10 /* Phases.cpp in Sources */, - DEDFE6610F7B3B830035BD10 /* OptTable.cpp in Sources */, - DEDFE6620F7B3B830035BD10 /* Option.cpp in Sources */, - DEDFE6630F7B3B830035BD10 /* Job.cpp in Sources */, - DEDFE6640F7B3B830035BD10 /* ToolChains.cpp in Sources */, - DEDFE6650F7B3B830035BD10 /* ToolChain.cpp in Sources */, - DEDFE6660F7B3B830035BD10 /* Tool.cpp in Sources */, - DEDFE6670F7B3B830035BD10 /* HostInfo.cpp in Sources */, - DEDFE6680F7B3B830035BD10 /* Driver.cpp in Sources */, - 1A701B640F7C8FE400FEC4D1 /* SemaAccess.cpp in Sources */, - 906BF4B00F83BA2E001071FA /* ConvertUTF.c in Sources */, - DECB6D650F9AE26600F5FBC7 /* JumpDiagnostics.cpp in Sources */, - DECB6F070F9D93A800F5FBC7 /* InitPreprocessor.cpp in Sources */, - 1A2A54B60FD1DD1C00F4CE45 /* ASTConsumers.cpp in Sources */, - 1A2A54B80FD1DD1C00F4CE45 /* CacheTokens.cpp in Sources */, - 1A2A54B90FD1DD1C00F4CE45 /* DependencyFile.cpp in Sources */, - 1A2A54BA0FD1DD1C00F4CE45 /* DiagChecker.cpp in Sources */, - 1A2A54BB0FD1DD1C00F4CE45 /* DocumentXML.cpp in Sources */, - 1A2A54BF0FD1DD1C00F4CE45 /* PrintPreprocessedOutput.cpp in Sources */, - 1A2A54C40FD1DD1C00F4CE45 /* StmtXML.cpp in Sources */, - 1A2A54C50FD1DD1C00F4CE45 /* Warnings.cpp in Sources */, - 1A6FE7090FD6F85800E00CA9 /* CGTemporaries.cpp in Sources */, - BDF87CF70FD746F300BBF872 /* SemaTemplateDeduction.cpp in Sources */, - DE37252E0FE481AD00CF2CC2 /* Builtins.cpp in Sources */, - 1AFF8AE31012BFC900D248DA /* CGRecordLayoutBuilder.cpp in Sources */, - 90FD6D7B103C3D49005F5B73 /* Analyzer.cpp in Sources */, - 90FD6D7C103C3D49005F5B73 /* ASTLocation.cpp in Sources */, - 90FD6D7D103C3D49005F5B73 /* DeclReferenceMap.cpp in Sources */, - 90FD6D7E103C3D49005F5B73 /* Entity.cpp in Sources */, - 90FD6D7F103C3D49005F5B73 /* GlobalSelector.cpp in Sources */, - 90FD6D80103C3D49005F5B73 /* Handlers.cpp in Sources */, - 90FD6D81103C3D49005F5B73 /* Indexer.cpp in Sources */, - 90FD6D82103C3D49005F5B73 /* IndexProvider.cpp in Sources */, - 90FD6D83103C3D49005F5B73 /* Program.cpp in Sources */, - 90FD6D85103C3D49005F5B73 /* SelectorMap.cpp in Sources */, - 90FD6DB6103D977E005F5B73 /* index-test.cpp in Sources */, - 9012911D1048068D0083456D /* ASTUnit.cpp in Sources */, - 90129121104812F90083456D /* CIndex.cpp in Sources */, - 90F9EFAA104ABDED00D09A15 /* c-index-test.c in Sources */, - 1A4C41BF105B4C0B0047B5E7 /* CGClass.cpp in Sources */, - 1A6B6CD410693FC900BB4A8F /* CodeCompleteConsumer.cpp in Sources */, - 1A6B6CD510693FC900BB4A8F /* SemaCodeComplete.cpp in Sources */, - 1A6B6E9A1069833600BB4A8F /* CGExprCXX.cpp in Sources */, - 1A6C01F7108128710072DEE4 /* CGRTTI.cpp in Sources */, - 1A81AA19108144F40094E50B /* CGVTables.cpp in Sources */, - 1AF1B50F109A4FB800AFAFAC /* CGException.cpp in Sources */, - 1A986AB710D0746D00A8EA9E /* CGDeclCXX.cpp in Sources */, - E16B523510D30B2400430AC9 /* cc1_main.cpp in Sources */, - 1ACB57E41105820D0047B991 /* CompilerInstance.cpp in Sources */, - 1ACB57E51105820D0047B991 /* CompilerInvocation.cpp in Sources */, - 1ACB57E61105820D0047B991 /* DeclXML.cpp in Sources */, - 1ACB57E71105820D0047B991 /* FrontendAction.cpp in Sources */, - 1ACB57E81105820D0047B991 /* FrontendActions.cpp in Sources */, - 1ACB57E91105820D0047B991 /* FrontendOptions.cpp in Sources */, - 1ACB57EA1105820D0047B991 /* LangStandards.cpp in Sources */, - 1ACB57EB1105820D0047B991 /* TypeXML.cpp in Sources */, - 1ACB57EC1105820D0047B991 /* VerifyDiagnosticsClient.cpp in Sources */, - 1A97825B1108BA18002B98FC /* CGVTT.cpp in Sources */, - 1A621BB7110FE6AA009E6834 /* TargetInfo.cpp in Sources */, - 1A621C4211111D61009E6834 /* CIndexCodeCompletion.cpp in Sources */, - 1A621C4311111D61009E6834 /* CIndexer.cpp in Sources */, - 1A621C4411111D61009E6834 /* CIndexInclusionStack.cpp in Sources */, - 1A621C4511111D61009E6834 /* CIndexUSRs.cpp in Sources */, - 1A621C4611111D61009E6834 /* CXCursor.cpp in Sources */, - BF89C3E211595818001C2D68 /* AnalysisBasedWarnings.cpp in Sources */, - BF89C3E91159594A001C2D68 /* SemaObjCProperty.cpp in Sources */, - BF89C3F911595A01001C2D68 /* SemaType.cpp in Sources */, - BF89C3FB11595A37001C2D68 /* SemaCodeComplete.cpp in Sources */, - BF89C3FD11595A5D001C2D68 /* SemaExceptionSpec.cpp in Sources */, - 1AFDD8721161085D00AE030A /* ASTMerge.cpp in Sources */, - 1ABD23D61182449800A48E65 /* APValue.cpp in Sources */, - 1ABD23D71182449800A48E65 /* ASTConsumer.cpp in Sources */, - 1ABD23D81182449800A48E65 /* ASTContext.cpp in Sources */, - 1ABD23D91182449800A48E65 /* ASTDiagnostic.cpp in Sources */, - 1ABD23DA1182449800A48E65 /* ASTImporter.cpp in Sources */, - 1ABD23DB1182449800A48E65 /* AttrImpl.cpp in Sources */, - 1ABD23DC1182449800A48E65 /* CXXInheritance.cpp in Sources */, - 1ABD23DD1182449800A48E65 /* Decl.cpp in Sources */, - 1ABD23DE1182449800A48E65 /* DeclarationName.cpp in Sources */, - 1ABD23DF1182449800A48E65 /* DeclBase.cpp in Sources */, - 1ABD23E01182449800A48E65 /* DeclCXX.cpp in Sources */, - 1ABD23E11182449800A48E65 /* DeclFriend.cpp in Sources */, - 1ABD23E21182449800A48E65 /* DeclGroup.cpp in Sources */, - 1ABD23E31182449800A48E65 /* DeclObjC.cpp in Sources */, - 1ABD23E41182449800A48E65 /* DeclPrinter.cpp in Sources */, - 1ABD23E51182449800A48E65 /* DeclTemplate.cpp in Sources */, - 1ABD23E61182449800A48E65 /* Expr.cpp in Sources */, - 1ABD23E71182449800A48E65 /* ExprConstant.cpp in Sources */, - 1ABD23E81182449800A48E65 /* ExprCXX.cpp in Sources */, - 1ABD23E91182449800A48E65 /* FullExpr.cpp in Sources */, - 1ABD23EA1182449800A48E65 /* InheritViz.cpp in Sources */, - 1ABD23EB1182449800A48E65 /* NestedNameSpecifier.cpp in Sources */, - 1ABD23EC1182449800A48E65 /* ParentMap.cpp in Sources */, - 1ABD23ED1182449800A48E65 /* RecordLayout.cpp in Sources */, - 1ABD23EE1182449800A48E65 /* RecordLayoutBuilder.cpp in Sources */, - 1ABD23EF1182449800A48E65 /* Stmt.cpp in Sources */, - 1ABD23F01182449800A48E65 /* StmtDumper.cpp in Sources */, - 1ABD23F11182449800A48E65 /* StmtIterator.cpp in Sources */, - 1ABD23F21182449800A48E65 /* StmtPrinter.cpp in Sources */, - 1ABD23F31182449800A48E65 /* StmtProfile.cpp in Sources */, - 1ABD23F41182449800A48E65 /* StmtViz.cpp in Sources */, - 1ABD23F51182449800A48E65 /* TemplateBase.cpp in Sources */, - 1ABD23F61182449800A48E65 /* TemplateName.cpp in Sources */, - 1ABD23F71182449800A48E65 /* Type.cpp in Sources */, - 1ABD23F81182449800A48E65 /* TypeLoc.cpp in Sources */, - 1ABD23F91182449800A48E65 /* TypePrinter.cpp in Sources */, - BFE2F6AB11DA955A0007EDC0 /* DeltaTree.d in Sources */, - BFE2F6AD11DA955A0007EDC0 /* FixItRewriter.d in Sources */, - BFE2F6AF11DA955A0007EDC0 /* FrontendActions.d in Sources */, - BFE2F6B111DA955A0007EDC0 /* HTMLPrint.d in Sources */, - BFE2F6B311DA955A0007EDC0 /* HTMLRewrite.d in Sources */, - BFE2F6B511DA955A0007EDC0 /* RewriteMacros.d in Sources */, - BFE2F6B711DA955A0007EDC0 /* RewriteObjC.d in Sources */, - BFE2F6B911DA955A0007EDC0 /* Rewriter.d in Sources */, - BFE2F6BF11DA955A0007EDC0 /* TokenRewriter.d in Sources */, - BFE2F6C111DA955A0007EDC0 /* DeltaTree.cpp in Sources */, - BFE2F6C211DA955A0007EDC0 /* FixItRewriter.cpp in Sources */, - BFE2F6C311DA955A0007EDC0 /* FrontendActions.cpp in Sources */, - BFE2F6C411DA955A0007EDC0 /* HTMLPrint.cpp in Sources */, - BFE2F6C511DA955A0007EDC0 /* HTMLRewrite.cpp in Sources */, - BFE2F6C611DA955A0007EDC0 /* Makefile in Sources */, - BFE2F6C711DA955A0007EDC0 /* DeltaTree.d in Sources */, - BFE2F6C911DA955A0007EDC0 /* HTMLRewrite.d in Sources */, - BFE2F6CB11DA955A0007EDC0 /* Rewriter.d in Sources */, - BFE2F6CF11DA955A0007EDC0 /* TokenRewriter.d in Sources */, - BFE2F6D111DA955A0007EDC0 /* RewriteMacros.cpp in Sources */, - BFE2F6D211DA955A0007EDC0 /* RewriteObjC.cpp in Sources */, - BFE2F6D311DA955A0007EDC0 /* Rewriter.cpp in Sources */, - BFE2F6D411DA955A0007EDC0 /* RewriteRope.cpp in Sources */, - BFE2F6D511DA955A0007EDC0 /* RewriteTest.cpp in Sources */, - BFE2F6D611DA955A0007EDC0 /* TokenRewriter.cpp in Sources */, - 57EB566A121B034300ECA335 /* GeneratePCH.cpp in Sources */, - 57EB566B121B034300ECA335 /* Makefile in Sources */, - 57F66612121B4DE600DCE3B7 /* ASTWriter.cpp in Sources */, - 57F66613121B4DE600DCE3B7 /* ASTWriterDecl.cpp in Sources */, - 57F66614121B4DE600DCE3B7 /* ASTWriterStmt.cpp in Sources */, - 57AA9250121C8B9400B4AA6C /* ASTReader.cpp in Sources */, - 57AA9251121C8B9400B4AA6C /* ASTReaderDecl.cpp in Sources */, - 57AA9252121C8B9400B4AA6C /* ASTReaderStmt.cpp in Sources */, - BF9FEDF91225E67B003A8B71 /* Action.cpp in Sources */, - BF9FEDFB1225E6A9003A8B71 /* AttributeList.cpp in Sources */, - BF9FEDFD1225E6C6003A8B71 /* DeclSpec.cpp in Sources */, - BF9FEDFF1225E6DD003A8B71 /* TargetAttributesSema.cpp in Sources */, - BF9FEE021225E73F003A8B71 /* ExprClassification.cpp in Sources */, - BF9FEE041225E759003A8B71 /* ItaniumCXXABI.cpp in Sources */, - BF9FEE061225E770003A8B71 /* MicrosoftCXXABI.cpp in Sources */, - BF9FEE2C1225E7EA003A8B71 /* BackendUtil.cpp in Sources */, - BF9FEE311225E86C003A8B71 /* CodeGenAction.cpp in Sources */, - BF9FEE331225E898003A8B71 /* ItaniumCXXABI.cpp in Sources */, - BF9FEE351225E8B1003A8B71 /* MicrosoftCXXABI.cpp in Sources */, - BF9FEE381225E925003A8B71 /* BoostConAction.cpp in Sources */, - BF9FEE521226FE9F003A8B71 /* ParseAST.cpp in Sources */, - BF9FEEF2122D8068003A8B71 /* PreprocessingRecord.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff -Nru clang-2.8/tools/clang/CMakeLists.txt clang-2.9/tools/clang/CMakeLists.txt --- clang-2.8/tools/clang/CMakeLists.txt 2010-06-25 23:34:47.000000000 +0000 +++ clang-2.9/tools/clang/CMakeLists.txt 2011-02-28 05:21:27.000000000 +0000 @@ -1,4 +1,64 @@ -# Clang version information +# If we are not building as a part of LLVM, build Clang as an +# standalone project, using LLVM as an external library: +if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) + project(Clang) + cmake_minimum_required(VERSION 2.8) + + set(CLANG_PATH_TO_LLVM_SOURCE "" CACHE PATH + "Path to LLVM source code. Not necessary if using an installed LLVM.") + set(CLANG_PATH_TO_LLVM_BUILD "" CACHE PATH + "Path to the directory where LLVM was built or installed.") + + if( CLANG_PATH_TO_LLVM_SOURCE ) + if( NOT EXISTS "${CLANG_PATH_TO_LLVM_SOURCE}/cmake/config-ix.cmake" ) + message(FATAL_ERROR "Please set CLANG_PATH_TO_LLVM_SOURCE to the root directory of LLVM source code.") + else() + get_filename_component(LLVM_MAIN_SRC_DIR ${CLANG_PATH_TO_LLVM_SOURCE} + ABSOLUTE) + list(APPEND CMAKE_MODULE_PATH "${LLVM_MAIN_SRC_DIR}/cmake/modules") + endif() + endif() + + if( NOT EXISTS "${CLANG_PATH_TO_LLVM_BUILD}/bin/tblgen${CMAKE_EXECUTABLE_SUFFIX}" ) + message(FATAL_ERROR "Please set CLANG_PATH_TO_LLVM_BUILD to a directory containing a LLVM build.") + endif() + + list(APPEND CMAKE_MODULE_PATH "${CLANG_PATH_TO_LLVM_BUILD}/share/llvm/cmake") + + get_filename_component(PATH_TO_LLVM_BUILD ${CLANG_PATH_TO_LLVM_BUILD} + ABSOLUTE) + + include(AddLLVM) + include(TableGen) + include("${CLANG_PATH_TO_LLVM_BUILD}/share/llvm/cmake/LLVM.cmake") + include(HandleLLVMOptions) + + set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}") + + set(LLVM_MAIN_INCLUDE_DIR "${LLVM_MAIN_SRC_DIR}/include") + set(LLVM_BINARY_DIR ${CMAKE_BINARY_DIR}) + + set(CMAKE_INCLUDE_CURRENT_DIR ON) + include_directories("${PATH_TO_LLVM_BUILD}/include" "${LLVM_MAIN_INCLUDE_DIR}") + if( NOT PATH_TO_LLVM_BUILD STREQUAL LLVM_MAIN_SRC_DIR ) + include_directories("${LLVM_MAIN_INCLUDE_DIR}") + endif() + link_directories("${PATH_TO_LLVM_BUILD}/lib") + + set(LLVM_TABLEGEN_EXE "${PATH_TO_LLVM_BUILD}/bin/tblgen") + + set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin ) + set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib ) + set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib ) + + set( CLANG_BUILT_STANDALONE 1 ) +endif() + +set(CLANG_RESOURCE_DIR "" CACHE STRING + "Relative directory from the Clang binary to its resource files.") + +set(C_INCLUDE_DIRS "" CACHE STRING + "Colon separated list of directories clang will search for headers.") set(CLANG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(CLANG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) @@ -24,7 +84,7 @@ endif() # Compute the Clang version from the LLVM version. -string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION +string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION ${PACKAGE_VERSION}) message(STATUS "Clang version: ${CLANG_VERSION}") @@ -47,23 +107,57 @@ # Add appropriate flags for GCC if (CMAKE_COMPILER_IS_GNUCXX) - # FIXME: Turn off exceptions, RTTI: - # -fno-exceptions -fno-rtti - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-common -Woverloaded-virtual -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings") endif () if (APPLE) set(CMAKE_MODULE_LINKER_FLAGS "-Wl,-flat_namespace -Wl,-undefined -Wl,suppress") endif () +configure_file( + ${CLANG_SOURCE_DIR}/include/clang/Config/config.h.cmake + ${CLANG_BINARY_DIR}/include/clang/Config/config.h) + +include(LLVMParseArguments) + +function(clang_tablegen) + # Syntax: + # clang_tablegen output-file [tablegen-arg ...] SOURCE source-file + # [[TARGET cmake-target-name] [DEPENDS extra-dependency ...]] + # + # Generates a custom command for invoking tblgen as + # + # tblgen source-file -o=output-file tablegen-arg ... + # + # and, if cmake-target-name is provided, creates a custom target for + # executing the custom command depending on output-file. It is + # possible to list more files to depend after DEPENDS. + + parse_arguments( CTG "SOURCE;TARGET;DEPENDS" "" ${ARGN} ) + + if( NOT CTG_SOURCE ) + message(FATAL_ERROR "SOURCE source-file required by clang_tablegen") + endif() + + set( LLVM_TARGET_DEFINITIONS ${CTG_SOURCE} ) + tablegen( ${CTG_DEFAULT_ARGS} ) + + list( GET CTG_DEFAULT_ARGS 0 output_file ) + if( CTG_TARGET ) + add_custom_target( ${CTG_TARGET} DEPENDS ${output_file} ${CTG_DEPENDS} ) + set_target_properties( ${CTG_TARGET} PROPERTIES FOLDER "Clang tablegenning") + endif() +endfunction(clang_tablegen) + macro(add_clang_library name) - set(srcs ${ARGN}) + llvm_process_sources(srcs ${ARGN}) if(MSVC_IDE OR XCODE) - file( GLOB_RECURSE headers *.h *.td *.def) - set(srcs ${srcs} ${headers}) string( REGEX MATCHALL "/[^/]+" split_path ${CMAKE_CURRENT_SOURCE_DIR}) list( GET split_path -1 dir) - file( GLOB_RECURSE headers + file( GLOB_RECURSE headers + ../../../include/clang/StaticAnalyzer${dir}/*.h + ../../../include/clang/StaticAnalyzer${dir}/*.td + ../../../include/clang/StaticAnalyzer${dir}/*.def ../../include/clang${dir}/*.h ../../include/clang${dir}/*.td ../../include/clang${dir}/*.def) @@ -88,10 +182,15 @@ if( LLVM_LINK_COMPONENTS ) llvm_config(${name} ${LLVM_LINK_COMPONENTS}) endif( LLVM_LINK_COMPONENTS ) - get_system_libs(llvm_system_libs) - if( llvm_system_libs ) - target_link_libraries(${name} ${llvm_system_libs}) - endif( llvm_system_libs ) + if (LLVM_COMMON_LIBS) + target_link_libraries(${name} ${LLVM_COMMON_LIBS}) + endif() + if( NOT MINGW ) + get_system_libs(llvm_system_libs) + if( llvm_system_libs ) + target_link_libraries(${name} ${llvm_system_libs}) + endif() + endif() add_dependencies(${name} ClangDiagnosticCommon) if(MSVC) get_target_property(cflag ${name} COMPILE_FLAGS) @@ -104,15 +203,12 @@ install(TARGETS ${name} LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) + set_target_properties(${name} PROPERTIES FOLDER "Clang libraries") endmacro(add_clang_library) macro(add_clang_executable name) - set(srcs ${ARGN}) - if(MSVC_IDE) - file( GLOB_RECURSE headers *.h *.td *.def) - set(srcs ${srcs} ${headers}) - endif(MSVC_IDE) - add_llvm_executable( ${name} ${srcs} ) + add_llvm_executable( ${name} ${ARGN} ) + set_target_properties(${name} PROPERTIES FOLDER "Clang executables") endmacro(add_clang_executable) include_directories( @@ -125,7 +221,6 @@ FILES_MATCHING PATTERN "*.def" PATTERN "*.h" - PATTERN "*.td" PATTERN ".svn" EXCLUDE ) @@ -136,7 +231,17 @@ PATTERN "*.inc" ) -add_definitions( -D_GNU_SOURCE ) +add_definitions( -D_GNU_SOURCE -DHAVE_CLANG_CONFIG_H ) + +# Clang version information +set(CLANG_EXECUTABLE_VERSION + "${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}" CACHE STRING + "Version number that will be placed into the clang executable, in the form XX.YY") +set(LIBCLANG_LIBRARY_VERSION + "${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}" CACHE STRING + "Version number that will be placed into the libclang library , in the form XX.YY") +mark_as_advanced(CLANG_EXECUTABLE_VERSION LIBCLANG_LIBRARY_VERSION) + option(CLANG_BUILD_EXAMPLES "Build CLANG example programs." OFF) if(CLANG_BUILD_EXAMPLES) @@ -146,7 +251,22 @@ add_subdirectory(include) add_subdirectory(lib) add_subdirectory(tools) +add_subdirectory(runtime) # TODO: docs. add_subdirectory(test) +if( LLVM_INCLUDE_TESTS ) + if( NOT CLANG_BUILT_STANDALONE ) + add_subdirectory(unittests) + endif() +endif() + +# Workaround for MSVS10 to avoid the Dialog Hell +# FIXME: This could be removed with future version of CMake. +if( CLANG_BUILT_STANDALONE AND MSVC_VERSION EQUAL 1600 ) + set(CLANG_SLN_FILENAME "${CMAKE_CURRENT_BINARY_DIR}/Clang.sln") + if( EXISTS "${CLANG_SLN_FILENAME}" ) + file(APPEND "${CLANG_SLN_FILENAME}" "\n# This should be regenerated!\n") + endif() +endif() diff -Nru clang-2.8/tools/clang/docs/Block-ABI-Apple.txt clang-2.9/tools/clang/docs/Block-ABI-Apple.txt --- clang-2.8/tools/clang/docs/Block-ABI-Apple.txt 2010-05-07 00:42:33.000000000 +0000 +++ clang-2.9/tools/clang/docs/Block-ABI-Apple.txt 2010-10-28 23:30:10.000000000 +0000 @@ -67,19 +67,21 @@ BLOCK_HAS_COPY_DISPOSE = (1 << 25), BLOCK_HAS_CTOR = (1 << 26), // helpers have C++ code BLOCK_IS_GLOBAL = (1 << 28), - BLOCK_HAS_STRET = (1 << 29), + BLOCK_HAS_STRET = (1 << 29), // IFF BLOCK_HAS_SIGNATURE BLOCK_HAS_SIGNATURE = (1 << 30), }; -In 10.6.ABI the (1<<29) was unconditionally set and ignored by the runtime - it was a transitional marker that did not get deleted after the transition. This bit is now paired with (1<<30), and represented as the pair (3<<30), for the following combinations of valid bit settings, and their meanings. +In 10.6.ABI the (1<<29) was usually set and was always ignored by the runtime - it had been a transitional marker that did not get deleted after the transition. This bit is now paired with (1<<30), and represented as the pair (3<<30), for the following combinations of valid bit settings, and their meanings. switch (flags & (3<<29)) { - case (0<<29): , error + case (0<<29): 10.6.ABI, no signature field available case (1<<29): 10.6.ABI, no signature field available case (2<<29): ABI.2010.3.16, regular calling convention, presence of signature field case (3<<29): ABI.2010.3.16, stret calling convention, presence of signature field, } +The signature field is not always populated. + The following discussions are presented as 10.6.ABI otherwise. Block literals may occur within functions where the structure is created in stack local memory. They may also appear as initialization expressions for Block variables of global or static local variables. @@ -348,7 +350,7 @@ and struct _block_byref_voidBlock voidBlock = {( .forwarding=&voidBlock, .flags=(1<<25), .size=sizeof(struct _block_byref_voidBlock *), .byref_keep=_block_byref_keep_helper, .byref_dispose=_block_byref_dispose_helper, - .captured_voidBlock=blockA }; + .captured_voidBlock=blockA )}; voidBlock.forwarding->captured_voidBlock = blockB; @@ -422,7 +424,9 @@ 2.3.5 __block escapes -Because Blocks referencing __block variables may have Block_copy() performed upon them the underlying storage for the variables may move to the heap. In Objective-C Garbage Collection Only compilation environments the heap used is the garbage collected one and no further action is required. Otherwise the compiler must issue a call to potentially release any heap storage for __block variables at all escapes or terminations of their scope. +Because Blocks referencing __block variables may have Block_copy() performed upon them the underlying storage for the variables may move to the heap. In Objective-C Garbage Collection Only compilation environments the heap used is the garbage collected one and no further action is required. Otherwise the compiler must issue a call to potentially release any heap storage for __block variables at all escapes or terminations of their scope. The call should be: + + _Block_object_dispose(&_block_byref_xxx, BLOCK_FIELD_IS_BYREF); 2.3.6 Nesting @@ -537,9 +541,9 @@ 4.0 C++ Support -Within a block stack based C++ objects are copied as const copies using the const copy constructor. It is an error if a stack based C++ object is used within a block if it does not have a const copy constructor. In addition both copy and destroy helper routines must be synthesized for the block to support the Block_copy() operation, and the flags work marked with the (1<<26) bit in addition to the (1<<25) bit. The copy helper should call the constructor using appropriate offsets of the variable within the supplied stack based block source and heap based destination for all const constructed copies, and similarly should call the destructor in the destroy routine. +Within a block stack based C++ objects are copied into const copies using the copy constructor. It is an error if a stack based C++ object is used within a block if it does not have a copy constructor. In addition both copy and destroy helper routines must be synthesized for the block to support the Block_copy() operation, and the flags work marked with the (1<<26) bit in addition to the (1<<25) bit. The copy helper should call the constructor using appropriate offsets of the variable within the supplied stack based block source and heap based destination for all const constructed copies, and similarly should call the destructor in the destroy routine. -As an example, suppose a C++ class FOO existed with a const copy constructor. Within a code block a stack version of a FOO object is declared and used within a Block literal expression: +As an example, suppose a C++ class FOO existed with a copy constructor. Within a code block a stack version of a FOO object is declared and used within a Block literal expression: { FOO foo; @@ -562,11 +566,11 @@ } void __block_literal_10(struct __block_literal_10 *dst, struct __block_literal_10 *src) { - comp_ctor(&dst->foo, &src->foo); + FOO_ctor(&dst->foo, &src->foo); } void __block_dispose_10(struct __block_literal_10 *src) { - comp_dtor(&src->foo); + FOO_dtor(&src->foo); } static struct __block_descriptor_10 { @@ -594,9 +598,33 @@ } -C++ objects stored in __block storage start out on the stack in a block_byref data structure as do other variables. Such objects (if not const objects) must support a regular copy constructor. The block_byref data structure will have copy and destroy helper routines synthesized by the compiler. The copy helper will have code created to perform the copy constructor based on the initial stack block_byref data structure, and will also set the (1<<26) bit in addition to the (1<<25) bit. The destroy helper will have code to do the destructor on the object stored within the supplied block_byref heap data structure. +C++ objects stored in __block storage start out on the stack in a block_byref data structure as do other variables. Such objects (if not const objects) must support a regular copy constructor. The block_byref data structure will have copy and destroy helper routines synthesized by the compiler. The copy helper will have code created to perform the copy constructor based on the initial stack block_byref data structure, and will also set the (1<<26) bit in addition to the (1<<25) bit. The destroy helper will have code to do the destructor on the object stored within the supplied block_byref heap data structure. For example, + + __block FOO blockStorageFoo; + +requires the normal constructor for the embedded blockStorageFoo object + + FOO_ctor(& _block_byref_blockStorageFoo->blockStorageFoo); -To support member variable and function access the compiler will synthesize a const pointer to a block version of the this pointer. +and at scope termination the destructor: + + FOO_dtor(& _block_byref_blockStorageFoo->blockStorageFoo); + +Note that the forwarding indirection is NOT used. + +The compiler would need to generate (if used from a block literal) the following copy/dispose helpers: + +void _block_byref_obj_keep(struct _block_byref_blockStorageFoo *dst, struct _block_byref_blockStorageFoo *src) { + FOO_ctor(&dst->blockStorageFoo, &src->blockStorageFoo); +} + +void _block_byref_obj_dispose(struct _block_byref_blockStorageFoo *src) { + FOO_dtor(&src->blockStorageFoo); +} + +for the appropriately named constructor and destructor for the class/struct FOO. + +To support member variable and function access the compiler will synthesize a const pointer to a block version of the "this" pointer. 5.0 Runtime Helper Functions @@ -640,31 +668,3 @@ */ void _Block_object_dispose(const void *object, const int flags); -The following functions have been used and will continue to be supported until new compiler support is complete. - -// Obsolete functions. -// Copy helper callback for copying a block imported into a Block -// Called by copy_helper helper functions synthesized by the compiler. -// The address in the destination block of an imported Block is provided as the first argument -// and the value of the existing imported Block is the second. -// Use: _Block_object_assign(dest, src, BLOCK_FIELD_IS_BLOCK {| BLOCK_FIELD_IS_WEAK}); -void _Block_copy_assign(struct Block_basic **dest, const struct Block_basic *src, const int flags); - -// Destroy helper callback for releasing Blocks imported into a Block -// Called by dispose_helper helper functions synthesized by the compiler. -// The value of the imported Block variable is passed back. -// Use: _Block_object_dispose(src, BLOCK_FIELD_IS_BLOCK {| BLOCK_FIELD_IS_WEAK}); -void _Block_destroy(const struct Block_basic *src, const int flags); - -// Byref data block copy helper callback -// Called by block copy helpers when copying __block structures -// Use: _Block_object_assign(dest, src, BLOCK_FIELD_IS_BYREF {| BLOCK_FIELD_IS_WEAK}); -void _Block_byref_assign_copy(struct Block_byref **destp, struct Block_byref *src); - -// Byref data block release helper callback -// Called by block release helpers when releasing a Block -// Called at escape points in scope where __block variables live (under non-GC-only conditions) -// Use: _Block_object_dispose(src, BLOCK_FIELD_IS_BYREF {| BLOCK_FIELD_IS_WEAK}); -void §(struct Block_byref *shared_struct); - - diff -Nru clang-2.8/tools/clang/docs/InternalsManual.html clang-2.9/tools/clang/docs/InternalsManual.html --- clang-2.8/tools/clang/docs/InternalsManual.html 2010-09-03 05:07:55.000000000 +0000 +++ clang-2.9/tools/clang/docs/InternalsManual.html 2011-02-28 02:37:51.000000000 +0000 @@ -25,6 +25,7 @@
  • The Diagnostics Subsystem
  • The SourceLocation and SourceManager classes
  • +
  • SourceRange and CharSourceRange
  • The Driver Library @@ -68,6 +69,11 @@
  • The Index Library
  • +
  • Howto guides + +
  • @@ -145,15 +151,14 @@ pieces, this section describes them and talks about best practices when adding a new diagnostic.

    - -

    The Diagnostic*Kinds.def files

    - + +

    The Diagnostic*Kinds.td files

    +

    Diagnostics are created by adding an entry to one of the -clang/Basic/Diagnostic*Kinds.def files, depending on what library will -be using it. This file encodes the unique ID of the -diagnostic (as an enum, the first argument), the severity of the diagnostic -(second argument) and the English translation + format string.

    +clang/Basic/Diagnostic*Kinds.td files, depending on what library will +be using it. From this file, tblgen generates the unique ID of the diagnostic, +the severity of the diagnostic and the English translation + format string.

    There is little sanity with the naming of the unique ID's right now. Some start with err_, warn_, ext_ to encode the severity into the name. Since the @@ -237,7 +242,7 @@

    • Keep the string short. It should ideally fit in the 80 column limit of the - DiagnosticKinds.def file. This avoids the diagnostic wrapping when + DiagnosticKinds.td file. This avoids the diagnostic wrapping when printed, and forces you to think about the important point you are conveying with the diagnostic.
    • Take advantage of location information. The user will be able to see the @@ -252,7 +257,7 @@

      Diagnostics should never take random English strings as arguments: you shouldn't use "you have a problem with %0" and pass in things like "your argument" or "your return value" as arguments. Doing -this prevents translating the Clang diagnostics to +this prevents translating the Clang diagnostics to other languages (because they'll get random English words in their otherwise localized diagnostic). The exceptions to this are C/C++ language keywords (e.g. auto, const, mutable, etc) and C/C++ operators (/=). Note @@ -367,10 +372,10 @@ bring it up on the cfe-dev mailing list.

      -

      Producing the Diagnostic

      +

      Producing the Diagnostic

      -

      Now that you've created the diagnostic in the DiagnosticKinds.def file, you +

      Now that you've created the diagnostic in the DiagnosticKinds.td file, you need to write the code that detects the condition in question and emits the new diagnostic. Various components of Clang (e.g. the preprocessor, Sema, etc) provide a helper function named "Diag". It creates a diagnostic and @@ -388,7 +393,7 @@

      This shows that use of the Diag method: they take a location (a SourceLocation object) and a diagnostic enum value -(which matches the name from DiagnosticKinds.def). If the diagnostic takes +(which matches the name from DiagnosticKinds.td). If the diagnostic takes arguments, they are specified with the << operator: the first argument becomes %0, the second becomes %1, etc. The diagnostic interface allows you to specify arguments of many different types, including int and @@ -545,6 +550,30 @@ Clang depends on being able to find the original input characters for the token. This concept maps directly to the "spelling location" for the token.

      + + +

      SourceRange and CharSourceRange

      + + + +

      Clang represents most source ranges by [first, last], where first and last +each point to the beginning of their respective tokens. For example +consider the SourceRange of the following statement:

      +
      +x = foo + bar;
      +^first    ^last
      +
      + +

      To map from this representation to a character-based +representation, the 'last' location needs to be adjusted to point to +(or past) the end of that token with either +Lexer::MeasureTokenLength() or +Lexer::getLocForEndOfToken(). For the rare cases +where character-level source ranges information is needed we use +the CharSourceRange class.

      + +

      The Driver Library

      @@ -792,7 +821,7 @@ within the filename.
    • When parsing a preprocessor directive (after "#") the ParsingPreprocessorDirective mode is entered. This changes the parser to - return EOM at a newline.
    • + return EOD at a newline.
    • The Lexer uses a LangOptions object to know whether trigraphs are enabled, whether C++ or ObjC keywords are recognized, etc.
    @@ -1682,10 +1711,82 @@ floating-point literal.
  • __builtin_abs,copysign,..: These are constant folded as general constant expressions.
  • +
  • __builtin_strlen and strlen: These are constant folded as integer constant expressions if the argument is a string literal.
  • + +

    How to change Clang

    + + + +

    How to add an attribute

    + + +

    To add an attribute, you'll have to add it to the list of attributes, add it +to the parsing phase, and look for it in the AST scan. +r124217 +has a good example of adding a warning attribute.

    + +

    (Beware that this hasn't been reviewed/fixed by the people who designed the +attributes system yet.)

    + +

    include/clang/Basic/Attr.td

    + +

    Each attribute gets a def inheriting from Attr or one of +its subclasses. InheritableAttr means that the attribute also applies +to subsequent declarations of the same name.

    + +

    Spellings lists the strings that can appear in +__attribute__((here)) or [[here]]. All such strings +will be synonymous. If you want to allow the [[]] C++0x +syntax, you have to define a list of Namespaces, which will +let users write [[namespace:spelling]]. Using the empty +string for a namespace will allow users to write just the spelling +with no ":".

    + +

    Subjects restricts what kinds of AST node to which this attribute +can appertain (roughly, attach).

    + +

    Args names the arguments the attribute takes, in order. If +Args is [StringArgument<"Arg1">, IntArgument<"Arg2">] +then __attribute__((myattribute("Hello", 3))) will be a valid use.

    + +

    Boilerplate

    + +

    Add an element to the AttributeList::Kind enum in include/clang/Sema/AttributeList.h +named AT_lower_with_underscores. That is, a CamelCased +AttributeName in Attr.td name should become +AT_attribute_name.

    + +

    Add a case to the StringSwitch in AttributeList::getKind() +in lib/Sema/AttributeList.cpp +for each spelling of your attribute. Less common attributes should come toward +the end of that list.

    + +

    Write a new HandleYourAttr() function in lib/Sema/SemaDeclAttr.cpp, +and add a case to the switch in ProcessNonInheritableDeclAttr() or +ProcessInheritableDeclAttr() forwarding to it.

    + +

    If your attribute causes extra warnings to fire, define a DiagGroup +in include/clang/Basic/DiagnosticGroups.td +named after the attribute's Spelling with "_"s replaced by "-"s. If +you're only defining one diagnostic, you can skip DiagnosticGroups.td +and use InGroup<DiagGroup<"your-attribute">> directly in DiagnosticSemaKinds.td

    + +

    The meat of your attribute

    + +

    Find an appropriate place in Clang to do whatever your attribute needs to do. +Check for the attribute's presence using Decl::getAttr<YourAttr>().

    +

    Update the Clang Language Extensions +document to describe your new attribute.

    diff -Nru clang-2.8/tools/clang/docs/LanguageExtensions.html clang-2.9/tools/clang/docs/LanguageExtensions.html --- clang-2.8/tools/clang/docs/LanguageExtensions.html 2010-08-31 23:28:47.000000000 +0000 +++ clang-2.9/tools/clang/docs/LanguageExtensions.html 2011-02-23 00:41:16.000000000 +0000 @@ -23,6 +23,8 @@
  • Include File Checking Macros
  • Builtin Macros
  • Vectors and Extended Vectors
  • +
  • Messages on deprecated and unavailable attributes
  • +
  • Attributes on enumerators
  • Checks for Standard Language Features
  • Target-Specific Extensions
      @@ -133,6 +139,30 @@

      The feature tag is described along with the language feature below.

      +

      __has_attribute

      + + +

      This function-like macro takes a single identifier argument that is the name +of an attribute. It evaluates to 1 if the attribute is supported or 0 if not. It +can be used like this:

      + +
      +
      +#ifndef __has_attribute         // Optional of course.
      +  #define __has_attribute(x) 0  // Compatibility with non-clang compilers.
      +#endif
      +
      +...
      +#if __has_attribute(always_inline)
      +#define ALWAYS_INLINE __attribute__((always_inline))
      +#else
      +#define ALWAYS_INLINE
      +#endif
      +...
      +
      +
      + +

      Include File Checking Macros

      @@ -259,6 +289,7 @@ c.yw = b; return c; } +

      Query for this feature with __has_feature(attribute_ext_vector_type).

      @@ -266,6 +297,53 @@

      See also __builtin_shufflevector.

      +

      Messages on deprecated and unavailable Attributes

      + + +

      An optional string message can be added to the deprecated +and unavailable attributes. For example:

      + +
      +
      void explode(void) __attribute__((deprecated("extremely unsafe, use 'combust' instead!!!")));
      +
      + +

      If the deprecated or unavailable declaration is used, the message +will be incorporated into the appropriate diagnostic:

      + +
      +
      harmless.c:4:3: warning: 'explode' is deprecated: extremely unsafe, use 'combust' instead!!! [-Wdeprecated-declarations]
      +  explode();
      +  ^
      +
      + +

      Query for this feature +with __has_feature(attribute_deprecated_with_message) +and __has_feature(attribute_unavailable_with_message).

      + + +

      Attributes on Enumerators

      + + +

      Clang allows attributes to be written on individual enumerators. +This allows enumerators to be deprecated, made unavailable, etc. The +attribute must appear after the enumerator name and before any +initializer, like so:

      + +
      +
      enum OperationMode {
      +  OM_Invalid,
      +  OM_Normal,
      +  OM_Terrified __attribute__((deprecated)),
      +  OM_AbortOnError __attribute__((deprecated)) = 4
      +};
      +
      + +

      Attributes on the enum declaration do not apply to +individual enumerators.

      + +

      Query for this feature with __has_feature(enumerator_attributes).

      + +

      Checks for Standard Language Features

      @@ -304,16 +382,15 @@

      Use __has_feature(cxx_attributes) to determine if support for attribute parsing with C++0x's square bracket notation is enabled.

      +

      C++0x default template arguments in function templates

      + +

      Use __has_feature(cxx_default_function_template_args) to determine if support for default template arguments in function templates is enabled.

      +

      C++0x deleted functions

      Use __has_feature(cxx_deleted_functions) to determine if support for deleted function definitions (with = delete) is enabled.

      -

      C++ TR concepts

      - -

      Use __has_feature(cxx_concepts) to determine if support for -concepts is enabled. clang does not currently implement this feature.

      -

      C++0x lambdas

      Use __has_feature(cxx_lambdas) to determine if support for @@ -325,11 +402,13 @@ nullptr is enabled. clang does not yet fully implement this feature.

      +

      C++0x reference-qualified functions

      +

      Use __has_feature(cxx_reference_qualified_functions) to determine if support for reference-qualified functions (e.g., member functions with & or && applied to *this) is enabled.

      +

      C++0x rvalue references

      Use __has_feature(cxx_rvalue_references) to determine if support for -rvalue references is enabled. clang does not yet fully implement this -feature.

      +rvalue references is enabled.

      C++0x static_assert()

      @@ -345,14 +424,63 @@

      C++0x variadic templates

      Use __has_feature(cxx_variadic_templates) to determine if support -for templates taking any number of arguments with the ellipsis notation is -enabled. clang does not yet fully implement this feature.

      +for variadic templates is enabled.

      C++0x inline namespaces

      Use __has_feature(cxx_inline_namespaces) to determine if support for inline namespaces is enabled.

      +

      C++0x trailing return type

      + +

      Use __has_feature(cxx_trailing_return) to determine if support for +the alternate function declaration syntax with trailing return type is enabled.

      + +

      C++0x strongly typed enumerations

      + +

      Use __has_feature(cxx_strong_enums) to determine if support for +strongly typed, scoped enumerations is enabled.

      + + +

      Checks for Type Traits

      + + +

      Clang supports the GNU C++ type traits and a subset of the Microsoft Visual C++ Type traits. For each supported type trait __X, __has_feature(X) indicates the presence of the type trait. For example: +

      +
      +#if __has_feature(is_convertible_to)
      +template<typename From, typename To>
      +struct is_convertible_to {
      +  static const bool value = __is_convertible_to(From, To);
      +};
      +#else
      +// Emulate type trait
      +#endif
      +
      +
      + +

      The following type traits are supported by Clang:

      +
        +
      • __has_nothrow_assign (GNU, Microsoft)
      • +
      • __has_nothrow_copy (GNU, Microsoft)
      • +
      • __has_nothrow_constructor (GNU, Microsoft)
      • +
      • __has_trivial_assign (GNU, Microsoft)
      • +
      • __has_trivial_copy (GNU, Microsoft)
      • +
      • __has_trivial_constructor (GNU, Microsoft)
      • +
      • __has_trivial_destructor (GNU, Microsoft)
      • +
      • __has_virtual_destructor (GNU, Microsoft)
      • +
      • __is_abstract (GNU, Microsoft)
      • +
      • __is_base_of (GNU, Microsoft)
      • +
      • __is_class (GNU, Microsoft)
      • +
      • __is_convertible_to (Microsoft)
      • +
      • __is_empty (GNU, Microsoft)
      • +
      • __is_enum (GNU, Microsoft)
      • +
      • __is_pod (GNU, Microsoft)
      • +
      • __is_polymorphic (GNU, Microsoft)
      • +
      • __is_union (GNU, Microsoft)
      • +
      • __is_literal(type): Determines whether the given type is a literal type
      • +
      +

      Blocks

      @@ -445,7 +573,7 @@ their names mangled according to the same rules as C++ function names. For example, the three tgsin functions in our motivating example get the mangled names _Z5tgsinf, -_Z5tgsind, and Z5tgsine, respectively. There are two +_Z5tgsind, and _Z5tgsine, respectively. There are two caveats to this use of name mangling:

        @@ -660,6 +788,51 @@

        Query for this feature with __has_feature(attribute_analyzer_noreturn).

        +

        Objective-C retaining behavior attributes

        + +

        In Objective-C, functions and methods are generally assumed to take +and return objects with +0 retain counts, with some exceptions for +special methods like +alloc and init. However, +there are exceptions, and so Clang provides attributes to allow these +exceptions to be documented, which helps the analyzer find leaks (and +ignore non-leaks).

        + +

        Usage: The ns_returns_retained, ns_returns_not_retained, +ns_returns_autoreleased, cf_returns_retained, +and cf_returns_not_retained attributes can be placed on +methods and functions that return Objective-C or CoreFoundation +objects. They are commonly placed at the end of a function prototype +or method declaration:

        + +
        +  id foo() __attribute__((ns_returns_retained));
        +
        +  - (NSString*) bar: (int) x __attribute__((ns_returns_retained));
        +
        + +

        The *_returns_retained attributes specify that the +returned object has a +1 retain count. +The *_returns_not_retained attributes specify that the return +object has a +0 retain count, even if the normal convention for its +selector would be +1. ns_returns_autoreleased specifies that the +returned object is +0, but is guaranteed to live at least as long as the +next flush of an autorelease pool.

        + +

        Usage: The ns_consumed and cf_consumed +attributes can be placed on an parameter declaration; they specify +that the argument is expected to have a +1 retain count, which will be +balanced in some way by the function or method. +The ns_consumes_self attribute can only be placed on an +Objective-C method; it specifies that the method expects +its self parameter to have a +1 retain count, which it will +balance in some way.

        + +
        +  void foo(__attribute__((ns_consumed)) NSString *string);
        +
        +  - (void) bar __attribute__((ns_consumes_self));
        +  - (void) baz: (id) __attribute__((ns_consumed)) x;
        +
        diff -Nru clang-2.8/tools/clang/docs/Makefile clang-2.9/tools/clang/docs/Makefile --- clang-2.8/tools/clang/docs/Makefile 2010-06-08 20:34:18.000000000 +0000 +++ clang-2.9/tools/clang/docs/Makefile 2010-12-10 01:59:28.000000000 +0000 @@ -59,7 +59,7 @@ $(Verb) $(RM) -rf $@ $(PROJ_OBJ_DIR)/html.tar $(Verb) cd $(PROJ_SRC_DIR) && \ $(TAR) cf $(PROJ_OBJ_DIR)/html.tar *.html - $(Verb) $(GZIP) $(PROJ_OBJ_DIR)/html.tar + $(Verb) $(GZIPBIN) $(PROJ_OBJ_DIR)/html.tar install-doxygen: doxygen $(Echo) Installing doxygen documentation @@ -82,7 +82,7 @@ $(Echo) Packaging doxygen documentation $(Verb) $(RM) -rf $@ $(PROJ_OBJ_DIR)/doxygen.tar $(Verb) $(TAR) cf $(PROJ_OBJ_DIR)/doxygen.tar doxygen - $(Verb) $(GZIP) $(PROJ_OBJ_DIR)/doxygen.tar + $(Verb) $(GZIPBIN) $(PROJ_OBJ_DIR)/doxygen.tar $(Verb) $(CP) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(PROJ_OBJ_DIR)/doxygen/html/ userloc: $(LLVM_SRC_ROOT)/docs/userloc.html diff -Nru clang-2.8/tools/clang/docs/PCHInternals.html clang-2.9/tools/clang/docs/PCHInternals.html --- clang-2.8/tools/clang/docs/PCHInternals.html 2010-07-08 22:01:51.000000000 +0000 +++ clang-2.9/tools/clang/docs/PCHInternals.html 2010-09-13 17:48:02.000000000 +0000 @@ -391,23 +391,23 @@ that statement or expression. Each substatement or subexpression within an expression is stored as a separate record (which keeps most records to a fixed size). Within the precompiled header, the -subexpressions of an expression are stored prior to the expression +subexpressions of an expression are stored, in reverse order, prior to the expression that owns those expression, using a form of Reverse Polish Notation. For example, an expression 3 - 4 + 5 would be represented as follows:

        - + + -
        IntegerLiteral(3)
        IntegerLiteral(5)
        IntegerLiteral(4)
        IntegerLiteral(3)
        BinaryOperator(-)
        IntegerLiteral(5)
        BinaryOperator(+)
        STOP

        When reading this representation, Clang evaluates each expression -record it encounters, builds the appropriate abstract synax tree node, +record it encounters, builds the appropriate abstract syntax tree node, and then pushes that expression on to a stack. When a record contains N subexpressions--BinaryOperator has two of them--those expressions are popped from the top of the stack. The special STOP diff -Nru clang-2.8/tools/clang/docs/tools/clang.pod clang-2.9/tools/clang/docs/tools/clang.pod --- clang-2.8/tools/clang/docs/tools/clang.pod 2010-09-02 23:59:25.000000000 +0000 +++ clang-2.9/tools/clang/docs/tools/clang.pod 2010-10-21 05:21:48.000000000 +0000 @@ -2,7 +2,7 @@ =head1 NAME -clang - the Clang C and Objective-C compiler +clang - the Clang C, C++, and Objective-C compiler =head1 SYNOPSIS @@ -14,11 +14,12 @@ B<-f>I B<-m>I B<-o> I + B<-stdlib=>I I =head1 DESCRIPTION -B is a C and Objective-C compiler which encompasses preprocessing, +B is a C, C++, and Objective-C compiler which encompasses preprocessing, parsing, optimization, code generation, assembly, and linking. Depending on which high-level mode setting is passed, Clang will stop before doing a full link. While Clang is highly integrated, it is important to understand the @@ -37,7 +38,8 @@ This stage handles tokenization of the input source file, macro expansion, #include expansion and handling of other preprocessor directives. The output of -this stage is typically called a ".i" (for C) or ".mi" (for Objective-C) file. +this stage is typically called a ".i" (for C), ".ii" (for C++), ".mi" (for +Objective-C) , or ".mii" (for Objective-C++) file. =item B @@ -78,7 +80,7 @@ B The Clang Static Analyzer is a tool that scans source code to try to find bugs -though code analysis. This tool uses many parts of Clang and is built into the +through code analysis. This tool uses many parts of Clang and is built into the same driver. @@ -130,6 +132,11 @@ Specify the language standard to compile for. +=item B<-stdlib>=I + +Specify the C++ standard library to use; supported options are libstdc++ and +libc++. + =item B<-ansi> Same as B<-std=c89>. @@ -168,6 +175,10 @@ Enable support for Microsoft extensions. +=item B<-fmsc-version=> + +Set _MSC_VER. Defaults to 1300 on Windows. Not set otherwise. + =item B<-fborland-extensions> Enable support for Borland extensions. @@ -185,7 +196,6 @@ Enable the "Blocks" language feature. - =item B<-fobjc-gc-only> Indicate that Objective-C code should be compiled in GC-only mode, which only @@ -196,6 +206,22 @@ Indicate that Objective-C code should be compiled in hybrid-GC mode, which works with both GC and non-GC mode. +=item B<-fobjc-abi-version>=I + +Select the Objective-C ABI version to use. Available versions are 1 (legacy +"fragile" ABI), 2 (non-fragile ABI 1), and 3 (non-fragile ABI 2). + +=item B<-fobjc-nonfragile-abi-version>=I + +Select the Objective-C non-fragile ABI version to use by default. This will only +be used as the Objective-C ABI when the non-fragile ABI is enabled (either via +-fobjc-nonfragile-abi, or because it is the platform default). + +=item B<-fobjc-nonfragile-abi> + +Enable use of the Objective-C non-fragile ABI. On platforms for which this is +the default ABI, it can be disabled with B<-fno-objc-nonfragile-abi>. + =back diff -Nru clang-2.8/tools/clang/docs/UsersManual.html clang-2.9/tools/clang/docs/UsersManual.html --- clang-2.8/tools/clang/docs/UsersManual.html 2010-08-24 18:12:35.000000000 +0000 +++ clang-2.9/tools/clang/docs/UsersManual.html 2011-02-18 04:12:08.000000000 +0000 @@ -248,32 +248,29 @@ ^ // - -

        When this is disabled, Clang will just print:

        - -
        -  test.c:28:8: warning: extra tokens at end of #endif directive [-Wextra-tokens]
        -  #endif bad
        -         ^
        -         //
        -
        - -
        -f[no-]color-diagnostics:
        This option, which defaults to on when a color-capable terminal is detected, controls whether or not Clang prints diagnostics in color. When this option is enabled, Clang will use colors to highlight specific parts of the diagnostic, e.g., - +
        +  test.c:28:8: warning: extra tokens at end of #endif directive [-Wextra-tokens]
        +  #endif bad
        +         ^
        +         //
        +
        + +

        When this is disabled, Clang will just print:

        +
        -
        -
        ' +
        -f[no-]diagnostics-show-option: Enable [-Woption] information in diagnostic line.
        @@ -565,7 +562,7 @@ #pragma GCC diagnostic ignored "-Wall" -

        In addition to all of the functionality of provided by GCC's pragma, Clang +

        In addition to all of the functionality provided by GCC's pragma, Clang also allows you to push and pop the current warning state. This is particularly useful when writing a header file that will be compiled by other people, because you don't know what warning flags they build with.

        @@ -604,7 +601,7 @@ attributes (e.g., __attribute__((nonnull)))) that can either suppress static analyzer warnings or teach the analyzer about code invariants which enable it to find more bugs. While many of these attributes are standard GCC -attributes, additional ones have added to Clang to specifically support the +attributes, additional ones have been added to Clang to specifically support the static analyzer. Detailed information on these annotations can be found in the analyzer's documentation. @@ -623,7 +620,7 @@ In general, this usage is discouraged. Instead, we prefer that users file bugs against the analyzer when it flags false positives. There is also active discussion of allowing users in the future to selectively silence specific -analyzer warnings (some which can already be done using annotations).
      @@ -642,7 +639,7 @@ this optimization, are literally files that represent an on-disk cache that contains the vital information necessary to reduce some of the work needed to process a corresponding header file. While details of precompiled -headers vary between compilers, precompiled headers have been shown to be a +headers vary between compilers, precompiled headers have been shown to be highly effective at speeding up program compilation on systems with very large system headers (e.g., Mac OS/X).

      @@ -742,11 +739,11 @@ on runtime code generation to check for undefined behavior.
      This option, which defaults to off, controls whether or not Clang -adds runtime checks for undefined runtime behavior. If the check fails, +adds runtime checks for undefined runtime behavior. If a check fails, __builtin_trap() is used to indicate failure. The checks are:

      -

    • Subscripting where the static type of one operand is variable +
    • Subscripting where the static type of one operand is a variable which is decayed from an array type and the other operand is greater than the size of the array or less than zero.
    • Shift operators where the amount shifted is greater or equal to the @@ -761,7 +758,7 @@
      -fno-assume-sane-operator-new: Don't assume that the C++'s new operator is sane.
      This option tells the compiler to do not assume that C++'s global new -operator will always return a pointer that do not +operator will always return a pointer that does not alias any other pointer when the function returns.
      @@ -828,10 +825,6 @@ extensions are not implemented yet:

        -
      • clang does not support __label__ -(bug 3429). This is -a relatively small feature, so it is likely to be implemented relatively -soon.
      • clang does not support #pragma weak (bug 3679). Due to @@ -887,9 +880,11 @@
        • clang does not support the gcc extension that allows variable-length arrays -in structures. This is for a few of reasons: one, it is tricky +in structures. This is for a few reasons: one, it is tricky to implement, two, the extension is completely undocumented, and three, the -extension appears to be rarely used.
        • +extension appears to be rarely used. Note that clang does support +flexible array members (arrays with a zero or unspecified size at the end of +a structure).
        • clang does not support duplicate definitions of a function where one is inline. This complicates clients of the AST which normally can expect there is @@ -922,6 +917,12 @@ certain constructs (including __declspec and Microsoft-style asm statements).

          +
        • clang allows setting _MSC_VER with -fmsc-version=. It defaults to 1300 which +is the same as Visual C/C++ 2003. Any number is supported and can greatly affect +what Windows SDK and c++stdlib headers clang can compile. This option will be +removed when clang supports the full set of MS extensions required for these +headers.
        • +
        • clang does not support the Microsoft extension where anonymous record members can be declared using user defined typedefs.
        • @@ -942,16 +943,19 @@

          X86

          -

          The support for X86 (both 32-bit and 64-bit) is considered stable -on Darwin (Mac OS/X), Linux, FreeBSD, and Dragonfly BSD: it has been tested to -correctly compile large C and Objective-C codebases. (FIXME: Anything specific -we want to say here? Possibly mention some LLVM x86 limitations?) + +

          The support for X86 (both 32-bit and 64-bit) is considered stable on Darwin +(Mac OS/X), Linux, FreeBSD, and Dragonfly BSD: it has been tested to correctly +compile many large C, C++, Objective-C, and Objective-C++ codebases.

          ARM

          -ARM support is mostly feature-complete, but still experimental; it hasn't -undergone significant testing. + +

          The support for ARM (specifically ARMv6 and ARMv7) is considered stable on +Darwin (iOS): it has been tested to correctly compile many large C, C++, +Objective-C, and Objective-C++ codebases. Clang only supports a limited number +of ARM architectures. It does not yet fully support ARMv5, for example.

          Other platforms

          @@ -960,9 +964,6 @@ pieces of code generation are still missing, and they haven't undergone significant testing. -

          clang contains some support for the embedded PIC16 processor -(FIXME: I haven't been keeping track of this; what should this say?). -

          clang contains limited support for the MSP430 embedded processor, but both the clang support and the LLVM backend support are highly experimental. diff -Nru clang-2.8/tools/clang/examples/clang-interpreter/CMakeLists.txt clang-2.9/tools/clang/examples/clang-interpreter/CMakeLists.txt --- clang-2.8/tools/clang/examples/clang-interpreter/CMakeLists.txt 2010-08-26 15:21:38.000000000 +0000 +++ clang-2.9/tools/clang/examples/clang-interpreter/CMakeLists.txt 2011-02-14 18:13:01.000000000 +0000 @@ -1,12 +1,12 @@ -set(LLVM_NO_RTTI 1) - set(LLVM_USED_LIBS clangFrontend clangSerialization clangDriver clangCodeGen clangSema - clangChecker + clangStaticAnalyzerFrontend + clangStaticAnalyzerCheckers + clangStaticAnalyzerCore clangIndex clangAnalysis clangRewrite diff -Nru clang-2.8/tools/clang/examples/clang-interpreter/main.cpp clang-2.9/tools/clang/examples/clang-interpreter/main.cpp --- clang-2.8/tools/clang/examples/clang-interpreter/main.cpp 2010-08-26 13:48:56.000000000 +0000 +++ clang-2.9/tools/clang/examples/clang-interpreter/main.cpp 2011-02-19 23:03:58.000000000 +0000 @@ -17,7 +17,6 @@ #include "clang/Frontend/FrontendDiagnostic.h" #include "clang/Frontend/TextDiagnosticPrinter.h" -#include "llvm/LLVMContext.h" #include "llvm/Module.h" #include "llvm/Config/config.h" #include "llvm/ADT/OwningPtr.h" @@ -26,12 +25,17 @@ #include "llvm/ExecutionEngine/ExecutionEngine.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/raw_ostream.h" -#include "llvm/System/Host.h" -#include "llvm/System/Path.h" +#include "llvm/Support/Host.h" +#include "llvm/Support/Path.h" #include "llvm/Target/TargetSelect.h" using namespace clang; using namespace clang::driver; +// This function isn't referenced outside its translation unit, but it +// can't use the "static" keyword because its address is used for +// GetMainExecutable (since some platforms don't support taking the +// address of main, and some platforms can't implement GetMainExecutable +// without being given the address of a function in the main executable). llvm::sys::Path GetExecutablePath(const char *Argv0) { // This just needs to be some symbol in the binary; C++ doesn't // allow taking the address of ::main however. @@ -39,7 +43,7 @@ return llvm::sys::Path::GetMainExecutable(Argv0, MainAddr); } -int Execute(llvm::Module *Mod, char * const *envp) { +static int Execute(llvm::Module *Mod, char * const *envp) { llvm::InitializeNativeTarget(); std::string Error; @@ -69,7 +73,8 @@ TextDiagnosticPrinter *DiagClient = new TextDiagnosticPrinter(llvm::errs(), DiagnosticOptions()); - Diagnostic Diags(DiagClient); + llvm::IntrusiveRefCntPtr DiagID(new DiagnosticIDs()); + Diagnostic Diags(DiagID, DiagClient); Driver TheDriver(Path.str(), llvm::sys::getHostTriple(), "a.out", /*IsProduction=*/false, /*CXXIsProduction=*/false, Diags); @@ -124,7 +129,6 @@ // Create a compiler instance to handle the actual work. CompilerInstance Clang; - Clang.setLLVMContext(new llvm::LLVMContext); Clang.setInvocation(CI.take()); // Create the compilers actual diagnostics engine. diff -Nru clang-2.8/tools/clang/examples/clang-interpreter/Makefile clang-2.9/tools/clang/examples/clang-interpreter/Makefile --- clang-2.8/tools/clang/examples/clang-interpreter/Makefile 2010-08-26 15:21:38.000000000 +0000 +++ clang-2.9/tools/clang/examples/clang-interpreter/Makefile 2011-02-14 18:13:01.000000000 +0000 @@ -18,7 +18,7 @@ LINK_COMPONENTS := jit interpreter nativecodegen bitreader bitwriter ipo \ selectiondag asmparser USEDLIBS = clangFrontend.a clangSerialization.a clangDriver.a clangCodeGen.a \ - clangSema.a clangChecker.a clangAnalysis.a clangRewrite.a \ + clangSema.a clangStaticAnalyzerFrontend.a clangStaticAnalyzerCheckers.a clangStaticAnalyzerCore.a clangAnalysis.a clangRewrite.a \ clangAST.a clangParse.a clangLex.a clangBasic.a include $(CLANG_LEVEL)/Makefile diff -Nru clang-2.8/tools/clang/examples/PrintFunctionNames/CMakeLists.txt clang-2.9/tools/clang/examples/PrintFunctionNames/CMakeLists.txt --- clang-2.8/tools/clang/examples/PrintFunctionNames/CMakeLists.txt 2010-06-08 19:23:49.000000000 +0000 +++ clang-2.9/tools/clang/examples/PrintFunctionNames/CMakeLists.txt 2011-02-19 23:03:58.000000000 +0000 @@ -1,6 +1,11 @@ set(MODULE TRUE) -set(LLVM_NO_RTTI 1) +set( LLVM_USED_LIBS + clangFrontend + clangAST + ) + +set( LLVM_LINK_COMPONENTS support mc) add_clang_library(PrintFunctionNames PrintFunctionNames.cpp) diff -Nru clang-2.8/tools/clang/examples/PrintFunctionNames/Makefile clang-2.9/tools/clang/examples/PrintFunctionNames/Makefile --- clang-2.8/tools/clang/examples/PrintFunctionNames/Makefile 2010-07-26 21:12:10.000000000 +0000 +++ clang-2.9/tools/clang/examples/PrintFunctionNames/Makefile 2011-01-26 21:28:52.000000000 +0000 @@ -18,7 +18,11 @@ endif endif -LINK_LIBS_IN_SHARED = 1 +LINK_LIBS_IN_SHARED = 0 SHARED_LIBRARY = 1 include $(CLANG_LEVEL)/Makefile + +ifeq ($(OS),Darwin) + LDFLAGS=-Wl,-undefined,dynamic_lookup +endif diff -Nru clang-2.8/tools/clang/examples/PrintFunctionNames/README.txt clang-2.9/tools/clang/examples/PrintFunctionNames/README.txt --- clang-2.8/tools/clang/examples/PrintFunctionNames/README.txt 2010-01-05 21:42:23.000000000 +0000 +++ clang-2.9/tools/clang/examples/PrintFunctionNames/README.txt 2011-01-26 21:28:52.000000000 +0000 @@ -1,10 +1,12 @@ This is a simple example demonstrating how to use clang's facility for providing AST consumers using a plugin. -You will probably need to build clang so that it exports all symbols (disable -TOOL_NO_EXPORT in the tools/clang Makefile). +Build the plugin by running `make` in this directory. Once the plugin is built, you can run it using: -- -$ clang -cc1 -load path/to/PrintFunctionNames.so -plugin print-fns some-input-file.c --- +Linux: +$ clang -cc1 -load ../../Debug+Asserts/lib/libPrintFunctionNames.so -plugin print-fns some-input-file.c + +Mac: +$ clang -cc1 -load ../../Debug+Asserts/lib/libPrintFunctionNames.dylib -plugin print-fns some-input-file.c diff -Nru clang-2.8/tools/clang/examples/wpa/clang-wpa.cpp clang-2.9/tools/clang/examples/wpa/clang-wpa.cpp --- clang-2.8/tools/clang/examples/wpa/clang-wpa.cpp 2010-08-25 01:15:20.000000000 +0000 +++ clang-2.9/tools/clang/examples/wpa/clang-wpa.cpp 2011-02-23 07:19:14.000000000 +0000 @@ -14,10 +14,12 @@ #include "clang/Basic/FileManager.h" #include "clang/Basic/SourceManager.h" -#include "clang/Checker/PathSensitive/AnalysisManager.h" -#include "clang/Checker/PathSensitive/GRExprEngine.h" -#include "clang/Checker/PathSensitive/GRTransferFuncs.h" -#include "clang/Checker/Checkers/LocalCheckers.h" +#include "clang/StaticAnalyzer/Frontend/CheckerRegistration.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/TransferFuncs.h" +#include "clang/StaticAnalyzer/Core/CheckerManager.h" +#include "clang/StaticAnalyzer/Checkers/LocalCheckers.h" #include "clang/Frontend/ASTUnit.h" #include "clang/Frontend/CompilerInstance.h" #include "clang/Index/CallGraph.h" @@ -26,6 +28,7 @@ #include "clang/Index/DeclReferenceMap.h" #include "clang/Index/SelectorMap.h" #include "clang/Lex/Preprocessor.h" +#include "clang/Basic/TargetInfo.h" #include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/raw_ostream.h" @@ -91,7 +94,9 @@ = CompilerInstance::createDiagnostics(DiagOpts, argc, argv); for (unsigned i = 0, e = InputFilenames.size(); i != e; ++i) { const std::string &InFile = InputFilenames[i]; - llvm::OwningPtr AST(ASTUnit::LoadFromASTFile(InFile, Diags)); + llvm::OwningPtr AST(ASTUnit::LoadFromASTFile(InFile, Diags, + FileSystemOptions(), + false, 0, 0, true)); if (!AST) return 1; @@ -129,20 +134,46 @@ // Create an analysis engine. Preprocessor &PP = TU->getPreprocessor(); - // Hard code options for now. + AnalyzerOptions Opts; + + // Hard code options and checkers for now. + + Opts.MaxNodes = 300000; + Opts.MaxLoop = 3; + Opts.InlineCall = true; + Opts.CFGAddImplicitDtors = true; + Opts.EagerlyTrimEGraph = true; + + Opts.CheckersControlList.push_back(std::make_pair("core", true)); + if (PP.getTargetInfo().getTriple().getOS() != llvm::Triple::Win32) + Opts.CheckersControlList.push_back(std::make_pair("unix", true)); + if (PP.getTargetInfo().getTriple().getVendor() == llvm::Triple::Apple) + Opts.CheckersControlList.push_back(std::make_pair("macosx", true)); + + // Checks to perform for Objective-C/Objective-C++. + if (PP.getLangOptions().ObjC1) + Opts.CheckersControlList.push_back(std::make_pair("cocoa", true)); + + llvm::OwningPtr checkerMgr; + checkerMgr.reset(ento::registerCheckers(Opts, PP.getLangOptions(), + PP.getDiagnostics())); + + using namespace clang::ento; AnalysisManager AMgr(TU->getASTContext(), PP.getDiagnostics(), PP.getLangOptions(), /* PathDiagnostic */ 0, CreateRegionStoreManager, - CreateRangeConstraintManager, &Idxer, - /* MaxNodes */ 300000, /* MaxLoop */ 3, - /* VisualizeEG */ false, /* VisualizeEGUbi */ false, - /* PurgeDead */ true, /* EagerlyAssume */ false, - /* TrimGraph */ false, /* InlineCall */ true, - /* UseUnoptimizedCFG */ false); + CreateRangeConstraintManager, checkerMgr.get(), &Idxer, + Opts.MaxNodes, Opts.MaxLoop, + Opts.VisualizeEGDot, Opts.VisualizeEGUbi, + Opts.PurgeDead, Opts.EagerlyAssume, + Opts.TrimGraph, Opts.InlineCall, + Opts.UnoptimizedCFG, Opts.CFGAddImplicitDtors, + Opts.CFGAddInitializers, + Opts.EagerlyTrimEGraph); - GRTransferFuncs* TF = MakeCFRefCountTF(AMgr.getASTContext(), /*GC*/false, + TransferFuncs* TF = MakeCFRefCountTF(AMgr.getASTContext(), /*GC*/false, AMgr.getLangOptions()); - GRExprEngine Eng(AMgr, TF); + ExprEngine Eng(AMgr, TF); Eng.ExecuteWorkList(AMgr.getStackFrame(FD, TU), AMgr.getMaxNodes()); diff -Nru clang-2.8/tools/clang/examples/wpa/CMakeLists.txt clang-2.9/tools/clang/examples/wpa/CMakeLists.txt --- clang-2.8/tools/clang/examples/wpa/CMakeLists.txt 2010-08-25 01:15:20.000000000 +0000 +++ clang-2.9/tools/clang/examples/wpa/CMakeLists.txt 2011-02-14 18:13:01.000000000 +0000 @@ -1,5 +1,3 @@ -set(LLVM_NO_RTTI 1) - set(LLVM_USED_LIBS clangIndex clangFrontend @@ -7,7 +5,9 @@ clangSema clangAnalysis clangSerialization - clangChecker + clangStaticAnalyzerFrontend + clangStaticAnalyzerCheckers + clangStaticAnalyzerCore clangRewrite clangAST clangParse diff -Nru clang-2.8/tools/clang/examples/wpa/Makefile clang-2.9/tools/clang/examples/wpa/Makefile --- clang-2.8/tools/clang/examples/wpa/Makefile 2010-08-25 01:15:20.000000000 +0000 +++ clang-2.9/tools/clang/examples/wpa/Makefile 2011-02-14 18:13:01.000000000 +0000 @@ -16,7 +16,7 @@ TOOL_NO_EXPORTS = 1 LINK_COMPONENTS := asmparser bitreader mc core -USEDLIBS = clangChecker.a clangIndex.a clangFrontend.a clangDriver.a \ +USEDLIBS = clangStaticAnalyzerFrontend.a clangStaticAnalyzerCheckers.a clangStaticAnalyzerCore.a clangIndex.a clangFrontend.a clangDriver.a \ clangSema.a clangAnalysis.a clangSerialization.a \ clangAST.a clangParse.a clangLex.a clangBasic.a diff -Nru clang-2.8/tools/clang/include/clang/Analysis/Analyses/CFGReachabilityAnalysis.h clang-2.9/tools/clang/include/clang/Analysis/Analyses/CFGReachabilityAnalysis.h --- clang-2.8/tools/clang/include/clang/Analysis/Analyses/CFGReachabilityAnalysis.h 1970-01-01 00:00:00.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/Analysis/Analyses/CFGReachabilityAnalysis.h 2011-02-23 01:51:59.000000000 +0000 @@ -0,0 +1,49 @@ +//==- CFGReachabilityAnalysis.h - Basic reachability analysis ----*- C++ -*-==// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines a flow-sensitive, (mostly) path-insensitive reachability +// analysis based on Clang's CFGs. Clients can query if a given basic block +// is reachable within the CFG. +// +//===----------------------------------------------------------------------===// + +#ifndef CLANG_ANALYSIS_CFG_REACHABILITY +#define CLANG_ANALYSIS_CFG_REACHABILITY + +#include "llvm/ADT/BitVector.h" +#include "llvm/ADT/DenseMap.h" + +namespace clang { + +class CFG; +class CFGBlock; + +// A class that performs reachability queries for CFGBlocks. Several internal +// checks in this checker require reachability information. The requests all +// tend to have a common destination, so we lazily do a predecessor search +// from the destination node and cache the results to prevent work +// duplication. +class CFGReachabilityAnalysis { + typedef llvm::BitVector ReachableSet; + typedef llvm::DenseMap ReachableMap; + ReachableSet analyzed; + ReachableMap reachable; +public: + CFGReachabilityAnalysis(const CFG &cfg); + + /// Returns true if the block 'Dst' can be reached from block 'Src'. + bool isReachable(const CFGBlock *Src, const CFGBlock *Dst); + +private: + void mapReachability(const CFGBlock *Dst); +}; + +} + +#endif diff -Nru clang-2.8/tools/clang/include/clang/Analysis/Analyses/FormatString.h clang-2.9/tools/clang/include/clang/Analysis/Analyses/FormatString.h --- clang-2.8/tools/clang/include/clang/Analysis/Analyses/FormatString.h 2010-08-24 22:24:51.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/Analysis/Analyses/FormatString.h 2011-01-08 05:28:46.000000000 +0000 @@ -379,6 +379,7 @@ using analyze_format_string::OptionalFlag; class PrintfSpecifier : public analyze_format_string::FormatSpecifier { + OptionalFlag HasThousandsGrouping; // ''', POSIX extension. OptionalFlag IsLeftJustified; // '-' OptionalFlag HasPlusPrefix; // '+' OptionalFlag HasSpacePrefix; // ' ' @@ -388,8 +389,8 @@ public: PrintfSpecifier() : FormatSpecifier(/* isPrintf = */ true), - IsLeftJustified("-"), HasPlusPrefix("+"), HasSpacePrefix(" "), - HasAlternativeForm("#"), HasLeadingZeroes("0") {} + HasThousandsGrouping("'"), IsLeftJustified("-"), HasPlusPrefix("+"), + HasSpacePrefix(" "), HasAlternativeForm("#"), HasLeadingZeroes("0") {} static PrintfSpecifier Parse(const char *beg, const char *end); @@ -397,6 +398,10 @@ void setConversionSpecifier(const PrintfConversionSpecifier &cs) { CS = cs; } + void setHasThousandsGrouping(const char *position) { + HasThousandsGrouping = true; + HasThousandsGrouping.setPosition(position); + } void setIsLeftJustified(const char *position) { IsLeftJustified = true; IsLeftJustified.setPosition(position); @@ -445,6 +450,9 @@ /// more than one type. ArgTypeResult getArgType(ASTContext &Ctx) const; + const OptionalFlag &hasThousandsGrouping() const { + return HasThousandsGrouping; + } const OptionalFlag &isLeftJustified() const { return IsLeftJustified; } const OptionalFlag &hasPlusPrefix() const { return HasPlusPrefix; } const OptionalFlag &hasAlternativeForm() const { return HasAlternativeForm; } @@ -465,6 +473,7 @@ bool hasValidLeadingZeros() const; bool hasValidSpacePrefix() const; bool hasValidLeftJustified() const; + bool hasValidThousandsGroupingPrefix() const; bool hasValidPrecision() const; bool hasValidFieldWidth() const; diff -Nru clang-2.8/tools/clang/include/clang/Analysis/Analyses/LiveVariables.h clang-2.9/tools/clang/include/clang/Analysis/Analyses/LiveVariables.h --- clang-2.8/tools/clang/include/clang/Analysis/Analyses/LiveVariables.h 2010-08-27 22:30:10.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/Analysis/Analyses/LiveVariables.h 2011-02-11 23:24:26.000000000 +0000 @@ -55,7 +55,8 @@ /// ObserveStmt - A callback invoked right before invoking the /// liveness transfer function on the given statement. - virtual void ObserveStmt(Stmt* S, const AnalysisDataTy& AD, + virtual void ObserveStmt(Stmt* S, const CFGBlock *currentBlock, + const AnalysisDataTy& AD, const ValTy& V) {} virtual void ObserverKill(DeclRefExpr* DR) {} diff -Nru clang-2.8/tools/clang/include/clang/Analysis/Analyses/UninitializedValuesV2.h clang-2.9/tools/clang/include/clang/Analysis/Analyses/UninitializedValuesV2.h --- clang-2.8/tools/clang/include/clang/Analysis/Analyses/UninitializedValuesV2.h 1970-01-01 00:00:00.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/Analysis/Analyses/UninitializedValuesV2.h 2011-01-25 19:13:48.000000000 +0000 @@ -0,0 +1,40 @@ +//= UninitializedValuesV2.h - Finding uses of uninitialized values --*- C++ -*-= +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines APIs for invoking and reported uninitialized values +// warnings. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_UNINIT_VALS_H +#define LLVM_CLANG_UNINIT_VALS_H + +namespace clang { + +class AnalysisContext; +class CFG; +class DeclContext; +class Expr; +class VarDecl; + +class UninitVariablesHandler { +public: + UninitVariablesHandler() {} + virtual ~UninitVariablesHandler(); + + virtual void handleUseOfUninitVariable(const Expr *ex, + const VarDecl *vd) {} +}; + +void runUninitializedVariablesAnalysis(const DeclContext &dc, const CFG &cfg, + AnalysisContext &ac, + UninitVariablesHandler &handler); + +} +#endif diff -Nru clang-2.8/tools/clang/include/clang/Analysis/AnalysisContext.h clang-2.9/tools/clang/include/clang/Analysis/AnalysisContext.h --- clang-2.8/tools/clang/include/clang/Analysis/AnalysisContext.h 2010-08-27 22:30:10.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/Analysis/AnalysisContext.h 2011-02-23 01:51:59.000000000 +0000 @@ -16,6 +16,7 @@ #define LLVM_CLANG_ANALYSIS_ANALYSISCONTEXT_H #include "clang/AST/Decl.h" +#include "clang/AST/Expr.h" #include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/FoldingSet.h" #include "llvm/ADT/PointerUnion.h" @@ -28,6 +29,8 @@ class Stmt; class CFG; class CFGBlock; +class CFGReachabilityAnalysis; +class CFGStmtMap; class LiveVariables; class ParentMap; class PseudoConstantAnalysis; @@ -47,24 +50,31 @@ // AnalysisContext owns the following data. CFG *cfg, *completeCFG; + CFGStmtMap *cfgStmtMap; bool builtCFG, builtCompleteCFG; LiveVariables *liveness; LiveVariables *relaxedLiveness; ParentMap *PM; PseudoConstantAnalysis *PCA; + CFGReachabilityAnalysis *CFA; llvm::DenseMap *ReferencedBlockVars; llvm::BumpPtrAllocator A; bool UseUnoptimizedCFG; bool AddEHEdges; + bool AddImplicitDtors; + bool AddInitializers; public: AnalysisContext(const Decl *d, idx::TranslationUnit *tu, bool useUnoptimizedCFG = false, - bool addehedges = false) - : D(d), TU(tu), cfg(0), completeCFG(0), + bool addehedges = false, + bool addImplicitDtors = false, + bool addInitializers = false) + : D(d), TU(tu), cfg(0), completeCFG(0), cfgStmtMap(0), builtCFG(false), builtCompleteCFG(false), - liveness(0), relaxedLiveness(0), PM(0), PCA(0), + liveness(0), relaxedLiveness(0), PM(0), PCA(0), CFA(0), ReferencedBlockVars(0), UseUnoptimizedCFG(useUnoptimizedCFG), - AddEHEdges(addehedges) {} + AddEHEdges(addehedges), AddImplicitDtors(addImplicitDtors), + AddInitializers(addInitializers) {} ~AnalysisContext(); @@ -80,13 +90,21 @@ bool getAddEHEdges() const { return AddEHEdges; } bool getUseUnoptimizedCFG() const { return UseUnoptimizedCFG; } + bool getAddImplicitDtors() const { return AddImplicitDtors; } + bool getAddInitializers() const { return AddInitializers; } Stmt *getBody(); CFG *getCFG(); + CFGStmtMap *getCFGStmtMap(); + + CFGReachabilityAnalysis *getCFGReachablityAnalysis(); + /// Return a version of the CFG without any edges pruned. CFG *getUnoptimizedCFG(); + void dumpCFG(); + ParentMap &getParentMap(); PseudoConstantAnalysis *getPseudoConstantAnalysis(); LiveVariables *getLiveVariables(); @@ -106,15 +124,21 @@ typedef llvm::DenseMap ContextMap; ContextMap Contexts; bool UseUnoptimizedCFG; + bool AddImplicitDtors; + bool AddInitializers; public: - AnalysisContextManager(bool useUnoptimizedCFG = false) - : UseUnoptimizedCFG(useUnoptimizedCFG) {} + AnalysisContextManager(bool useUnoptimizedCFG = false, + bool addImplicitDtors = false, bool addInitializers = false) + : UseUnoptimizedCFG(useUnoptimizedCFG), AddImplicitDtors(addImplicitDtors), + AddInitializers(addInitializers) {} ~AnalysisContextManager(); AnalysisContext *getContext(const Decl *D, idx::TranslationUnit *TU = 0); bool getUseUnoptimizedCFG() const { return UseUnoptimizedCFG; } + bool getAddImplicitDtors() const { return AddImplicitDtors; } + bool getAddInitializers() const { return AddInitializers; } // Discard all previously created AnalysisContexts. void clear(); @@ -196,9 +220,10 @@ friend class LocationContextManager; StackFrameContext(AnalysisContext *ctx, const LocationContext *parent, - const Stmt *s, const CFGBlock *blk, unsigned idx) - : LocationContext(StackFrame, ctx, parent), CallSite(s), Block(blk), - Index(idx) {} + const Stmt *s, const CFGBlock *blk, + unsigned idx) + : LocationContext(StackFrame, ctx, parent), CallSite(s), + Block(blk), Index(idx) {} public: ~StackFrameContext() {} @@ -282,8 +307,8 @@ const StackFrameContext *getStackFrame(AnalysisContext *ctx, const LocationContext *parent, - const Stmt *s, const CFGBlock *blk, - unsigned idx); + const Stmt *s, + const CFGBlock *blk, unsigned idx); const ScopeContext *getScope(AnalysisContext *ctx, const LocationContext *parent, diff -Nru clang-2.8/tools/clang/include/clang/Analysis/AnalysisDiagnostic.h clang-2.9/tools/clang/include/clang/Analysis/AnalysisDiagnostic.h --- clang-2.8/tools/clang/include/clang/Analysis/AnalysisDiagnostic.h 2010-05-04 20:44:26.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/Analysis/AnalysisDiagnostic.h 2011-01-27 21:06:28.000000000 +0000 @@ -15,7 +15,7 @@ namespace clang { namespace diag { enum { -#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE,CATEGORY) ENUM, +#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE,ACCESS,CATEGORY) ENUM, #define ANALYSISSTART #include "clang/Basic/DiagnosticAnalysisKinds.inc" #undef DIAG diff -Nru clang-2.8/tools/clang/include/clang/Analysis/CFG.h clang-2.9/tools/clang/include/clang/Analysis/CFG.h --- clang-2.8/tools/clang/include/clang/Analysis/CFG.h 2010-08-15 01:15:58.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/Analysis/CFG.h 2011-03-03 01:21:32.000000000 +0000 @@ -22,14 +22,22 @@ #include "clang/Analysis/Support/BumpVector.h" #include "clang/Basic/SourceLocation.h" #include +#include namespace llvm { class raw_ostream; } + namespace clang { + class CXXDestructorDecl; class Decl; class Stmt; class Expr; + class FieldDecl; + class VarDecl; + class CXXCtorInitializer; + class CXXBaseSpecifier; + class CXXBindTemporaryExpr; class CFG; class PrinterHelper; class LangOptions; @@ -37,19 +45,197 @@ /// CFGElement - Represents a top-level expression in a basic block. class CFGElement { - llvm::PointerIntPair Data; public: - enum Type { StartScope, EndScope }; - explicit CFGElement() {} - CFGElement(Stmt *S, bool lvalue) : Data(S, lvalue ? 1 : 0) {} - CFGElement(Stmt *S, Type t) : Data(S, t == StartScope ? 2 : 3) {} - Stmt *getStmt() const { return Data.getPointer(); } - bool asLValue() const { return Data.getInt() == 1; } - bool asStartScope() const { return Data.getInt() == 2; } - bool asEndScope() const { return Data.getInt() == 3; } - bool asDtor() const { return Data.getInt() == 4; } - operator Stmt*() const { return getStmt(); } - operator bool() const { return getStmt() != 0; } + enum Kind { + // main kind + Invalid, + Statement, + Initializer, + // dtor kind + AutomaticObjectDtor, + BaseDtor, + MemberDtor, + TemporaryDtor, + DTOR_BEGIN = AutomaticObjectDtor, + DTOR_END = TemporaryDtor + }; + +protected: + // The int bits are used to mark the kind. + llvm::PointerIntPair Data1; + llvm::PointerIntPair Data2; + + CFGElement(Kind kind, const void *Ptr1, const void *Ptr2 = 0) + : Data1(const_cast(Ptr1), ((unsigned) kind) & 0x3), + Data2(const_cast(Ptr2), (((unsigned) kind) >> 2) & 0x3) {} + +public: + CFGElement() {} + + Kind getKind() const { + unsigned x = Data2.getInt(); + x <<= 2; + x |= Data1.getInt(); + return (Kind) x; + } + + bool isValid() const { return getKind() != Invalid; } + + operator bool() const { return isValid(); } + + template const ElemTy *getAs() const { + if (llvm::isa(this)) + return static_cast(this); + return 0; + } + + static bool classof(const CFGElement *E) { return true; } +}; + +class CFGStmt : public CFGElement { +public: + CFGStmt(Stmt *S) : CFGElement(Statement, S) {} + + Stmt *getStmt() const { return static_cast(Data1.getPointer()); } + + static bool classof(const CFGElement *E) { + return E->getKind() == Statement; + } +}; + +/// CFGInitializer - Represents C++ base or member initializer from +/// constructor's initialization list. +class CFGInitializer : public CFGElement { +public: + CFGInitializer(CXXCtorInitializer *initializer) + : CFGElement(Initializer, initializer) {} + + CXXCtorInitializer* getInitializer() const { + return static_cast(Data1.getPointer()); + } + + static bool classof(const CFGElement *E) { + return E->getKind() == Initializer; + } +}; + +/// CFGImplicitDtor - Represents C++ object destructor implicitly generated +/// by compiler on various occasions. +class CFGImplicitDtor : public CFGElement { +protected: + CFGImplicitDtor(Kind kind, const void *data1, const void *data2 = 0) + : CFGElement(kind, data1, data2) { + assert(kind >= DTOR_BEGIN && kind <= DTOR_END); + } + +public: + const CXXDestructorDecl *getDestructorDecl(ASTContext &astContext) const; + bool isNoReturn(ASTContext &astContext) const; + + static bool classof(const CFGElement *E) { + Kind kind = E->getKind(); + return kind >= DTOR_BEGIN && kind <= DTOR_END; + } +}; + +/// CFGAutomaticObjDtor - Represents C++ object destructor implicitly generated +/// for automatic object or temporary bound to const reference at the point +/// of leaving its local scope. +class CFGAutomaticObjDtor: public CFGImplicitDtor { +public: + CFGAutomaticObjDtor(const VarDecl *var, const Stmt *stmt) + : CFGImplicitDtor(AutomaticObjectDtor, var, stmt) {} + + const VarDecl *getVarDecl() const { + return static_cast(Data1.getPointer()); + } + + // Get statement end of which triggered the destructor call. + const Stmt *getTriggerStmt() const { + return static_cast(Data2.getPointer()); + } + + static bool classof(const CFGElement *elem) { + return elem->getKind() == AutomaticObjectDtor; + } +}; + +/// CFGBaseDtor - Represents C++ object destructor implicitly generated for +/// base object in destructor. +class CFGBaseDtor : public CFGImplicitDtor { +public: + CFGBaseDtor(const CXXBaseSpecifier *base) + : CFGImplicitDtor(BaseDtor, base) {} + + const CXXBaseSpecifier *getBaseSpecifier() const { + return static_cast(Data1.getPointer()); + } + + static bool classof(const CFGElement *E) { + return E->getKind() == BaseDtor; + } +}; + +/// CFGMemberDtor - Represents C++ object destructor implicitly generated for +/// member object in destructor. +class CFGMemberDtor : public CFGImplicitDtor { +public: + CFGMemberDtor(const FieldDecl *field) + : CFGImplicitDtor(MemberDtor, field, 0) {} + + const FieldDecl *getFieldDecl() const { + return static_cast(Data1.getPointer()); + } + + static bool classof(const CFGElement *E) { + return E->getKind() == MemberDtor; + } +}; + +/// CFGTemporaryDtor - Represents C++ object destructor implicitly generated +/// at the end of full expression for temporary object. +class CFGTemporaryDtor : public CFGImplicitDtor { +public: + CFGTemporaryDtor(CXXBindTemporaryExpr *expr) + : CFGImplicitDtor(TemporaryDtor, expr, 0) {} + + const CXXBindTemporaryExpr *getBindTemporaryExpr() const { + return static_cast(Data1.getPointer()); + } + + static bool classof(const CFGElement *E) { + return E->getKind() == TemporaryDtor; + } +}; + +/// CFGTerminator - Represents CFGBlock terminator statement. +/// +/// TemporaryDtorsBranch bit is set to true if the terminator marks a branch +/// in control flow of destructors of temporaries. In this case terminator +/// statement is the same statement that branches control flow in evaluation +/// of matching full expression. +class CFGTerminator { + llvm::PointerIntPair Data; +public: + CFGTerminator() {} + CFGTerminator(Stmt *S, bool TemporaryDtorsBranch = false) + : Data(S, TemporaryDtorsBranch) {} + + Stmt *getStmt() { return Data.getPointer(); } + const Stmt *getStmt() const { return Data.getPointer(); } + + bool isTemporaryDtorsBranch() const { return Data.getInt(); } + + operator Stmt *() { return getStmt(); } + operator const Stmt *() const { return getStmt(); } + + Stmt *operator->() { return getStmt(); } + const Stmt *operator->() const { return getStmt(); } + + Stmt &operator*() { return *getStmt(); } + const Stmt &operator*() const { return *getStmt(); } + + operator bool() const { return getStmt(); } }; /// CFGBlock - Represents a single basic block in a source-level CFG. @@ -77,11 +263,11 @@ /// &&, || expression that uses result of && or ||, RHS /// class CFGBlock { - class StatementList { + class ElementList { typedef BumpVector ImplTy; ImplTy Impl; public: - StatementList(BumpVectorContext &C) : Impl(C, 4) {} + ElementList(BumpVectorContext &C) : Impl(C, 4) {} typedef std::reverse_iterator iterator; typedef std::reverse_iterator const_iterator; @@ -89,6 +275,11 @@ typedef ImplTy::const_iterator const_reverse_iterator; void push_back(CFGElement e, BumpVectorContext &C) { Impl.push_back(e, C); } + reverse_iterator insert(reverse_iterator I, size_t Cnt, CFGElement E, + BumpVectorContext& C) { + return Impl.insert(I, Cnt, E, C); + } + CFGElement front() const { return Impl.back(); } CFGElement back() const { return Impl.front(); } @@ -111,7 +302,7 @@ }; /// Stmts - The set of statements in the basic block. - StatementList Stmts; + ElementList Elements; /// Label - An (optional) label that prefixes the executable /// statements in the block. When this variable is non-NULL, it is @@ -121,7 +312,7 @@ /// Terminator - The terminator for a basic block that /// indicates the type of control-flow that occurs between a block /// and its successors. - Stmt *Terminator; + CFGTerminator Terminator; /// LoopTarget - Some blocks are used to represent the "loop edge" to /// the start of a loop from within the loop body. This Stmt* will be @@ -140,33 +331,33 @@ public: explicit CFGBlock(unsigned blockid, BumpVectorContext &C) - : Stmts(C), Label(NULL), Terminator(NULL), LoopTarget(NULL), + : Elements(C), Label(NULL), Terminator(NULL), LoopTarget(NULL), BlockID(blockid), Preds(C, 1), Succs(C, 1) {} ~CFGBlock() {} // Statement iterators - typedef StatementList::iterator iterator; - typedef StatementList::const_iterator const_iterator; - typedef StatementList::reverse_iterator reverse_iterator; - typedef StatementList::const_reverse_iterator const_reverse_iterator; - - CFGElement front() const { return Stmts.front(); } - CFGElement back() const { return Stmts.back(); } - - iterator begin() { return Stmts.begin(); } - iterator end() { return Stmts.end(); } - const_iterator begin() const { return Stmts.begin(); } - const_iterator end() const { return Stmts.end(); } - - reverse_iterator rbegin() { return Stmts.rbegin(); } - reverse_iterator rend() { return Stmts.rend(); } - const_reverse_iterator rbegin() const { return Stmts.rbegin(); } - const_reverse_iterator rend() const { return Stmts.rend(); } + typedef ElementList::iterator iterator; + typedef ElementList::const_iterator const_iterator; + typedef ElementList::reverse_iterator reverse_iterator; + typedef ElementList::const_reverse_iterator const_reverse_iterator; + + CFGElement front() const { return Elements.front(); } + CFGElement back() const { return Elements.back(); } + + iterator begin() { return Elements.begin(); } + iterator end() { return Elements.end(); } + const_iterator begin() const { return Elements.begin(); } + const_iterator end() const { return Elements.end(); } + + reverse_iterator rbegin() { return Elements.rbegin(); } + reverse_iterator rend() { return Elements.rend(); } + const_reverse_iterator rbegin() const { return Elements.rbegin(); } + const_reverse_iterator rend() const { return Elements.rend(); } - unsigned size() const { return Stmts.size(); } - bool empty() const { return Stmts.empty(); } + unsigned size() const { return Elements.size(); } + bool empty() const { return Elements.empty(); } - CFGElement operator[](size_t i) const { return Stmts[i]; } + CFGElement operator[](size_t i) const { return Elements[i]; } // CFG iterators typedef AdjacentBlocks::iterator pred_iterator; @@ -205,14 +396,67 @@ unsigned pred_size() const { return Preds.size(); } bool pred_empty() const { return Preds.empty(); } + + class FilterOptions { + public: + FilterOptions() { + IgnoreDefaultsWithCoveredEnums = 0; + } + + unsigned IgnoreDefaultsWithCoveredEnums : 1; + }; + + static bool FilterEdge(const FilterOptions &F, const CFGBlock *Src, + const CFGBlock *Dst); + + template + class FilteredCFGBlockIterator { + private: + IMPL I, E; + const FilterOptions F; + const CFGBlock *From; + public: + explicit FilteredCFGBlockIterator(const IMPL &i, const IMPL &e, + const CFGBlock *from, + const FilterOptions &f) + : I(i), E(e), F(f), From(from) {} + + bool hasMore() const { return I != E; } + + FilteredCFGBlockIterator &operator++() { + do { ++I; } while (hasMore() && Filter(*I)); + return *this; + } + + const CFGBlock *operator*() const { return *I; } + private: + bool Filter(const CFGBlock *To) { + return IsPred ? FilterEdge(F, To, From) : FilterEdge(F, From, To); + } + }; + + typedef FilteredCFGBlockIterator + filtered_pred_iterator; + + typedef FilteredCFGBlockIterator + filtered_succ_iterator; + + filtered_pred_iterator filtered_pred_start_end(const FilterOptions &f) const { + return filtered_pred_iterator(pred_begin(), pred_end(), this, f); + } + + filtered_succ_iterator filtered_succ_start_end(const FilterOptions &f) const { + return filtered_succ_iterator(succ_begin(), succ_end(), this, f); + } + // Manipulation of block contents void setTerminator(Stmt* Statement) { Terminator = Statement; } void setLabel(Stmt* Statement) { Label = Statement; } void setLoopTarget(const Stmt *loopTarget) { LoopTarget = loopTarget; } - Stmt* getTerminator() { return Terminator; } - const Stmt* getTerminator() const { return Terminator; } + CFGTerminator getTerminator() { return Terminator; } + const CFGTerminator getTerminator() const { return Terminator; } Stmt* getTerminatorCondition(); @@ -239,17 +483,39 @@ Succs.push_back(Block, C); } - void appendStmt(Stmt* Statement, BumpVectorContext &C, bool asLValue) { - Stmts.push_back(CFGElement(Statement, asLValue), C); - } - void StartScope(Stmt* S, BumpVectorContext &C) { - Stmts.push_back(CFGElement(S, CFGElement::StartScope), C); + void appendStmt(Stmt* statement, BumpVectorContext &C) { + Elements.push_back(CFGStmt(statement), C); } - void EndScope(Stmt* S, BumpVectorContext &C) { - Stmts.push_back(CFGElement(S, CFGElement::EndScope), C); + + void appendInitializer(CXXCtorInitializer *initializer, + BumpVectorContext& C) { + Elements.push_back(CFGInitializer(initializer), C); + } + + void appendBaseDtor(const CXXBaseSpecifier *BS, BumpVectorContext &C) { + Elements.push_back(CFGBaseDtor(BS), C); + } + + void appendMemberDtor(FieldDecl *FD, BumpVectorContext &C) { + Elements.push_back(CFGMemberDtor(FD), C); + } + + void appendTemporaryDtor(CXXBindTemporaryExpr *E, BumpVectorContext &C) { + Elements.push_back(CFGTemporaryDtor(E), C); } -}; + // Destructors must be inserted in reversed order. So insertion is in two + // steps. First we prepare space for some number of elements, then we insert + // the elements beginning at the last position in prepared space. + iterator beginAutomaticObjDtorsInsert(iterator I, size_t Cnt, + BumpVectorContext& C) { + return iterator(Elements.insert(I.base(), Cnt, CFGElement(), C)); + } + iterator insertAutomaticObjDtor(iterator I, VarDecl* VD, Stmt* S) { + *I = CFGAutomaticObjDtor(VD, S); + return ++I; + } +}; /// CFG - Represents a source-level, intra-procedural CFG that represents the /// control-flow of a Stmt. The Stmt can represent an entire function body, @@ -264,13 +530,24 @@ // CFG Construction & Manipulation. //===--------------------------------------------------------------------===// + class BuildOptions { + public: + bool PruneTriviallyFalseEdges:1; + bool AddEHEdges:1; + bool AddInitializers:1; + bool AddImplicitDtors:1; + + BuildOptions() + : PruneTriviallyFalseEdges(true) + , AddEHEdges(false) + , AddInitializers(false) + , AddImplicitDtors(false) {} + }; + /// buildCFG - Builds a CFG from an AST. The responsibility to free the /// constructed CFG belongs to the caller. static CFG* buildCFG(const Decl *D, Stmt* AST, ASTContext *C, - bool pruneTriviallyFalseEdges = true, - bool AddEHEdges = false, - bool AddScopes = false /* NOT FULLY IMPLEMENTED. - NOT READY FOR GENERAL USE. */); + BuildOptions BO = BuildOptions()); /// createBlock - Create a new block in the CFG. The CFG owns the block; /// the caller should not directly free it. @@ -324,8 +601,10 @@ void VisitBlockStmts(CALLBACK& O) const { for (const_iterator I=begin(), E=end(); I != E; ++I) for (CFGBlock::const_iterator BI=(*I)->begin(), BE=(*I)->end(); - BI != BE; ++BI) - O(*BI); + BI != BE; ++BI) { + if (const CFGStmt *stmt = BI->getAs()) + O(stmt->getStmt()); + } } //===--------------------------------------------------------------------===// @@ -340,7 +619,10 @@ operator unsigned() const { assert(Idx >=0); return (unsigned) Idx; } }; - bool isBlkExpr(const Stmt* S) { return getBlkExprNum(S); } + bool isBlkExpr(const Stmt* S) { return getBlkExprNum(S); } + bool isBlkExpr(const Stmt *S) const { + return const_cast(this)->isBlkExpr(S); + } BlkExprNumTy getBlkExprNum(const Stmt* S); unsigned getNumBlkExprs(); @@ -398,18 +680,22 @@ namespace llvm { -/// Implement simplify_type for CFGElement, so that we can dyn_cast from -/// CFGElement to a specific Stmt class. -template <> struct simplify_type { - typedef ::clang::Stmt* SimpleType; - static SimpleType getSimplifiedValue(const ::clang::CFGElement &Val) { +/// Implement simplify_type for CFGTerminator, so that we can dyn_cast from +/// CFGTerminator to a specific Stmt class. +template <> struct simplify_type { + typedef const ::clang::Stmt *SimpleType; + static SimpleType getSimplifiedValue(const ::clang::CFGTerminator &Val) { return Val.getStmt(); } }; - -template <> struct simplify_type< ::clang::CFGElement> - : public simplify_type {}; - + +template <> struct simplify_type< ::clang::CFGTerminator> { + typedef ::clang::Stmt *SimpleType; + static SimpleType getSimplifiedValue(const ::clang::CFGTerminator &Val) { + return const_cast(Val.getStmt()); + } +}; + // Traits for: CFGBlock template <> struct GraphTraits< ::clang::CFGBlock* > { diff -Nru clang-2.8/tools/clang/include/clang/Analysis/DomainSpecific/CocoaConventions.h clang-2.9/tools/clang/include/clang/Analysis/DomainSpecific/CocoaConventions.h --- clang-2.8/tools/clang/include/clang/Analysis/DomainSpecific/CocoaConventions.h 1970-01-01 00:00:00.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/Analysis/DomainSpecific/CocoaConventions.h 2011-03-02 01:50:55.000000000 +0000 @@ -0,0 +1,40 @@ +//===- CocoaConventions.h - Special handling of Cocoa conventions -*- C++ -*--// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_ANALYSIS_DS_COCOA +#define LLVM_CLANG_ANALYSIS_DS_COCOA + +#include "clang/AST/Type.h" + +namespace clang { +namespace ento { +namespace cocoa { + + enum NamingConvention { NoConvention, CreateRule, InitRule }; + + NamingConvention deriveNamingConvention(Selector S); + + static inline bool followsFundamentalRule(Selector S) { + return deriveNamingConvention(S) == CreateRule; + } + + bool isRefType(QualType RetTy, llvm::StringRef Prefix, + llvm::StringRef Name = llvm::StringRef()); + + bool isCFObjectRef(QualType T); + + bool isCocoaObjectRef(QualType T); + +}}} + +#endif diff -Nru clang-2.8/tools/clang/include/clang/Analysis/FlowSensitive/DataflowSolver.h clang-2.9/tools/clang/include/clang/Analysis/FlowSensitive/DataflowSolver.h --- clang-2.8/tools/clang/include/clang/Analysis/FlowSensitive/DataflowSolver.h 2010-07-23 18:15:17.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/Analysis/FlowSensitive/DataflowSolver.h 2011-03-01 03:15:10.000000000 +0000 @@ -273,8 +273,13 @@ void ProcessBlock(const CFGBlock* B, bool recordStmtValues, dataflow::forward_analysis_tag) { - for (StmtItr I=ItrTraits::StmtBegin(B), E=ItrTraits::StmtEnd(B); I!=E;++I) - ProcessStmt(*I, recordStmtValues, AnalysisDirTag()); + TF.setCurrentBlock(B); + + for (StmtItr I=ItrTraits::StmtBegin(B), E=ItrTraits::StmtEnd(B); I!=E;++I) { + CFGElement El = *I; + if (const CFGStmt *S = El.getAs()) + ProcessStmt(S->getStmt(), recordStmtValues, AnalysisDirTag()); + } TF.VisitTerminator(const_cast(B)); } @@ -282,10 +287,15 @@ void ProcessBlock(const CFGBlock* B, bool recordStmtValues, dataflow::backward_analysis_tag) { + TF.setCurrentBlock(B); + TF.VisitTerminator(const_cast(B)); - for (StmtItr I=ItrTraits::StmtBegin(B), E=ItrTraits::StmtEnd(B); I!=E;++I) - ProcessStmt(*I, recordStmtValues, AnalysisDirTag()); + for (StmtItr I=ItrTraits::StmtBegin(B), E=ItrTraits::StmtEnd(B); I!=E;++I) { + CFGElement El = *I; + if (const CFGStmt *S = El.getAs()) + ProcessStmt(S->getStmt(), recordStmtValues, AnalysisDirTag()); + } } void ProcessStmt(const Stmt* S, bool record, dataflow::forward_analysis_tag) { diff -Nru clang-2.8/tools/clang/include/clang/Analysis/ProgramPoint.h clang-2.9/tools/clang/include/clang/Analysis/ProgramPoint.h --- clang-2.8/tools/clang/include/clang/Analysis/ProgramPoint.h 2010-09-03 01:06:44.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/Analysis/ProgramPoint.h 2011-02-09 01:27:27.000000000 +0000 @@ -17,7 +17,7 @@ #include "clang/Analysis/AnalysisContext.h" #include "clang/Analysis/CFG.h" -#include "llvm/System/DataTypes.h" +#include "llvm/Support/DataTypes.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/FoldingSet.h" #include "llvm/Support/Casting.h" @@ -44,6 +44,7 @@ PostPurgeDeadSymbolsKind, PostStmtCustomKind, PostLValueKind, + PostInitializerKind, CallEnterKind, CallExitKind, MinPostStmtKind = PostStmtKind, @@ -70,11 +71,12 @@ protected: const void* getData1() const { return Data.first; } const void* getData2() const { return Data.second; } - const void *getTag() const { return Tag; } public: Kind getKind() const { return K; } + const void *getTag() const { return Tag; } + const LocationContext *getLocationContext() const { return L; } // For use with DenseMap. This hash is probably slow. @@ -118,10 +120,12 @@ return B->empty() ? CFGElement() : B->front(); } - const Stmt *getFirstStmt() const { - return getFirstElement().getStmt(); + /// Create a new BlockEntrance object that is the same as the original + /// except for using the specified tag value. + BlockEntrance withTag(const void *tag) { + return BlockEntrance(getBlock(), getLocationContext(), tag); } - + static bool classof(const ProgramPoint* Location) { return Location->getKind() == BlockEntranceKind; } @@ -136,11 +140,6 @@ return reinterpret_cast(getData1()); } - const Stmt* getLastStmt() const { - const CFGBlock* B = getBlock(); - return B->empty() ? CFGElement() : B->back(); - } - const Stmt* getTerminator() const { return getBlock()->getTerminator(); } @@ -183,14 +182,15 @@ class PostStmt : public StmtPoint { protected: - PostStmt(const Stmt* S, Kind k, const LocationContext *L, const void *tag = 0) - : StmtPoint(S, NULL, k, L, tag) {} - PostStmt(const Stmt* S, const void* data, Kind k, const LocationContext *L, const void *tag =0) : StmtPoint(S, data, k, L, tag) {} public: + explicit PostStmt(const Stmt* S, Kind k, + const LocationContext *L, const void *tag = 0) + : StmtPoint(S, NULL, k, L, tag) {} + explicit PostStmt(const Stmt* S, const LocationContext *L,const void *tag = 0) : StmtPoint(S, NULL, PostStmtKind, L, tag) {} @@ -313,19 +313,29 @@ } }; +class PostInitializer : public ProgramPoint { +public: + PostInitializer(const CXXCtorInitializer *I, + const LocationContext *L) + : ProgramPoint(I, PostInitializerKind, L) {} + + static bool classof(const ProgramPoint *Location) { + return Location->getKind() == PostInitializerKind; + } +}; + class CallEnter : public StmtPoint { public: - // L is caller's location context. AC is callee's AnalysisContext. - CallEnter(const Stmt *S, const AnalysisContext *AC, const LocationContext *L) - : StmtPoint(S, AC, CallEnterKind, L, 0) {} + CallEnter(const Stmt *stmt, const StackFrameContext *calleeCtx, + const LocationContext *callerCtx) + : StmtPoint(stmt, calleeCtx, CallEnterKind, callerCtx, 0) {} const Stmt *getCallExpr() const { return static_cast(getData1()); } - AnalysisContext *getCalleeContext() const { - return const_cast( - static_cast(getData2())); + const StackFrameContext *getCalleeContext() const { + return static_cast(getData2()); } static bool classof(const ProgramPoint *Location) { diff -Nru clang-2.8/tools/clang/include/clang/Analysis/Support/BumpVector.h clang-2.9/tools/clang/include/clang/Analysis/Support/BumpVector.h --- clang-2.8/tools/clang/include/clang/Analysis/Support/BumpVector.h 2010-06-30 16:54:05.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/Analysis/Support/BumpVector.h 2010-12-19 20:49:25.000000000 +0000 @@ -24,6 +24,7 @@ #include "llvm/ADT/PointerIntPair.h" #include #include +#include #include namespace clang { @@ -155,7 +156,25 @@ grow(C); goto Retry; } - + + /// insert - Insert some number of copies of element into a position. Return + /// iterator to position after last inserted copy. + iterator insert(iterator I, size_t Cnt, const_reference E, + BumpVectorContext &C) { + assert (I >= Begin && I <= End && "Iterator out of bounds."); + if (End + Cnt <= Capacity) { + Retry: + move_range_right(I, End, Cnt); + construct_range(I, I + Cnt, E); + End += Cnt; + return I + Cnt; + } + ptrdiff_t D = I - Begin; + grow(C, size() + Cnt); + I = Begin + D; + goto Retry; + } + void reserve(BumpVectorContext &C, unsigned N) { if (unsigned(Capacity-Begin) < N) grow(C, N); @@ -181,6 +200,14 @@ E->~T(); } } + + void move_range_right(T *S, T *E, size_t D) { + for (T *I = E + D - 1, *IL = S + D - 1; I != IL; --I) { + --E; + new (I) T(*E); + E->~T(); + } + } }; // Define this out-of-line to dissuade the C++ compiler from inlining it. diff -Nru clang-2.8/tools/clang/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h clang-2.9/tools/clang/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h --- clang-2.8/tools/clang/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h 2010-06-25 23:51:34.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h 2011-02-18 01:44:17.000000000 +0000 @@ -66,6 +66,8 @@ DISPATCH_CASE(Record) // FIXME: Refine. VisitStructDecl? DISPATCH_CASE(CXXRecord) DISPATCH_CASE(Enum) + DISPATCH_CASE(UsingDirective) + DISPATCH_CASE(Using) default: assert(false && "Subtype of ScopedDecl not handled."); } @@ -85,6 +87,8 @@ DEFAULT_DISPATCH(ObjCMethod) DEFAULT_DISPATCH(ObjCProtocol) DEFAULT_DISPATCH(ObjCCategory) + DEFAULT_DISPATCH(UsingDirective) + DEFAULT_DISPATCH(Using) void VisitCXXRecordDecl(CXXRecordDecl *D) { static_cast(this)->VisitRecordDecl(D); diff -Nru clang-2.8/tools/clang/include/clang/Analysis/Visitors/CFGRecStmtVisitor.h clang-2.9/tools/clang/include/clang/Analysis/Visitors/CFGRecStmtVisitor.h --- clang-2.8/tools/clang/include/clang/Analysis/Visitors/CFGRecStmtVisitor.h 2009-12-24 02:40:30.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/Analysis/Visitors/CFGRecStmtVisitor.h 2010-10-22 22:08:32.000000000 +0000 @@ -26,6 +26,11 @@ static_cast< ImplClass* >(this)->VisitChildren(S); } + void VisitCompoundStmt(CompoundStmt *S) { + // Do nothing. Everything in a CompoundStmt is inlined + // into the CFG. + } + void VisitConditionVariableInit(Stmt *S) { assert(S == this->getCurrentBlkStmt()); VarDecl *CondVar = 0; diff -Nru clang-2.8/tools/clang/include/clang/Analysis/Visitors/CFGStmtVisitor.h clang-2.9/tools/clang/include/clang/Analysis/Visitors/CFGStmtVisitor.h --- clang-2.8/tools/clang/include/clang/Analysis/Visitors/CFGStmtVisitor.h 2010-08-25 11:45:40.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/Analysis/Visitors/CFGStmtVisitor.h 2011-02-17 10:25:35.000000000 +0000 @@ -80,6 +80,7 @@ DISPATCH_CASE(StmtExpr) DISPATCH_CASE(ConditionalOperator) + DISPATCH_CASE(BinaryConditionalOperator) DISPATCH_CASE(ObjCForCollectionStmt) case Stmt::BinaryOperatorClass: { @@ -102,6 +103,7 @@ DEFAULT_BLOCKSTMT_VISIT(StmtExpr) DEFAULT_BLOCKSTMT_VISIT(ConditionalOperator) + DEFAULT_BLOCKSTMT_VISIT(BinaryConditionalOperator) RetTy BlockStmt_VisitObjCForCollectionStmt(ObjCForCollectionStmt* S) { return static_cast(this)->BlockStmt_VisitStmt(S); @@ -155,7 +157,7 @@ } } - for (Stmt::child_iterator I=S->child_begin(), E=S->child_end(); I != E;++I) + for (Stmt::child_range I = S->children(); I; ++I) if (*I) static_cast(this)->Visit(*I); } }; diff -Nru clang-2.8/tools/clang/include/clang/AST/ASTConsumer.h clang-2.9/tools/clang/include/clang/AST/ASTConsumer.h --- clang-2.8/tools/clang/include/clang/AST/ASTConsumer.h 2010-08-18 23:57:06.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/AST/ASTConsumer.h 2010-10-24 17:26:36.000000000 +0000 @@ -19,6 +19,7 @@ class CXXRecordDecl; class DeclGroupRef; class HandleTagDeclDefinition; + class ASTMutationListener; class ASTDeserializationListener; // layering violation because void* is ugly class SemaConsumer; // layering violation required for safe SemaConsumer class TagDecl; @@ -86,10 +87,13 @@ /// it was actually used. virtual void HandleVTable(CXXRecordDecl *RD, bool DefinitionRequired) {} + /// \brief If the consumer is interested in entities getting modified after + /// their initial creation, it should return a pointer to + /// a GetASTMutationListener here. + virtual ASTMutationListener *GetASTMutationListener() { return 0; } + /// \brief If the consumer is interested in entities being deserialized from /// AST files, it should return a pointer to a ASTDeserializationListener here - /// - /// The return type is void* because ASTDS lives in Frontend. virtual ASTDeserializationListener *GetASTDeserializationListener() { return 0; } /// PrintStats - If desired, print any statistics. diff -Nru clang-2.8/tools/clang/include/clang/AST/ASTContext.h clang-2.9/tools/clang/include/clang/AST/ASTContext.h --- clang-2.8/tools/clang/include/clang/AST/ASTContext.h 2010-08-30 16:49:28.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/AST/ASTContext.h 2011-02-22 22:38:33.000000000 +0000 @@ -45,6 +45,7 @@ class Diagnostic; class Expr; class ExternalASTSource; + class ASTMutationListener; class IdentifierTable; class SelectorTable; class SourceManager; @@ -56,6 +57,7 @@ class CXXRecordDecl; class Decl; class FieldDecl; + class MangleContext; class ObjCIvarDecl; class ObjCIvarRefExpr; class ObjCPropertyDecl; @@ -78,49 +80,62 @@ class ASTContext { ASTContext &this_() { return *this; } - std::vector Types; - llvm::FoldingSet ExtQualNodes; - llvm::FoldingSet ComplexTypes; - llvm::FoldingSet PointerTypes; - llvm::FoldingSet BlockPointerTypes; - llvm::FoldingSet LValueReferenceTypes; - llvm::FoldingSet RValueReferenceTypes; - llvm::FoldingSet MemberPointerTypes; - llvm::FoldingSet ConstantArrayTypes; - llvm::FoldingSet IncompleteArrayTypes; - std::vector VariableArrayTypes; - llvm::FoldingSet DependentSizedArrayTypes; - llvm::FoldingSet DependentSizedExtVectorTypes; - llvm::FoldingSet VectorTypes; - llvm::FoldingSet FunctionNoProtoTypes; - llvm::FoldingSet FunctionProtoTypes; - llvm::FoldingSet DependentTypeOfExprTypes; - llvm::FoldingSet DependentDecltypeTypes; - llvm::FoldingSet TemplateTypeParmTypes; - llvm::FoldingSet SubstTemplateTypeParmTypes; - llvm::ContextualFoldingSet + mutable std::vector Types; + mutable llvm::FoldingSet ExtQualNodes; + mutable llvm::FoldingSet ComplexTypes; + mutable llvm::FoldingSet PointerTypes; + mutable llvm::FoldingSet BlockPointerTypes; + mutable llvm::FoldingSet LValueReferenceTypes; + mutable llvm::FoldingSet RValueReferenceTypes; + mutable llvm::FoldingSet MemberPointerTypes; + mutable llvm::FoldingSet ConstantArrayTypes; + mutable llvm::FoldingSet IncompleteArrayTypes; + mutable std::vector VariableArrayTypes; + mutable llvm::FoldingSet DependentSizedArrayTypes; + mutable llvm::FoldingSet + DependentSizedExtVectorTypes; + mutable llvm::FoldingSet VectorTypes; + mutable llvm::FoldingSet FunctionNoProtoTypes; + mutable llvm::FoldingSet FunctionProtoTypes; + mutable llvm::FoldingSet DependentTypeOfExprTypes; + mutable llvm::FoldingSet DependentDecltypeTypes; + mutable llvm::FoldingSet TemplateTypeParmTypes; + mutable llvm::FoldingSet + SubstTemplateTypeParmTypes; + mutable llvm::FoldingSet + SubstTemplateTypeParmPackTypes; + mutable llvm::ContextualFoldingSet TemplateSpecializationTypes; - llvm::FoldingSet ElaboratedTypes; - llvm::FoldingSet DependentNameTypes; - llvm::ContextualFoldingSet + mutable llvm::FoldingSet ParenTypes; + mutable llvm::FoldingSet ElaboratedTypes; + mutable llvm::FoldingSet DependentNameTypes; + mutable llvm::ContextualFoldingSet DependentTemplateSpecializationTypes; - llvm::FoldingSet ObjCObjectTypes; - llvm::FoldingSet ObjCObjectPointerTypes; - - llvm::FoldingSet QualifiedTemplateNames; - llvm::FoldingSet DependentTemplateNames; - + llvm::FoldingSet PackExpansionTypes; + mutable llvm::FoldingSet ObjCObjectTypes; + mutable llvm::FoldingSet ObjCObjectPointerTypes; + mutable llvm::FoldingSet AutoTypes; + llvm::FoldingSet AttributedTypes; + + mutable llvm::FoldingSet QualifiedTemplateNames; + mutable llvm::FoldingSet DependentTemplateNames; + mutable llvm::FoldingSet + SubstTemplateTemplateParmPacks; + /// \brief The set of nested name specifiers. /// /// This set is managed by the NestedNameSpecifier class. - llvm::FoldingSet NestedNameSpecifiers; - NestedNameSpecifier *GlobalNestedNameSpecifier; + mutable llvm::FoldingSet NestedNameSpecifiers; + mutable NestedNameSpecifier *GlobalNestedNameSpecifier; friend class NestedNameSpecifier; /// ASTRecordLayouts - A cache mapping from RecordDecls to ASTRecordLayouts. /// This is lazily created. This is intentionally not serialized. - llvm::DenseMap ASTRecordLayouts; - llvm::DenseMap ObjCLayouts; + mutable llvm::DenseMap + ASTRecordLayouts; + mutable llvm::DenseMap + ObjCLayouts; /// KeyFunctions - A cache mapping from CXXRecordDecls to key functions. llvm::DenseMap KeyFunctions; @@ -128,6 +143,9 @@ /// \brief Mapping from ObjCContainers to their ObjCImplementations. llvm::DenseMap ObjCImpls; + /// \brief Mapping from __block VarDecls to their copy initialization expr. + llvm::DenseMap BlockVarCopyInits; + /// \brief Representation of a "canonical" template template parameter that /// is used in canonical template names. class CanonicalTemplateTemplateParm : public llvm::FoldingSetNode { @@ -144,10 +162,11 @@ static void Profile(llvm::FoldingSetNodeID &ID, TemplateTemplateParmDecl *Parm); }; - llvm::FoldingSet CanonTemplateTemplateParms; + mutable llvm::FoldingSet + CanonTemplateTemplateParms; - TemplateTemplateParmDecl *getCanonicalTemplateTemplateParmDecl( - TemplateTemplateParmDecl *TTP); + TemplateTemplateParmDecl * + getCanonicalTemplateTemplateParmDecl(TemplateTemplateParmDecl *TTP) const; /// \brief Whether __[u]int128_t identifier is installed. bool IsInt128Installed; @@ -171,11 +190,11 @@ QualType ObjCClassTypedefType; QualType ObjCConstantStringType; - RecordDecl *CFConstantStringTypeDecl; + mutable RecordDecl *CFConstantStringTypeDecl; - RecordDecl *NSConstantStringTypeDecl; + mutable RecordDecl *NSConstantStringTypeDecl; - RecordDecl *ObjCFastEnumerationStateTypeDecl; + mutable RecordDecl *ObjCFastEnumerationStateTypeDecl; /// \brief The type for the C FILE type. TypeDecl *FILEDecl; @@ -187,10 +206,13 @@ TypeDecl *sigjmp_bufDecl; /// \brief Type for the Block descriptor for Blocks CodeGen. - RecordDecl *BlockDescriptorType; + mutable RecordDecl *BlockDescriptorType; /// \brief Type for the Block descriptor for Blocks CodeGen. - RecordDecl *BlockDescriptorExtendedType; + mutable RecordDecl *BlockDescriptorExtendedType; + + /// \brief Declaration for the CUDA cudaConfigureCall function. + FunctionDecl *cudaConfigureCallDecl; TypeSourceInfo NullTypeSourceInfo; @@ -279,7 +301,7 @@ /// /// AST objects are never destructed; rather, all memory associated with the /// AST objects will be released when the ASTContext itself is destroyed. - llvm::BumpPtrAllocator BumpAlloc; + mutable llvm::BumpPtrAllocator BumpAlloc; /// \brief Allocator for partial diagnostics. PartialDiagnostic::StorageAllocator DiagAllocator; @@ -287,14 +309,17 @@ /// \brief The current C++ ABI. llvm::OwningPtr ABI; CXXABI *createCXXABI(const TargetInfo &T); - + + friend class ASTDeclReader; + public: const TargetInfo &Target; IdentifierTable &Idents; SelectorTable &Selectors; Builtin::Context &BuiltinInfo; - DeclarationNameTable DeclarationNames; + mutable DeclarationNameTable DeclarationNames; llvm::OwningPtr ExternalSource; + ASTMutationListener *Listener; clang::PrintingPolicy PrintingPolicy; // Typedefs which may be provided defining the structure of Objective-C @@ -305,10 +330,10 @@ SourceManager& getSourceManager() { return SourceMgr; } const SourceManager& getSourceManager() const { return SourceMgr; } - void *Allocate(unsigned Size, unsigned Align = 8) { + void *Allocate(unsigned Size, unsigned Align = 8) const { return BumpAlloc.Allocate(Size, Align); } - void Deallocate(void *Ptr) { } + void Deallocate(void *Ptr) const { } PartialDiagnostic::StorageAllocator &getDiagAllocator() { return DiagAllocator; @@ -316,6 +341,8 @@ const LangOptions& getLangOptions() const { return LangOpts; } + Diagnostic &getDiagnostics() const; + FullSourceLoc getFullLoc(SourceLocation Loc) const { return FullSourceLoc(Loc,SourceMgr); } @@ -388,7 +415,6 @@ CanQualType VoidPtrTy, NullPtrTy; CanQualType OverloadTy; CanQualType DependentTy; - CanQualType UndeducedAutoTy; CanQualType ObjCBuiltinIdTy, ObjCBuiltinClassTy, ObjCBuiltinSelTy; ASTContext(const LangOptions& LOpts, SourceManager &SM, const TargetInfo &t, @@ -409,6 +435,19 @@ /// with this AST context, if any. ExternalASTSource *getExternalSource() const { return ExternalSource.get(); } + /// \brief Attach an AST mutation listener to the AST context. + /// + /// The AST mutation listener provides the ability to track modifications to + /// the abstract syntax tree entities committed after they were initially + /// created. + void setASTMutationListener(ASTMutationListener *Listener) { + this->Listener = Listener; + } + + /// \brief Retrieve a pointer to the AST mutation listener associated + /// with this AST context, if any. + ASTMutationListener *getASTMutationListener() const { return Listener; } + void PrintStats() const; const std::vector& getTypes() const { return Types; } @@ -418,9 +457,9 @@ private: /// getExtQualType - Return a type with extended qualifiers. - QualType getExtQualType(const Type *Base, Qualifiers Quals); + QualType getExtQualType(const Type *Base, Qualifiers Quals) const; - QualType getTypeDeclTypeSlow(const TypeDecl *Decl); + QualType getTypeDeclTypeSlow(const TypeDecl *Decl) const; public: /// getAddSpaceQualType - Return the uniqued reference to the type for an @@ -428,24 +467,26 @@ /// The resulting type has a union of the qualifiers from T and the address /// space. If T already has an address space specifier, it is silently /// replaced. - QualType getAddrSpaceQualType(QualType T, unsigned AddressSpace); + QualType getAddrSpaceQualType(QualType T, unsigned AddressSpace) const; /// getObjCGCQualType - Returns the uniqued reference to the type for an /// objc gc qualified type. The retulting type has a union of the qualifiers /// from T and the gc attribute. - QualType getObjCGCQualType(QualType T, Qualifiers::GC gcAttr); + QualType getObjCGCQualType(QualType T, Qualifiers::GC gcAttr) const; /// getRestrictType - Returns the uniqued reference to the type for a /// 'restrict' qualified type. The resulting type has a union of the /// qualifiers from T and 'restrict'. - QualType getRestrictType(QualType T) { + QualType getRestrictType(QualType T) const { return T.withFastQualifiers(Qualifiers::Restrict); } /// getVolatileType - Returns the uniqued reference to the type for a /// 'volatile' qualified type. The resulting type has a union of the /// qualifiers from T and 'volatile'. - QualType getVolatileType(QualType T); + QualType getVolatileType(QualType T) const { + return T.withFastQualifiers(Qualifiers::Volatile); + } /// getConstType - Returns the uniqued reference to the type for a /// 'const' qualified type. The resulting type has a union of the @@ -453,44 +494,33 @@ /// /// It can be reasonably expected that this will always be /// equivalent to calling T.withConst(). - QualType getConstType(QualType T) { return T.withConst(); } + QualType getConstType(QualType T) const { return T.withConst(); } - /// getNoReturnType - Add or remove the noreturn attribute to the given type - /// which must be a FunctionType or a pointer to an allowable type or a - /// BlockPointer. - QualType getNoReturnType(QualType T, bool AddNoReturn = true); - - /// getCallConvType - Adds the specified calling convention attribute to - /// the given type, which must be a FunctionType or a pointer to an - /// allowable type. - QualType getCallConvType(QualType T, CallingConv CallConv); - - /// getRegParmType - Sets the specified regparm attribute to - /// the given type, which must be a FunctionType or a pointer to an - /// allowable type. - QualType getRegParmType(QualType T, unsigned RegParm); + /// adjustFunctionType - Change the ExtInfo on a function type. + const FunctionType *adjustFunctionType(const FunctionType *Fn, + FunctionType::ExtInfo EInfo); /// getComplexType - Return the uniqued reference to the type for a complex /// number with the specified element type. - QualType getComplexType(QualType T); - CanQualType getComplexType(CanQualType T) { + QualType getComplexType(QualType T) const; + CanQualType getComplexType(CanQualType T) const { return CanQualType::CreateUnsafe(getComplexType((QualType) T)); } /// getPointerType - Return the uniqued reference to the type for a pointer to /// the specified type. - QualType getPointerType(QualType T); - CanQualType getPointerType(CanQualType T) { + QualType getPointerType(QualType T) const; + CanQualType getPointerType(CanQualType T) const { return CanQualType::CreateUnsafe(getPointerType((QualType) T)); } /// getBlockPointerType - Return the uniqued reference to the type for a block /// of the specified type. - QualType getBlockPointerType(QualType T); + QualType getBlockPointerType(QualType T) const; /// This gets the struct used to keep track of the descriptor for pointer to /// blocks. - QualType getBlockDescriptorType(); + QualType getBlockDescriptorType() const; // Set the type for a Block descriptor type. void setBlockDescriptorType(QualType T); @@ -503,48 +533,51 @@ /// This gets the struct used to keep track of the extended descriptor for /// pointer to blocks. - QualType getBlockDescriptorExtendedType(); + QualType getBlockDescriptorExtendedType() const; // Set the type for a Block descriptor extended type. void setBlockDescriptorExtendedType(QualType T); /// Get the BlockDescriptorExtendedType type, or NULL if it hasn't yet been /// built. - QualType getRawBlockdescriptorExtendedType() { + QualType getRawBlockdescriptorExtendedType() const { if (BlockDescriptorExtendedType) return getTagDeclType(BlockDescriptorExtendedType); return QualType(); } - /// This gets the struct used to keep track of pointer to blocks, complete - /// with captured variables. - QualType getBlockParmType(bool BlockHasCopyDispose, - llvm::SmallVectorImpl &Layout); + void setcudaConfigureCallDecl(FunctionDecl *FD) { + cudaConfigureCallDecl = FD; + } + FunctionDecl *getcudaConfigureCallDecl() { + return cudaConfigureCallDecl; + } /// This builds the struct used for __block variables. - QualType BuildByRefType(llvm::StringRef DeclName, QualType Ty); + QualType BuildByRefType(llvm::StringRef DeclName, QualType Ty) const; /// Returns true iff we need copy/dispose helpers for the given type. - bool BlockRequiresCopying(QualType Ty); + bool BlockRequiresCopying(QualType Ty) const; /// getLValueReferenceType - Return the uniqued reference to the type for an /// lvalue reference to the specified type. - QualType getLValueReferenceType(QualType T, bool SpelledAsLValue = true); + QualType getLValueReferenceType(QualType T, bool SpelledAsLValue = true) + const; /// getRValueReferenceType - Return the uniqued reference to the type for an /// rvalue reference to the specified type. - QualType getRValueReferenceType(QualType T); + QualType getRValueReferenceType(QualType T) const; /// getMemberPointerType - Return the uniqued reference to the type for a /// member pointer to the specified type in the specified class. The class /// is a Type because it could be a dependent name. - QualType getMemberPointerType(QualType T, const Type *Cls); + QualType getMemberPointerType(QualType T, const Type *Cls) const; /// getVariableArrayType - Returns a non-unique reference to the type for a /// variable array of the specified element type. QualType getVariableArrayType(QualType EltTy, Expr *NumElts, ArrayType::ArraySizeModifier ASM, - unsigned EltTypeQuals, - SourceRange Brackets); + unsigned IndexTypeQuals, + SourceRange Brackets) const; /// getDependentSizedArrayType - Returns a non-unique reference to /// the type for a dependently-sized array of the specified element @@ -552,30 +585,34 @@ /// comparable, at some point. QualType getDependentSizedArrayType(QualType EltTy, Expr *NumElts, ArrayType::ArraySizeModifier ASM, - unsigned EltTypeQuals, - SourceRange Brackets); + unsigned IndexTypeQuals, + SourceRange Brackets) const; /// getIncompleteArrayType - Returns a unique reference to the type for a /// incomplete array of the specified element type. QualType getIncompleteArrayType(QualType EltTy, ArrayType::ArraySizeModifier ASM, - unsigned EltTypeQuals); + unsigned IndexTypeQuals) const; /// getConstantArrayType - Return the unique reference to the type for a /// constant array of the specified element type. QualType getConstantArrayType(QualType EltTy, const llvm::APInt &ArySize, ArrayType::ArraySizeModifier ASM, - unsigned EltTypeQuals); + unsigned IndexTypeQuals) const; + + /// getVariableArrayDecayedType - Returns a vla type where known sizes + /// are replaced with [*]. + QualType getVariableArrayDecayedType(QualType Ty) const; /// getVectorType - Return the unique reference to a vector type of /// the specified element type and size. VectorType must be a built-in type. QualType getVectorType(QualType VectorType, unsigned NumElts, - VectorType::AltiVecSpecific AltiVecSpec); + VectorType::VectorKind VecKind) const; /// getExtVectorType - Return the unique reference to an extended vector type /// of the specified element type and size. VectorType must be a built-in /// type. - QualType getExtVectorType(QualType VectorType, unsigned NumElts); + QualType getExtVectorType(QualType VectorType, unsigned NumElts) const; /// getDependentSizedExtVectorType - Returns a non-unique reference to /// the type for a dependently-sized vector of the specified element @@ -583,30 +620,27 @@ /// comparable, at some point. QualType getDependentSizedExtVectorType(QualType VectorType, Expr *SizeExpr, - SourceLocation AttrLoc); + SourceLocation AttrLoc) const; /// getFunctionNoProtoType - Return a K&R style C function type like 'int()'. /// QualType getFunctionNoProtoType(QualType ResultTy, - const FunctionType::ExtInfo &Info); + const FunctionType::ExtInfo &Info) const; - QualType getFunctionNoProtoType(QualType ResultTy) { + QualType getFunctionNoProtoType(QualType ResultTy) const { return getFunctionNoProtoType(ResultTy, FunctionType::ExtInfo()); } - /// getFunctionType - Return a normal function type with a typed argument - /// list. isVariadic indicates whether the argument list includes '...'. - QualType getFunctionType(QualType ResultTy, const QualType *ArgArray, - unsigned NumArgs, bool isVariadic, - unsigned TypeQuals, bool hasExceptionSpec, - bool hasAnyExceptionSpec, - unsigned NumExs, const QualType *ExArray, - const FunctionType::ExtInfo &Info); + /// getFunctionType - Return a normal function type with a typed + /// argument list. + QualType getFunctionType(QualType ResultTy, + const QualType *Args, unsigned NumArgs, + const FunctionProtoType::ExtProtoInfo &EPI) const; /// getTypeDeclType - Return the unique reference to the type for /// the specified type declaration. QualType getTypeDeclType(const TypeDecl *Decl, - const TypeDecl *PrevDecl = 0) { + const TypeDecl *PrevDecl = 0) const { assert(Decl && "Passed null for Decl param"); if (Decl->TypeForDecl) return QualType(Decl->TypeForDecl, 0); @@ -621,77 +655,93 @@ /// getTypedefType - Return the unique reference to the type for the /// specified typename decl. - QualType getTypedefType(const TypedefDecl *Decl, QualType Canon = QualType()); + QualType getTypedefType(const TypedefDecl *Decl, QualType Canon = QualType()) + const; - QualType getRecordType(const RecordDecl *Decl); + QualType getRecordType(const RecordDecl *Decl) const; - QualType getEnumType(const EnumDecl *Decl); + QualType getEnumType(const EnumDecl *Decl) const; - QualType getInjectedClassNameType(CXXRecordDecl *Decl, QualType TST); + QualType getInjectedClassNameType(CXXRecordDecl *Decl, QualType TST) const; + + QualType getAttributedType(AttributedType::Kind attrKind, + QualType modifiedType, + QualType equivalentType); QualType getSubstTemplateTypeParmType(const TemplateTypeParmType *Replaced, - QualType Replacement); + QualType Replacement) const; + QualType getSubstTemplateTypeParmPackType( + const TemplateTypeParmType *Replaced, + const TemplateArgument &ArgPack); QualType getTemplateTypeParmType(unsigned Depth, unsigned Index, bool ParameterPack, - IdentifierInfo *Name = 0); + IdentifierInfo *Name = 0) const; QualType getTemplateSpecializationType(TemplateName T, const TemplateArgument *Args, unsigned NumArgs, - QualType Canon = QualType()); + QualType Canon = QualType()) const; QualType getCanonicalTemplateSpecializationType(TemplateName T, const TemplateArgument *Args, - unsigned NumArgs); + unsigned NumArgs) const; QualType getTemplateSpecializationType(TemplateName T, const TemplateArgumentListInfo &Args, - QualType Canon = QualType()); + QualType Canon = QualType()) const; TypeSourceInfo * getTemplateSpecializationTypeInfo(TemplateName T, SourceLocation TLoc, const TemplateArgumentListInfo &Args, - QualType Canon = QualType()); + QualType Canon = QualType()) const; + + QualType getParenType(QualType NamedType) const; QualType getElaboratedType(ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, - QualType NamedType); + QualType NamedType) const; QualType getDependentNameType(ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, const IdentifierInfo *Name, - QualType Canon = QualType()); + QualType Canon = QualType()) const; QualType getDependentTemplateSpecializationType(ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, const IdentifierInfo *Name, - const TemplateArgumentListInfo &Args); + const TemplateArgumentListInfo &Args) const; QualType getDependentTemplateSpecializationType(ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, const IdentifierInfo *Name, unsigned NumArgs, - const TemplateArgument *Args); + const TemplateArgument *Args) const; - QualType getObjCInterfaceType(const ObjCInterfaceDecl *Decl); + QualType getPackExpansionType(QualType Pattern, + llvm::Optional NumExpansions); + + QualType getObjCInterfaceType(const ObjCInterfaceDecl *Decl) const; QualType getObjCObjectType(QualType Base, ObjCProtocolDecl * const *Protocols, - unsigned NumProtocols); + unsigned NumProtocols) const; /// getObjCObjectPointerType - Return a ObjCObjectPointerType type /// for the given ObjCObjectType. - QualType getObjCObjectPointerType(QualType OIT); + QualType getObjCObjectPointerType(QualType OIT) const; /// getTypeOfType - GCC extension. - QualType getTypeOfExprType(Expr *e); - QualType getTypeOfType(QualType t); + QualType getTypeOfExprType(Expr *e) const; + QualType getTypeOfType(QualType t) const; /// getDecltypeType - C++0x decltype. - QualType getDecltypeType(Expr *e); + QualType getDecltypeType(Expr *e) const; + + /// getAutoType - C++0x deduced auto type. + QualType getAutoType(QualType DeducedType) const; /// getTagDeclType - Return the unique reference to the type for the /// specified TagDecl (struct/union/class/enum) decl. - QualType getTagDeclType(const TagDecl *Decl); + QualType getTagDeclType(const TagDecl *Decl) const; /// getSizeType - Return the unique type for "size_t" (C99 7.17), defined /// in . The sizeof operator requires this (C99 6.5.3.4p4). @@ -716,14 +766,14 @@ // getCFConstantStringType - Return the C structure type used to represent // constant CFStrings. - QualType getCFConstantStringType(); + QualType getCFConstantStringType() const; // getNSConstantStringType - Return the C structure type used to represent // constant NSStrings. - QualType getNSConstantStringType(); + QualType getNSConstantStringType() const; /// Get the structure type used to representation NSStrings, or NULL /// if it hasn't yet been built. - QualType getRawNSConstantStringType() { + QualType getRawNSConstantStringType() const { if (NSConstantStringTypeDecl) return getTagDeclType(NSConstantStringTypeDecl); return QualType(); @@ -733,7 +783,7 @@ /// Get the structure type used to representation CFStrings, or NULL /// if it hasn't yet been built. - QualType getRawCFConstantStringType() { + QualType getRawCFConstantStringType() const { if (CFConstantStringTypeDecl) return getTagDeclType(CFConstantStringTypeDecl); return QualType(); @@ -747,11 +797,11 @@ } //// This gets the struct used to keep track of fast enumerations. - QualType getObjCFastEnumerationStateType(); + QualType getObjCFastEnumerationStateType() const; /// Get the ObjCFastEnumerationState type, or NULL if it hasn't yet /// been built. - QualType getRawObjCFastEnumerationStateType() { + QualType getRawObjCFastEnumerationStateType() const { if (ObjCFastEnumerationStateTypeDecl) return getTagDeclType(ObjCFastEnumerationStateTypeDecl); return QualType(); @@ -763,7 +813,7 @@ void setFILEDecl(TypeDecl *FILEDecl) { this->FILEDecl = FILEDecl; } /// \brief Retrieve the C FILE type. - QualType getFILEType() { + QualType getFILEType() const { if (FILEDecl) return getTypeDeclType(FILEDecl); return QualType(); @@ -775,7 +825,7 @@ } /// \brief Retrieve the C jmp_buf type. - QualType getjmp_bufType() { + QualType getjmp_bufType() const { if (jmp_bufDecl) return getTypeDeclType(jmp_bufDecl); return QualType(); @@ -787,17 +837,22 @@ } /// \brief Retrieve the C sigjmp_buf type. - QualType getsigjmp_bufType() { + QualType getsigjmp_bufType() const { if (sigjmp_bufDecl) return getTypeDeclType(sigjmp_bufDecl); return QualType(); } + /// \brief The result type of logical operations, '<', '>', '!=', etc. + QualType getLogicalOperationType() const { + return getLangOptions().CPlusPlus ? BoolTy : IntTy; + } + /// getObjCEncodingForType - Emit the ObjC type encoding for the /// given type into \arg S. If \arg NameFields is specified then /// record field names are also encoded. void getObjCEncodingForType(QualType t, std::string &S, - const FieldDecl *Field=0); + const FieldDecl *Field=0) const; void getLegacyIntegralTypeEncoding(QualType &t) const; @@ -805,13 +860,18 @@ void getObjCEncodingForTypeQualifier(Decl::ObjCDeclQualifier QT, std::string &S) const; + /// getObjCEncodingForFunctionDecl - Returns the encoded type for this + //function. This is in the same format as Objective-C method encodings. + void getObjCEncodingForFunctionDecl(const FunctionDecl *Decl, std::string& S); + /// getObjCEncodingForMethodDecl - Return the encoded type for this method /// declaration. - void getObjCEncodingForMethodDecl(const ObjCMethodDecl *Decl, std::string &S); + void getObjCEncodingForMethodDecl(const ObjCMethodDecl *Decl, std::string &S) + const; - /// getObjCEncodingForBlockDecl - Return the encoded type for this block + /// getObjCEncodingForBlock - Return the encoded type for this block /// declaration. - void getObjCEncodingForBlock(const BlockExpr *Expr, std::string& S); + std::string getObjCEncodingForBlock(const BlockExpr *blockExpr) const; /// getObjCEncodingForPropertyDecl - Return the encoded type for /// this method declaration. If non-NULL, Container must be either @@ -819,14 +879,14 @@ /// only be NULL when getting encodings for protocol properties. void getObjCEncodingForPropertyDecl(const ObjCPropertyDecl *PD, const Decl *Container, - std::string &S); + std::string &S) const; bool ProtocolCompatibleWithProtocol(ObjCProtocolDecl *lProto, - ObjCProtocolDecl *rProto); + ObjCProtocolDecl *rProto) const; /// getObjCEncodingTypeSize returns size of type for objective-c encoding /// purpose in characters. - CharUnits getObjCEncodingTypeSize(QualType t); + CharUnits getObjCEncodingTypeSize(QualType t) const; /// \brief Whether __[u]int128_t identifier is installed. bool isInt128Installed() const { return IsInt128Installed; } @@ -854,12 +914,12 @@ /// getCVRQualifiedType - Returns a type with additional const, /// volatile, or restrict qualifiers. - QualType getCVRQualifiedType(QualType T, unsigned CVR) { + QualType getCVRQualifiedType(QualType T, unsigned CVR) const { return getQualifiedType(T, Qualifiers::fromCVRMask(CVR)); } /// getQualifiedType - Returns a type with additional qualifiers. - QualType getQualifiedType(QualType T, Qualifiers Qs) { + QualType getQualifiedType(QualType T, Qualifiers Qs) const { if (!Qs.hasNonFastQualifiers()) return T.withFastQualifiers(Qs.getFastQualifiers()); QualifierCollector Qc(Qs); @@ -868,35 +928,41 @@ } /// getQualifiedType - Returns a type with additional qualifiers. - QualType getQualifiedType(const Type *T, Qualifiers Qs) { + QualType getQualifiedType(const Type *T, Qualifiers Qs) const { if (!Qs.hasNonFastQualifiers()) return QualType(T, Qs.getFastQualifiers()); return getExtQualType(T, Qs); } DeclarationNameInfo getNameForTemplate(TemplateName Name, - SourceLocation NameLoc); + SourceLocation NameLoc) const; TemplateName getOverloadedTemplateName(UnresolvedSetIterator Begin, - UnresolvedSetIterator End); + UnresolvedSetIterator End) const; TemplateName getQualifiedTemplateName(NestedNameSpecifier *NNS, bool TemplateKeyword, - TemplateDecl *Template); + TemplateDecl *Template) const; TemplateName getDependentTemplateName(NestedNameSpecifier *NNS, - const IdentifierInfo *Name); + const IdentifierInfo *Name) const; TemplateName getDependentTemplateName(NestedNameSpecifier *NNS, - OverloadedOperatorKind Operator); - + OverloadedOperatorKind Operator) const; + TemplateName getSubstTemplateTemplateParmPack(TemplateTemplateParmDecl *Param, + const TemplateArgument &ArgPack) const; + enum GetBuiltinTypeError { GE_None, //< No error GE_Missing_stdio, //< Missing a type from GE_Missing_setjmp //< Missing a type from }; - /// GetBuiltinType - Return the type for the specified builtin. - QualType GetBuiltinType(unsigned ID, GetBuiltinTypeError &Error); + /// GetBuiltinType - Return the type for the specified builtin. If + /// IntegerConstantArgs is non-null, it is filled in with a bitmask of + /// arguments to the builtin that are required to be integer constant + /// expressions. + QualType GetBuiltinType(unsigned ID, GetBuiltinTypeError &Error, + unsigned *IntegerConstantArgs = 0) const; private: CanQualType getFromTargetType(unsigned Type) const; @@ -909,11 +975,12 @@ /// getObjCGCAttr - Returns one of GCNone, Weak or Strong objc's /// garbage collection attribute. /// - Qualifiers::GC getObjCGCAttrKind(const QualType &Ty) const; + Qualifiers::GC getObjCGCAttrKind(QualType Ty) const; - /// areCompatibleVectorTypes - Return true if the given vector types either - /// are of the same unqualified type or if one is GCC and other - equivalent - /// AltiVec vector type. + /// areCompatibleVectorTypes - Return true if the given vector types + /// are of the same unqualified type or if they are equivalent to the same + /// GCC vector type, ignoring whether they are target-specific (AltiVec or + /// Neon) types. bool areCompatibleVectorTypes(QualType FirstVec, QualType SecondVec); /// isObjCNSObjectType - Return true if this is an NSObject object with @@ -930,76 +997,83 @@ /// getTypeInfo - Get the size and alignment of the specified complete type in /// bits. - std::pair getTypeInfo(const Type *T); - std::pair getTypeInfo(QualType T) { + std::pair getTypeInfo(const Type *T) const; + std::pair getTypeInfo(QualType T) const { return getTypeInfo(T.getTypePtr()); } /// getTypeSize - Return the size of the specified type, in bits. This method /// does not work on incomplete types. - uint64_t getTypeSize(QualType T) { + uint64_t getTypeSize(QualType T) const { return getTypeInfo(T).first; } - uint64_t getTypeSize(const Type *T) { + uint64_t getTypeSize(const Type *T) const { return getTypeInfo(T).first; } /// getCharWidth - Return the size of the character type, in bits - uint64_t getCharWidth() { + uint64_t getCharWidth() const { return getTypeSize(CharTy); } + /// toCharUnitsFromBits - Convert a size in bits to a size in characters. + CharUnits toCharUnitsFromBits(int64_t BitSize) const; + + /// toBits - Convert a size in characters to a size in bits. + int64_t toBits(CharUnits CharSize) const; + /// getTypeSizeInChars - Return the size of the specified type, in characters. /// This method does not work on incomplete types. - CharUnits getTypeSizeInChars(QualType T); - CharUnits getTypeSizeInChars(const Type *T); + CharUnits getTypeSizeInChars(QualType T) const; + CharUnits getTypeSizeInChars(const Type *T) const; /// getTypeAlign - Return the ABI-specified alignment of a type, in bits. /// This method does not work on incomplete types. - unsigned getTypeAlign(QualType T) { + unsigned getTypeAlign(QualType T) const { return getTypeInfo(T).second; } - unsigned getTypeAlign(const Type *T) { + unsigned getTypeAlign(const Type *T) const { return getTypeInfo(T).second; } /// getTypeAlignInChars - Return the ABI-specified alignment of a type, in /// characters. This method does not work on incomplete types. - CharUnits getTypeAlignInChars(QualType T); - CharUnits getTypeAlignInChars(const Type *T); + CharUnits getTypeAlignInChars(QualType T) const; + CharUnits getTypeAlignInChars(const Type *T) const; - std::pair getTypeInfoInChars(const Type *T); - std::pair getTypeInfoInChars(QualType T); + std::pair getTypeInfoInChars(const Type *T) const; + std::pair getTypeInfoInChars(QualType T) const; /// getPreferredTypeAlign - Return the "preferred" alignment of the specified /// type for the current target in bits. This can be different than the ABI /// alignment in cases where it is beneficial for performance to overalign /// a data type. - unsigned getPreferredTypeAlign(const Type *T); + unsigned getPreferredTypeAlign(const Type *T) const; /// getDeclAlign - Return a conservative estimate of the alignment of /// the specified decl. Note that bitfields do not have a valid alignment, so /// this method will assert on them. /// If @p RefAsPointee, references are treated like their underlying type /// (for alignof), else they're treated like pointers (for CodeGen). - CharUnits getDeclAlign(const Decl *D, bool RefAsPointee = false); + CharUnits getDeclAlign(const Decl *D, bool RefAsPointee = false) const; /// getASTRecordLayout - Get or compute information about the layout of the /// specified record (struct/union/class), which indicates its size and field /// position information. - const ASTRecordLayout &getASTRecordLayout(const RecordDecl *D); + const ASTRecordLayout &getASTRecordLayout(const RecordDecl *D) const; /// getASTObjCInterfaceLayout - Get or compute information about the /// layout of the specified Objective-C interface. - const ASTRecordLayout &getASTObjCInterfaceLayout(const ObjCInterfaceDecl *D); + const ASTRecordLayout &getASTObjCInterfaceLayout(const ObjCInterfaceDecl *D) + const; - void DumpRecordLayout(const RecordDecl *RD, llvm::raw_ostream &OS); + void DumpRecordLayout(const RecordDecl *RD, llvm::raw_ostream &OS) const; /// getASTObjCImplementationLayout - Get or compute information about /// the layout of the specified Objective-C implementation. This may /// differ from the interface if synthesized ivars are present. const ASTRecordLayout & - getASTObjCImplementationLayout(const ObjCImplementationDecl *D); + getASTObjCImplementationLayout(const ObjCImplementationDecl *D) const; /// getKeyFunction - Get the key function for the given record decl, or NULL /// if there isn't one. The key function is, according to the Itanium C++ ABI @@ -1009,13 +1083,18 @@ /// of class definition. const CXXMethodDecl *getKeyFunction(const CXXRecordDecl *RD); + bool isNearlyEmpty(const CXXRecordDecl *RD) const; + + MangleContext *createMangleContext(); + void ShallowCollectObjCIvars(const ObjCInterfaceDecl *OI, - llvm::SmallVectorImpl &Ivars); + llvm::SmallVectorImpl &Ivars) + const; void DeepCollectObjCIvars(const ObjCInterfaceDecl *OI, bool leafClass, - llvm::SmallVectorImpl &Ivars); + llvm::SmallVectorImpl &Ivars) const; - unsigned CountNonClassIvars(const ObjCInterfaceDecl *OI); + unsigned CountNonClassIvars(const ObjCInterfaceDecl *OI) const; void CollectInheritedProtocols(const Decl *CDecl, llvm::SmallPtrSet &Protocols); @@ -1029,8 +1108,11 @@ /// include typedefs, 'typeof' operators, etc. The returned type is guaranteed /// to be free of any of these, allowing two canonical types to be compared /// for exact equality with a simple pointer comparison. - CanQualType getCanonicalType(QualType T); - const Type *getCanonicalType(const Type *T) { + CanQualType getCanonicalType(QualType T) const { + return CanQualType::CreateUnsafe(T.getCanonicalType()); + } + + const Type *getCanonicalType(const Type *T) const { return T->getCanonicalTypeInternal().getTypePtr(); } @@ -1038,7 +1120,7 @@ /// corresponding to the specific potentially non-canonical one. /// Qualifiers are stripped off, functions are turned into function /// pointers, and arrays decay one level into pointers. - CanQualType getCanonicalParamType(QualType T); + CanQualType getCanonicalParamType(QualType T) const; /// \brief Determine whether the given types are equivalent. bool hasSameType(QualType T1, QualType T2) { @@ -1062,13 +1144,8 @@ /// \brief Determine whether the given types are equivalent after /// cvr-qualifiers have been removed. bool hasSameUnqualifiedType(QualType T1, QualType T2) { - CanQualType CT1 = getCanonicalType(T1); - CanQualType CT2 = getCanonicalType(T2); - - Qualifiers Quals; - QualType UnqualT1 = getUnqualifiedArrayType(CT1, Quals); - QualType UnqualT2 = getUnqualifiedArrayType(CT2, Quals); - return UnqualT1 == UnqualT2; + return getCanonicalType(T1).getTypePtr() == + getCanonicalType(T2).getTypePtr(); } bool UnwrapSimilarPointerTypes(QualType &T1, QualType &T2); @@ -1097,11 +1174,15 @@ /// by declarations in the type system and the canonical type for /// the template type parameter 'T' is template-param-0-0. NestedNameSpecifier * - getCanonicalNestedNameSpecifier(NestedNameSpecifier *NNS); + getCanonicalNestedNameSpecifier(NestedNameSpecifier *NNS) const; + + /// \brief Retrieves the default calling convention to use for + /// C++ instance methods. + CallingConv getDefaultMethodCallConv(); /// \brief Retrieves the canonical representation of the given /// calling convention. - CallingConv getCanonicalCallConv(CallingConv CC) { + CallingConv getCanonicalCallConv(CallingConv CC) const { if (CC == CC_C) return CC_Default; return CC; @@ -1131,7 +1212,7 @@ /// template name uses the shortest form of the dependent /// nested-name-specifier, which itself contains all canonical /// types, values, and templates. - TemplateName getCanonicalTemplateName(TemplateName Name); + TemplateName getCanonicalTemplateName(TemplateName Name) const; /// \brief Determine whether the given template names refer to the same /// template. @@ -1142,33 +1223,35 @@ /// The canonical template argument is the simplest template argument /// (which may be a type, value, expression, or declaration) that /// expresses the value of the argument. - TemplateArgument getCanonicalTemplateArgument(const TemplateArgument &Arg); + TemplateArgument getCanonicalTemplateArgument(const TemplateArgument &Arg) + const; /// Type Query functions. If the type is an instance of the specified class, /// return the Type pointer for the underlying maximally pretty type. This /// is a member of ASTContext because this may need to do some amount of /// canonicalization, e.g. to move type qualifiers into the element type. - const ArrayType *getAsArrayType(QualType T); - const ConstantArrayType *getAsConstantArrayType(QualType T) { + const ArrayType *getAsArrayType(QualType T) const; + const ConstantArrayType *getAsConstantArrayType(QualType T) const { return dyn_cast_or_null(getAsArrayType(T)); } - const VariableArrayType *getAsVariableArrayType(QualType T) { + const VariableArrayType *getAsVariableArrayType(QualType T) const { return dyn_cast_or_null(getAsArrayType(T)); } - const IncompleteArrayType *getAsIncompleteArrayType(QualType T) { + const IncompleteArrayType *getAsIncompleteArrayType(QualType T) const { return dyn_cast_or_null(getAsArrayType(T)); } - const DependentSizedArrayType *getAsDependentSizedArrayType(QualType T) { + const DependentSizedArrayType *getAsDependentSizedArrayType(QualType T) + const { return dyn_cast_or_null(getAsArrayType(T)); } /// getBaseElementType - Returns the innermost element type of an array type. /// For example, will return "int" for int[m][n] - QualType getBaseElementType(const ArrayType *VAT); + QualType getBaseElementType(const ArrayType *VAT) const; /// getBaseElementType - Returns the innermost element type of a type /// (which needn't actually be an array type). - QualType getBaseElementType(QualType QT); + QualType getBaseElementType(QualType QT) const; /// getConstantArrayElementCount - Returns number of constant array elements. uint64_t getConstantArrayElementCount(const ConstantArrayType *CA) const; @@ -1179,30 +1262,30 @@ /// this returns a pointer to a properly qualified element of the array. /// /// See C99 6.7.5.3p7 and C99 6.3.2.1p3. - QualType getArrayDecayedType(QualType T); + QualType getArrayDecayedType(QualType T) const; /// getPromotedIntegerType - Returns the type that Promotable will /// promote to: C99 6.3.1.1p2, assuming that Promotable is a promotable /// integer type. - QualType getPromotedIntegerType(QualType PromotableType); + QualType getPromotedIntegerType(QualType PromotableType) const; /// \brief Whether this is a promotable bitfield reference according /// to C99 6.3.1.1p2, bullet 2 (and GCC extensions). /// /// \returns the type this bit-field will promote to, or NULL if no /// promotion occurs. - QualType isPromotableBitField(Expr *E); + QualType isPromotableBitField(Expr *E) const; /// getIntegerTypeOrder - Returns the highest ranked integer type: /// C99 6.3.1.8p1. If LHS > RHS, return 1. If LHS == RHS, return 0. If /// LHS < RHS, return -1. - int getIntegerTypeOrder(QualType LHS, QualType RHS); + int getIntegerTypeOrder(QualType LHS, QualType RHS) const; /// getFloatingTypeOrder - Compare the rank of the two specified floating /// point types, ignoring the domain of the type (i.e. 'double' == /// '_Complex double'). If LHS > RHS, return 1. If LHS == RHS, return 0. If /// LHS < RHS, return -1. - int getFloatingTypeOrder(QualType LHS, QualType RHS); + int getFloatingTypeOrder(QualType LHS, QualType RHS) const; /// getFloatingTypeOfSizeWithinDomain - Returns a real floating /// point or a complex type (based on typeDomain/typeSize). @@ -1213,7 +1296,7 @@ private: // Helper for integer ordering - unsigned getIntegerRank(Type* T); + unsigned getIntegerRank(const Type *T) const; public: @@ -1260,14 +1343,15 @@ bool Unqualified = false); QualType mergeFunctionTypes(QualType, QualType, bool OfBlockPointer=false, bool Unqualified = false); + QualType mergeFunctionArgumentTypes(QualType, QualType, + bool OfBlockPointer=false, + bool Unqualified = false); + QualType mergeTransparentUnionType(QualType, QualType, + bool OfBlockPointer=false, + bool Unqualified = false); QualType mergeObjCGCQualifiers(QualType, QualType); - /// UsualArithmeticConversionsType - handles the various conversions - /// that are common to binary operators (C99 6.3.1.8, C++ [expr]p9) - /// and returns the result type of that conversion. - QualType UsualArithmeticConversionsType(QualType lhs, QualType rhs); - void ResetObjCLayout(const ObjCContainerDecl *CD) { ObjCLayouts[CD] = 0; } @@ -1278,7 +1362,7 @@ // The width of an integer, as defined in C99 6.2.6.2. This is the number // of bits in an integer type excluding any padding bits. - unsigned getIntWidth(QualType T); + unsigned getIntWidth(QualType T) const; // Per C99 6.2.5p6, for every signed integer type, there is a corresponding // unsigned integer type. This method takes a signed type, and returns the @@ -1303,7 +1387,7 @@ /// MakeIntValue - Make an APSInt of the appropriate width and /// signedness for the given \arg Value and integer \arg Type. - llvm::APSInt MakeIntValue(uint64_t Value, QualType Type) { + llvm::APSInt MakeIntValue(uint64_t Value, QualType Type) const { llvm::APSInt Res(getIntWidth(Type), !Type->isSignedIntegerType()); Res = Value; return Res; @@ -1314,12 +1398,23 @@ /// \brief Get the implementation of ObjCCategoryDecl, or NULL if none exists. ObjCCategoryImplDecl *getObjCImplementation(ObjCCategoryDecl *D); + /// \brief returns true if there is at lease one @implementation in TU. + bool AnyObjCImplementation() { + return !ObjCImpls.empty(); + } + /// \brief Set the implementation of ObjCInterfaceDecl. void setObjCImplementation(ObjCInterfaceDecl *IFaceD, ObjCImplementationDecl *ImplD); /// \brief Set the implementation of ObjCCategoryDecl. void setObjCImplementation(ObjCCategoryDecl *CatD, ObjCCategoryImplDecl *ImplD); + + /// \brief Set the copy inialization expression of a block var decl. + void setBlockVarCopyInits(VarDecl*VD, Expr* Init); + /// \brief Get the copy initialization expression of VarDecl,or NULL if + /// none exists. + Expr *getBlockVarCopyInits(const VarDecl*VD); /// \brief Allocate an uninitialized TypeSourceInfo. /// @@ -1332,13 +1427,14 @@ /// /// \param Size the size of the type info to create, or 0 if the size /// should be calculated based on the type. - TypeSourceInfo *CreateTypeSourceInfo(QualType T, unsigned Size = 0); + TypeSourceInfo *CreateTypeSourceInfo(QualType T, unsigned Size = 0) const; /// \brief Allocate a TypeSourceInfo where all locations have been /// initialized to a given location, which defaults to the empty /// location. TypeSourceInfo * - getTrivialTypeSourceInfo(QualType T, SourceLocation Loc = SourceLocation()); + getTrivialTypeSourceInfo(QualType T, + SourceLocation Loc = SourceLocation()) const; TypeSourceInfo *getNullTypeSourceInfo() { return &NullTypeSourceInfo; } @@ -1407,10 +1503,11 @@ bool ExpandStructures, const FieldDecl *Field, bool OutermostType = false, - bool EncodingProperty = false); + bool EncodingProperty = false) const; - const ASTRecordLayout &getObjCLayout(const ObjCInterfaceDecl *D, - const ObjCImplementationDecl *Impl); + const ASTRecordLayout & + getObjCLayout(const ObjCInterfaceDecl *D, + const ObjCImplementationDecl *Impl) const; private: /// \brief A set of deallocations that should be performed when the @@ -1423,8 +1520,7 @@ llvm::PointerIntPair LastSDM; /// \brief A counter used to uniquely identify "blocks". - unsigned int UniqueBlockByRefTypeID; - unsigned int UniqueBlockParmTypeID; + mutable unsigned int UniqueBlockByRefTypeID; friend class DeclContext; friend class DeclarationNameTable; @@ -1469,7 +1565,7 @@ /// @param Alignment The alignment of the allocated memory (if the underlying /// allocator supports it). /// @return The allocated memory. Could be NULL. -inline void *operator new(size_t Bytes, clang::ASTContext &C, +inline void *operator new(size_t Bytes, const clang::ASTContext &C, size_t Alignment) throw () { return C.Allocate(Bytes, Alignment); } @@ -1479,7 +1575,7 @@ /// invoking it directly; see the new operator for more details. This operator /// is called implicitly by the compiler if a placement new expression using /// the ASTContext throws in the object constructor. -inline void operator delete(void *Ptr, clang::ASTContext &C, size_t) +inline void operator delete(void *Ptr, const clang::ASTContext &C, size_t) throw () { C.Deallocate(Ptr); } @@ -1503,7 +1599,7 @@ /// @param Alignment The alignment of the allocated memory (if the underlying /// allocator supports it). /// @return The allocated memory. Could be NULL. -inline void *operator new[](size_t Bytes, clang::ASTContext& C, +inline void *operator new[](size_t Bytes, const clang::ASTContext& C, size_t Alignment = 8) throw () { return C.Allocate(Bytes, Alignment); } @@ -1514,7 +1610,7 @@ /// invoking it directly; see the new[] operator for more details. This operator /// is called implicitly by the compiler if a placement new[] expression using /// the ASTContext throws in the object constructor. -inline void operator delete[](void *Ptr, clang::ASTContext &C, size_t) +inline void operator delete[](void *Ptr, const clang::ASTContext &C, size_t) throw () { C.Deallocate(Ptr); } diff -Nru clang-2.8/tools/clang/include/clang/AST/ASTDiagnostic.h clang-2.9/tools/clang/include/clang/AST/ASTDiagnostic.h --- clang-2.8/tools/clang/include/clang/AST/ASTDiagnostic.h 2010-05-04 20:44:26.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/AST/ASTDiagnostic.h 2011-01-27 21:06:28.000000000 +0000 @@ -15,7 +15,7 @@ namespace clang { namespace diag { enum { -#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE,CATEGORY) ENUM, +#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE,ACCESS,CATEGORY) ENUM, #define ASTSTART #include "clang/Basic/DiagnosticASTKinds.inc" #undef DIAG diff -Nru clang-2.8/tools/clang/include/clang/AST/ASTImporter.h clang-2.9/tools/clang/include/clang/AST/ASTImporter.h --- clang-2.8/tools/clang/include/clang/AST/ASTImporter.h 2010-07-24 02:58:13.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/AST/ASTImporter.h 2011-02-25 02:25:35.000000000 +0000 @@ -45,13 +45,13 @@ /// \brief The file managers we're importing to and from. FileManager &ToFileManager, &FromFileManager; - - /// \brief The diagnostics object that we should use to emit diagnostics. - Diagnostic &Diags; + + /// \brief Whether to perform a minimal import. + bool Minimal; /// \brief Mapping from the already-imported types in the "from" context /// to the corresponding types in the "to" context. - llvm::DenseMap ImportedTypes; + llvm::DenseMap ImportedTypes; /// \brief Mapping from the already-imported declarations in the "from" /// context to the corresponding declarations in the "to" context. @@ -63,7 +63,7 @@ /// \brief Mapping from the already-imported FileIDs in the "from" source /// manager to the corresponding FileIDs in the "to" source manager. - llvm::DenseMap ImportedFileIDs; + llvm::DenseMap ImportedFileIDs; /// \brief Imported, anonymous tag declarations that are missing their /// corresponding typedefs. @@ -74,12 +74,29 @@ NonEquivalentDeclSet NonEquivalentDecls; public: - ASTImporter(Diagnostic &Diags, - ASTContext &ToContext, FileManager &ToFileManager, - ASTContext &FromContext, FileManager &FromFileManager); + /// \brief Create a new AST importer. + /// + /// \param ToContext The context we'll be importing into. + /// + /// \param ToFileManager The file manager we'll be importing into. + /// + /// \param FromContext The context we'll be importing from. + /// + /// \param FromFileManager The file manager we'll be importing into. + /// + /// \param MinimalImport If true, the importer will attempt to import + /// as little as it can, e.g., by importing declarations as forward + /// declarations that can be completed at a later point. + ASTImporter(ASTContext &ToContext, FileManager &ToFileManager, + ASTContext &FromContext, FileManager &FromFileManager, + bool MinimalImport); virtual ~ASTImporter(); + /// \brief Whether the importer will perform a minimal import, creating + /// to-be-completed forward declarations when possible. + bool isMinimalImport() const { return Minimal; } + /// \brief Import the given type from the "from" context into the "to" /// context. /// @@ -128,6 +145,17 @@ /// \returns the equivalent nested-name-specifier in the "to" /// context, or NULL if an error occurred. NestedNameSpecifier *Import(NestedNameSpecifier *FromNNS); + + /// \brief Import the given nested-name-specifier from the "from" + /// context into the "to" context. + /// + /// \returns the equivalent nested-name-specifier in the "to" + /// context. + NestedNameSpecifierLoc Import(NestedNameSpecifierLoc FromNNS); + + /// \brief Import the goven template name from the "from" context into the + /// "to" context. + TemplateName Import(TemplateName From); /// \brief Import the given source location from the "from" context into /// the "to" context. @@ -154,7 +182,7 @@ /// into the "to" context. /// /// \returns the equivalent identifier in the "to" context. - IdentifierInfo *Import(IdentifierInfo *FromId); + IdentifierInfo *Import(const IdentifierInfo *FromId); /// \brief Import the given Objective-C selector from the "from" /// context into the "to" context. @@ -169,6 +197,12 @@ /// context. FileID Import(FileID); + /// \brief Import the definition of the given declaration, including all of + /// the declarations it contains. + /// + /// This routine is intended to be used + void ImportDefinition(Decl *From); + /// \brief Cope with a name conflict when importing a declaration into the /// given context. /// @@ -212,9 +246,6 @@ /// \brief Retrieve the file manager that AST nodes are being imported from. FileManager &getFromFileManager() const { return FromFileManager; } - - /// \brief Retrieve the diagnostic formatter. - Diagnostic &getDiags() const { return Diags; } /// \brief Report a diagnostic in the "to" context. DiagnosticBuilder ToDiag(SourceLocation Loc, unsigned DiagID); @@ -228,12 +259,13 @@ /// \brief Note that we have imported the "from" declaration by mapping it /// to the (potentially-newly-created) "to" declaration. /// - /// \returns \p To - Decl *Imported(Decl *From, Decl *To); + /// Subclasses can override this function to observe all of the \c From -> + /// \c To declaration mappings as they are imported. + virtual Decl *Imported(Decl *From, Decl *To); /// \brief Determine whether the given types are structurally /// equivalent. - bool IsStructurallyEquivalent(QualType From, QualType To); + bool IsStructurallyEquivalent(QualType From, QualType To); }; } diff -Nru clang-2.8/tools/clang/include/clang/AST/ASTMutationListener.h clang-2.9/tools/clang/include/clang/AST/ASTMutationListener.h --- clang-2.8/tools/clang/include/clang/AST/ASTMutationListener.h 1970-01-01 00:00:00.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/AST/ASTMutationListener.h 2011-01-25 20:34:14.000000000 +0000 @@ -0,0 +1,48 @@ +//===--- ASTMutationListener.h - AST Mutation Interface --------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines the ASTMutationListener interface. +// +//===----------------------------------------------------------------------===// +#ifndef LLVM_CLANG_AST_ASTMUTATIONLISTENER_H +#define LLVM_CLANG_AST_ASTMUTATIONLISTENER_H + +namespace clang { + class Decl; + class DeclContext; + class TagDecl; + class CXXRecordDecl; + class ClassTemplateDecl; + class ClassTemplateSpecializationDecl; + +/// \brief An abstract interface that should be implemented by listeners +/// that want to be notified when an AST entity gets modified after its +/// initial creation. +class ASTMutationListener { +public: + virtual ~ASTMutationListener(); + + /// \brief A new TagDecl definition was completed. + virtual void CompletedTagDefinition(const TagDecl *D) { } + + /// \brief A new declaration with name has been added to a DeclContext. + virtual void AddedVisibleDecl(const DeclContext *DC, const Decl *D) {} + + /// \brief An implicit member was added after the definition was completed. + virtual void AddedCXXImplicitMember(const CXXRecordDecl *RD, const Decl *D) {} + + /// \brief A template specialization (or partial one) was added to the + /// template declaration. + virtual void AddedCXXTemplateSpecialization(const ClassTemplateDecl *TD, + const ClassTemplateSpecializationDecl *D) {} +}; + +} // end namespace clang + +#endif diff -Nru clang-2.8/tools/clang/include/clang/AST/Attr.h clang-2.9/tools/clang/include/clang/AST/Attr.h --- clang-2.8/tools/clang/include/clang/AST/Attr.h 2010-08-19 06:13:01.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/AST/Attr.h 2011-03-02 04:00:57.000000000 +0000 @@ -36,19 +36,19 @@ } // Defined in ASTContext.h -void *operator new(size_t Bytes, clang::ASTContext &C, +void *operator new(size_t Bytes, const clang::ASTContext &C, size_t Alignment = 16) throw (); // FIXME: Being forced to not have a default argument here due to redeclaration // rules on default arguments sucks -void *operator new[](size_t Bytes, clang::ASTContext &C, +void *operator new[](size_t Bytes, const clang::ASTContext &C, size_t Alignment) throw (); // It is good practice to pair new/delete operators. Also, MSVC gives many // warnings if a matching delete overload is not declared, even though the // throw() spec guarantees it will not be implicitly called. -void operator delete(void *Ptr, clang::ASTContext &C, size_t) +void operator delete(void *Ptr, const clang::ASTContext &C, size_t) throw (); -void operator delete[](void *Ptr, clang::ASTContext &C, size_t) +void operator delete[](void *Ptr, const clang::ASTContext &C, size_t) throw (); namespace clang { @@ -58,9 +58,10 @@ private: SourceLocation Loc; unsigned AttrKind : 16; - bool Inherited : 1; protected: + bool Inherited : 1; + virtual ~Attr(); void* operator new(size_t bytes) throw() { @@ -88,10 +89,6 @@ public: - /// \brief Whether this attribute should be merged to new - /// declarations. - virtual bool isMerged() const { return true; } - attr::Kind getKind() const { return static_cast(AttrKind); } @@ -100,7 +97,6 @@ void setLocation(SourceLocation L) { Loc = L; } bool isInherited() const { return Inherited; } - void setInherited(bool I) { Inherited = I; } // Clone this attribute. virtual Attr* clone(ASTContext &C) const = 0; @@ -109,6 +105,34 @@ static bool classof(const Attr *) { return true; } }; +class InheritableAttr : public Attr { +protected: + InheritableAttr(attr::Kind AK, SourceLocation L) + : Attr(AK, L) {} + +public: + void setInherited(bool I) { Inherited = I; } + + // Implement isa/cast/dyncast/etc. + static bool classof(const Attr *A) { + return A->getKind() <= attr::LAST_INHERITABLE; + } + static bool classof(const InheritableAttr *) { return true; } +}; + +class InheritableParamAttr : public InheritableAttr { +protected: + InheritableParamAttr(attr::Kind AK, SourceLocation L) + : InheritableAttr(AK, L) {} + +public: + // Implement isa/cast/dyncast/etc. + static bool classof(const Attr *A) { + return A->getKind() <= attr::LAST_INHERITABLE_PARAM; + } + static bool classof(const InheritableParamAttr *) { return true; } +}; + #include "clang/AST/Attrs.inc" /// AttrVec - A vector of Attr, which is how they are stored on the AST. diff -Nru clang-2.8/tools/clang/include/clang/AST/CanonicalType.h clang-2.9/tools/clang/include/clang/AST/CanonicalType.h --- clang-2.8/tools/clang/include/clang/AST/CanonicalType.h 2010-08-16 18:08:11.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/AST/CanonicalType.h 2011-01-19 06:33:43.000000000 +0000 @@ -66,7 +66,16 @@ /// \brief Retrieve the underlying type pointer, which refers to a /// canonical type. - T *getTypePtr() const { return cast_or_null(Stored.getTypePtr()); } + /// + /// The underlying pointer must not be NULL. + const T *getTypePtr() const { return cast(Stored.getTypePtr()); } + + /// \brief Retrieve the underlying type pointer, which refers to a + /// canonical type, or NULL. + /// + const T *getTypePtrOrNull() const { + return cast_or_null(Stored.getTypePtrOrNull()); + } /// \brief Implicit conversion to a qualified type. operator QualType() const { return Stored; } @@ -78,6 +87,8 @@ return Stored.isNull(); } + SplitQualType split() const { return Stored.split(); } + /// \brief Retrieve a canonical type pointer with a different static type, /// upcasting or downcasting as needed. /// @@ -216,7 +227,7 @@ public: /// \brief Retrieve the pointer to the underlying Type - T* getTypePtr() const { return Stored.getTypePtr(); } + const T *getTypePtr() const { return Stored.getTypePtr(); } /// \brief Implicit conversion to the underlying pointer. /// @@ -225,7 +236,7 @@ /// @code /// if (CanQual Ptr = T->getAs()) { ... } /// @endcode - operator const T*() const { return this->Stored.getTypePtr(); } + operator const T*() const { return this->Stored.getTypePtrOrNull(); } /// \brief Try to convert the given canonical type to a specific structural /// type. @@ -336,7 +347,7 @@ /// to return smart pointer (proxies?). template struct simplify_type > { - typedef T* SimpleType; + typedef const T *SimpleType; static SimpleType getSimplifiedValue(const ::clang::CanQual &Val) { return Val.getTypePtr(); } @@ -630,7 +641,6 @@ LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(RecordDecl *, getDecl) LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, isBeingDefined) LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, hasConstFields) - LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(unsigned, getAddressSpace) }; template<> diff -Nru clang-2.8/tools/clang/include/clang/AST/CharUnits.h clang-2.9/tools/clang/include/clang/AST/CharUnits.h --- clang-2.8/tools/clang/include/clang/AST/CharUnits.h 2010-01-11 17:06:35.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/AST/CharUnits.h 2011-01-20 01:59:55.000000000 +0000 @@ -14,7 +14,9 @@ #ifndef LLVM_CLANG_AST_CHARUNITS_H #define LLVM_CLANG_AST_CHARUNITS_H -#include "llvm/System/DataTypes.h" +#include "llvm/ADT/DenseMapInfo.h" +#include "llvm/Support/DataTypes.h" +#include "llvm/Support/MathExtras.h" namespace clang { @@ -131,12 +133,24 @@ CharUnits operator- (const CharUnits &Other) const { return CharUnits(Quantity - Other.Quantity); } + CharUnits operator- () const { + return CharUnits(-Quantity); + } + // Conversions. /// getQuantity - Get the raw integer representation of this quantity. QuantityType getQuantity() const { return Quantity; } + /// RoundUpToAlignment - Returns the next integer (mod 2**64) that is + /// greater than or equal to this quantity and is a multiple of \arg + /// Align. Align must be non-zero. + CharUnits RoundUpToAlignment(const CharUnits &Align) { + return CharUnits(llvm::RoundUpToAlignment(Quantity, + Align.Quantity)); + } + }; // class CharUnit } // namespace clang @@ -146,4 +160,38 @@ return CU * Scale; } +namespace llvm { + +template<> struct DenseMapInfo { + static clang::CharUnits getEmptyKey() { + clang::CharUnits::QuantityType Quantity = + DenseMapInfo::getEmptyKey(); + + return clang::CharUnits::fromQuantity(Quantity); + } + + static clang::CharUnits getTombstoneKey() { + clang::CharUnits::QuantityType Quantity = + DenseMapInfo::getTombstoneKey(); + + return clang::CharUnits::fromQuantity(Quantity); + } + + static unsigned getHashValue(const clang::CharUnits &CU) { + clang::CharUnits::QuantityType Quantity = CU.getQuantity(); + return DenseMapInfo::getHashValue(Quantity); + } + + static bool isEqual(const clang::CharUnits &LHS, + const clang::CharUnits &RHS) { + return LHS == RHS; + } +}; + +template <> struct isPodLike { + static const bool value = true; +}; + +} // end namespace llvm + #endif // LLVM_CLANG_AST_CHARUNITS_H diff -Nru clang-2.8/tools/clang/include/clang/AST/CMakeLists.txt clang-2.9/tools/clang/include/clang/AST/CMakeLists.txt --- clang-2.8/tools/clang/include/clang/AST/CMakeLists.txt 2010-08-18 23:23:40.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/AST/CMakeLists.txt 2011-02-20 22:06:32.000000000 +0000 @@ -1,24 +1,17 @@ -set(LLVM_TARGET_DEFINITIONS ../Basic/Attr.td) -tablegen(Attrs.inc - -gen-clang-attr-classes - -I ${CMAKE_CURRENT_SOURCE_DIR}/../../) -add_custom_target(ClangAttrClasses - DEPENDS Attrs.inc) +clang_tablegen(Attrs.inc -gen-clang-attr-classes + -I ${CMAKE_CURRENT_SOURCE_DIR}/../../ + SOURCE ../Basic/Attr.td + TARGET ClangAttrClasses) -tablegen(AttrImpl.inc - -gen-clang-attr-impl - -I ${CMAKE_CURRENT_SOURCE_DIR}/../../) -add_custom_target(ClangAttrImpl - DEPENDS AttrImpl.inc) +clang_tablegen(AttrImpl.inc -gen-clang-attr-impl + -I ${CMAKE_CURRENT_SOURCE_DIR}/../../ + SOURCE ../Basic/Attr.td + TARGET ClangAttrImpl) -set(LLVM_TARGET_DEFINITIONS ../Basic/StmtNodes.td) -tablegen(StmtNodes.inc - -gen-clang-stmt-nodes) -add_custom_target(ClangStmtNodes - DEPENDS StmtNodes.inc) +clang_tablegen(StmtNodes.inc -gen-clang-stmt-nodes + SOURCE ../Basic/StmtNodes.td + TARGET ClangStmtNodes) -set(LLVM_TARGET_DEFINITIONS ../Basic/DeclNodes.td) -tablegen(DeclNodes.inc - -gen-clang-decl-nodes) -add_custom_target(ClangDeclNodes - DEPENDS DeclNodes.inc) +clang_tablegen(DeclNodes.inc -gen-clang-decl-nodes + SOURCE ../Basic/DeclNodes.td + TARGET ClangDeclNodes) diff -Nru clang-2.8/tools/clang/include/clang/AST/CXXInheritance.h clang-2.9/tools/clang/include/clang/AST/CXXInheritance.h --- clang-2.8/tools/clang/include/clang/AST/CXXInheritance.h 2010-05-21 20:29:55.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/AST/CXXInheritance.h 2010-11-24 22:50:27.000000000 +0000 @@ -20,6 +20,7 @@ #include "clang/AST/Type.h" #include "clang/AST/TypeOrdering.h" #include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/SmallSet.h" #include "llvm/ADT/SmallVector.h" #include #include @@ -359,7 +360,11 @@ /// subobjects of that type. class CXXFinalOverriderMap : public llvm::DenseMap { }; - + +/// \brief A set of all the primary bases for a class. +class CXXIndirectPrimaryBaseSet + : public llvm::SmallSet { }; + } // end namespace clang #endif diff -Nru clang-2.8/tools/clang/include/clang/AST/DeclarationName.h clang-2.9/tools/clang/include/clang/AST/DeclarationName.h --- clang-2.8/tools/clang/include/clang/AST/DeclarationName.h 2010-08-11 22:01:17.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/AST/DeclarationName.h 2011-01-12 09:06:06.000000000 +0000 @@ -315,7 +315,7 @@ /// retrieved using its member functions (e.g., /// getCXXConstructorName). class DeclarationNameTable { - ASTContext &Ctx; + const ASTContext &Ctx; void *CXXSpecialNamesImpl; // Actually a FoldingSet * CXXOperatorIdName *CXXOperatorNames; // Operator names void *CXXLiteralOperatorNames; // Actually a CXXOperatorIdName* @@ -324,7 +324,7 @@ DeclarationNameTable& operator=(const DeclarationNameTable&); // NONCOPYABLE public: - DeclarationNameTable(ASTContext &C); + DeclarationNameTable(const ASTContext &C); ~DeclarationNameTable(); /// getIdentifier - Create a declaration name that is a simple @@ -402,7 +402,7 @@ DeclarationNameLoc(DeclarationName Name); // FIXME: this should go away once all DNLocs are properly initialized. - DeclarationNameLoc() { NamedType.TInfo = 0; } + DeclarationNameLoc() { memset((void*) this, 0, sizeof(*this)); } }; // struct DeclarationNameLoc @@ -492,6 +492,10 @@ LocInfo.CXXLiteralOperatorName.OpNameLoc = Loc.getRawEncoding(); } + /// \brief Determine whether this name contains an unexpanded + /// parameter pack. + bool containsUnexpandedParameterPack() const; + /// getAsString - Retrieve the human-readable string for this name. std::string getAsString() const; diff -Nru clang-2.8/tools/clang/include/clang/AST/DeclBase.h clang-2.9/tools/clang/include/clang/AST/DeclBase.h --- clang-2.8/tools/clang/include/clang/AST/DeclBase.h 2010-08-31 20:53:31.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/AST/DeclBase.h 2011-02-22 22:25:23.000000000 +0000 @@ -43,6 +43,7 @@ class CompoundStmt; class StoredDeclsMap; class DependentDiagnostic; +class ASTMutationListener; } namespace llvm { @@ -197,25 +198,25 @@ return DeclCtx.get(); } - /// Loc - The location that this decl. + /// Loc - The location of this decl. SourceLocation Loc; /// DeclKind - This indicates which class this is. - Kind DeclKind : 8; + unsigned DeclKind : 8; /// InvalidDecl - This indicates a semantic error occurred. - unsigned int InvalidDecl : 1; + unsigned InvalidDecl : 1; /// HasAttrs - This indicates whether the decl has attributes or not. - unsigned int HasAttrs : 1; + unsigned HasAttrs : 1; /// Implicit - Whether this declaration was implicitly generated by /// the implementation rather than explicitly written by the user. - bool Implicit : 1; + unsigned Implicit : 1; /// \brief Whether this declaration was "used", meaning that a definition is /// required. - bool Used : 1; + unsigned Used : 1; protected: /// Access - Used by C++ decls for the access specifier. @@ -227,17 +228,24 @@ unsigned PCHLevel : 2; /// ChangedAfterLoad - if this declaration has changed since being loaded - bool ChangedAfterLoad : 1; + unsigned ChangedAfterLoad : 1; /// IdentifierNamespace - This specifies what IDNS_* namespace this lives in. - unsigned IdentifierNamespace : 15; + unsigned IdentifierNamespace : 12; + /// \brief Whether the \c CachedLinkage field is active. + /// + /// This field is only valid for NamedDecls subclasses. + mutable unsigned HasCachedLinkage : 1; + + /// \brief If \c HasCachedLinkage, the linkage of this declaration. + /// + /// This field is only valid for NamedDecls subclasses. + mutable unsigned CachedLinkage : 2; + + private: -#ifndef NDEBUG void CheckAccessDeclContext() const; -#else - void CheckAccessDeclContext() const { } -#endif protected: @@ -246,7 +254,9 @@ Loc(L), DeclKind(DK), InvalidDecl(0), HasAttrs(false), Implicit(false), Used(false), Access(AS_none), PCHLevel(0), ChangedAfterLoad(false), - IdentifierNamespace(getIdentifierNamespaceForKind(DK)) { + IdentifierNamespace(getIdentifierNamespaceForKind(DK)), + HasCachedLinkage(0) + { if (Decl::CollectingStats()) add(DK); } @@ -254,7 +264,9 @@ : NextDeclInContext(0), DeclKind(DK), InvalidDecl(0), HasAttrs(false), Implicit(false), Used(false), Access(AS_none), PCHLevel(0), ChangedAfterLoad(false), - IdentifierNamespace(getIdentifierNamespaceForKind(DK)) { + IdentifierNamespace(getIdentifierNamespaceForKind(DK)), + HasCachedLinkage(0) + { if (Decl::CollectingStats()) add(DK); } @@ -272,7 +284,7 @@ SourceLocation getLocation() const { return Loc; } void setLocation(SourceLocation L) { Loc = L; } - Kind getKind() const { return DeclKind; } + Kind getKind() const { return static_cast(DeclKind); } const char *getDeclKindName() const; Decl *getNextDeclInContext() { return NextDeclInContext; } @@ -287,6 +299,13 @@ return const_cast(this)->getDeclContext(); } + /// Finds the innermost non-closure context of this declaration. + /// That is, walk out the DeclContext chain, skipping any blocks. + DeclContext *getNonClosureContext(); + const DeclContext *getNonClosureContext() const { + return const_cast(this)->getNonClosureContext(); + } + TranslationUnitDecl *getTranslationUnitDecl(); const TranslationUnitDecl *getTranslationUnitDecl() const { return const_cast(this)->getTranslationUnitDecl(); @@ -298,17 +317,21 @@ void setAccess(AccessSpecifier AS) { Access = AS; +#ifndef NDEBUG CheckAccessDeclContext(); +#endif } AccessSpecifier getAccess() const { +#ifndef NDEBUG CheckAccessDeclContext(); +#endif return AccessSpecifier(Access); } bool hasAttrs() const { return HasAttrs; } void setAttrs(const AttrVec& Attrs); - AttrVec& getAttrs() { + AttrVec &getAttrs() { return const_cast(const_cast(this)->getAttrs()); } const AttrVec &getAttrs() const; @@ -551,6 +574,9 @@ /// template parameter pack. bool isTemplateParameterPack() const; + /// \brief Whether this declaration is a parameter pack. + bool isParameterPack() const; + /// \brief Whether this declaration is a function or function template. bool isFunctionOrFunctionTemplate() const; @@ -621,10 +647,14 @@ llvm::raw_ostream &Out, const PrintingPolicy &Policy, unsigned Indentation = 0); void dump() const; + void dumpXML() const; + void dumpXML(llvm::raw_ostream &OS) const; private: const Attr *getAttrsImpl() const; +protected: + ASTMutationListener *getASTMutationListener() const; }; /// PrettyStackTraceDecl - If a crash occurs, indicate that it happened when @@ -681,23 +711,24 @@ /// class DeclContext { /// DeclKind - This indicates which class this is. - Decl::Kind DeclKind : 8; + unsigned DeclKind : 8; /// \brief Whether this declaration context also has some external /// storage that contains additional declarations that are lexically /// part of this context. - mutable bool ExternalLexicalStorage : 1; + mutable unsigned ExternalLexicalStorage : 1; /// \brief Whether this declaration context also has some external /// storage that contains additional declarations that are visible /// in this context. - mutable bool ExternalVisibleStorage : 1; + mutable unsigned ExternalVisibleStorage : 1; /// \brief Pointer to the data structure used to lookup declarations /// within this context (or a DependentStoredDeclsMap if this is a /// dependent context). mutable StoredDeclsMap *LookupPtr; +protected: /// FirstDecl - The first declaration stored within this declaration /// context. mutable Decl *FirstDecl; @@ -710,7 +741,12 @@ friend class ExternalASTSource; -protected: + /// \brief Build up a chain of declarations. + /// + /// \returns the first/last pair of declarations. + static std::pair + BuildDeclChain(const llvm::SmallVectorImpl &Decls); + DeclContext(Decl::Kind K) : DeclKind(K), ExternalLexicalStorage(false), ExternalVisibleStorage(false), LookupPtr(0), FirstDecl(0), @@ -720,7 +756,7 @@ ~DeclContext(); Decl::Kind getDeclKind() const { - return DeclKind; + return static_cast(DeclKind); } const char *getDeclKindName() const; @@ -758,6 +794,10 @@ return cast(this)->getASTContext(); } + bool isClosure() const { + return DeclKind == Decl::Block; + } + bool isFunctionOrMethod() const { switch (DeclKind) { case Decl::Block: @@ -807,6 +847,10 @@ /// C++0x scoped enums), and C++ linkage specifications. bool isTransparentContext() const; + /// \brief Determines whether this context is, or is nested within, + /// a C++ extern "C" linkage spec. + bool isExternCContext() const; + /// \brief Determine whether this declaration context is equivalent /// to the declaration context DC. bool Equals(const DeclContext *DC) const { diff -Nru clang-2.8/tools/clang/include/clang/AST/DeclCXX.h clang-2.9/tools/clang/include/clang/AST/DeclCXX.h --- clang-2.8/tools/clang/include/clang/AST/DeclCXX.h 2010-09-01 19:52:22.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/AST/DeclCXX.h 2011-03-06 16:09:14.000000000 +0000 @@ -35,6 +35,7 @@ class CXXRecordDecl; class CXXMemberLookupCriteria; class CXXFinalOverriderMap; +class CXXIndirectPrimaryBaseSet; class FriendDecl; /// \brief Represents any kind of function declaration, whether it is a @@ -112,6 +113,8 @@ : Decl(AccessSpec, DC, ASLoc), ColonLoc(ColonLoc) { setAccess(AS); } + AccessSpecDecl(EmptyShell Empty) + : Decl(AccessSpec, Empty) { } public: /// getAccessSpecifierLoc - The location of the access specifier. SourceLocation getAccessSpecifierLoc() const { return getLocation(); } @@ -132,6 +135,9 @@ SourceLocation ColonLoc) { return new (C) AccessSpecDecl(AS, DC, ASLoc, ColonLoc); } + static AccessSpecDecl *Create(ASTContext &C, EmptyShell Empty) { + return new (C) AccessSpecDecl(Empty); + } // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } @@ -162,6 +168,10 @@ /// specifier (if present). SourceRange Range; + /// \brief The source location of the ellipsis, if this is a pack + /// expansion. + SourceLocation EllipsisLoc; + /// Virtual - Whether this is a virtual base class or not. bool Virtual : 1; @@ -177,6 +187,10 @@ /// VC++ bug. unsigned Access : 2; + /// InheritConstructors - Whether the class contains a using declaration + /// to inherit the named class's constructors. + bool InheritConstructors : 1; + /// BaseTypeInfo - The type of the base class. This will be a class or struct /// (or a typedef of such). The source code range does not include the /// "virtual" or access specifier. @@ -186,8 +200,9 @@ CXXBaseSpecifier() { } CXXBaseSpecifier(SourceRange R, bool V, bool BC, AccessSpecifier A, - TypeSourceInfo *TInfo) - : Range(R), Virtual(V), BaseOfClass(BC), Access(A), BaseTypeInfo(TInfo) { } + TypeSourceInfo *TInfo, SourceLocation EllipsisLoc) + : Range(R), EllipsisLoc(EllipsisLoc), Virtual(V), BaseOfClass(BC), + Access(A), InheritConstructors(false), BaseTypeInfo(TInfo) { } /// getSourceRange - Retrieves the source range that contains the /// entire base specifier. @@ -201,6 +216,22 @@ /// with the 'class' keyword (vs. one declared with the 'struct' keyword). bool isBaseOfClass() const { return BaseOfClass; } + /// \brief Determine whether this base specifier is a pack expansion. + bool isPackExpansion() const { return EllipsisLoc.isValid(); } + + /// \brief Determine whether this base class's constructors get inherited. + bool getInheritConstructors() const { return InheritConstructors; } + + /// \brief Set that this base class's constructors should be inherited. + void setInheritConstructors(bool Inherit = true) { + InheritConstructors = Inherit; + } + + /// \brief For a pack expansion, determine the location of the ellipsis. + SourceLocation getEllipsisLoc() const { + return EllipsisLoc; + } + /// getAccessSpecifier - Returns the access specifier for this base /// specifier. This is the actual base specifier as used for /// semantic analysis, so the result can never be AS_none. To @@ -336,20 +367,20 @@ /// \brief Whether we have already declared a destructor within the class. bool DeclaredDestructor : 1; - - /// Bases - Base classes of this class. - /// FIXME: This is wasted space for a union. - CXXBaseSpecifier *Bases; /// NumBases - The number of base class specifiers in Bases. unsigned NumBases; - - /// VBases - direct and indirect virtual base classes of this class. - CXXBaseSpecifier *VBases; - + /// NumVBases - The number of virtual base class specifiers in VBases. unsigned NumVBases; + /// Bases - Base classes of this class. + /// FIXME: This is wasted space for a union. + LazyCXXBaseSpecifiersPtr Bases; + + /// VBases - direct and indirect virtual base classes of this class. + LazyCXXBaseSpecifiersPtr VBases; + /// Conversions - Overload set containing the conversion functions /// of this C++ class (but not its inherited conversion /// functions). Each of the entries in this overload set is a @@ -371,6 +402,15 @@ /// in reverse order. FriendDecl *FirstFriend; + /// \brief Retrieve the set of direct base classes. + CXXBaseSpecifier *getBases() const { + return Bases.get(Definition->getASTContext().getExternalSource()); + } + + /// \brief Retrieve the set of virtual base classes. + CXXBaseSpecifier *getVBases() const { + return VBases.get(Definition->getASTContext().getExternalSource()); + } } *DefinitionData; struct DefinitionData &data() { @@ -395,15 +435,23 @@ llvm::PointerUnion TemplateOrInstantiation; -#ifndef NDEBUG - void CheckConversionFunction(NamedDecl *D); -#endif + friend class DeclContext; + + /// \brief Notify the class that member has been added. + /// + /// This routine helps maintain information about the class based on which + /// members have been added. It will be invoked by DeclContext::addDecl() + /// whenever a member is added to this record. + void addedMember(Decl *D); + + void markedVirtualFunctionPure(); + friend void FunctionDecl::setPure(bool); protected: CXXRecordDecl(Kind K, TagKind TK, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, CXXRecordDecl *PrevDecl, - SourceLocation TKL = SourceLocation()); + SourceLocation StartL = SourceLocation()); public: /// base_class_iterator - Iterator that traverses the base classes @@ -445,12 +493,12 @@ bool hasDefinition() const { return DefinitionData != 0; } - static CXXRecordDecl *Create(ASTContext &C, TagKind TK, DeclContext *DC, + static CXXRecordDecl *Create(const ASTContext &C, TagKind TK, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, - SourceLocation TKL = SourceLocation(), + SourceLocation StartL = SourceLocation(), CXXRecordDecl* PrevDecl=0, bool DelayTypeCreation = false); - static CXXRecordDecl *Create(ASTContext &C, EmptyShell Empty); + static CXXRecordDecl *Create(const ASTContext &C, EmptyShell Empty); bool isDynamicClass() const { return data().Polymorphic || data().NumVBases != 0; @@ -463,8 +511,8 @@ /// class. unsigned getNumBases() const { return data().NumBases; } - base_class_iterator bases_begin() { return data().Bases; } - base_class_const_iterator bases_begin() const { return data().Bases; } + base_class_iterator bases_begin() { return data().getBases(); } + base_class_const_iterator bases_begin() const { return data().getBases(); } base_class_iterator bases_end() { return bases_begin() + data().NumBases; } base_class_const_iterator bases_end() const { return bases_begin() + data().NumBases; @@ -486,8 +534,8 @@ /// class. unsigned getNumVBases() const { return data().NumVBases; } - base_class_iterator vbases_begin() { return data().VBases; } - base_class_const_iterator vbases_begin() const { return data().VBases; } + base_class_iterator vbases_begin() { return data().getVBases(); } + base_class_const_iterator vbases_begin() const { return data().getVBases(); } base_class_iterator vbases_end() { return vbases_begin() + data().NumVBases; } base_class_const_iterator vbases_end() const { return vbases_begin() + data().NumVBases; @@ -553,18 +601,12 @@ return data().DeclaredDefaultConstructor; } - /// \brief Note whether this class has already had its default constructor - /// implicitly declared or doesn't need one. - void setDeclaredDefaultConstructor(bool DDC) { - data().DeclaredDefaultConstructor = DDC; - } - /// hasConstCopyConstructor - Determines whether this class has a /// copy constructor that accepts a const-qualified argument. - bool hasConstCopyConstructor(ASTContext &Context) const; + bool hasConstCopyConstructor(const ASTContext &Context) const; /// getCopyConstructor - Returns the copy constructor for this class - CXXConstructorDecl *getCopyConstructor(ASTContext &Context, + CXXConstructorDecl *getCopyConstructor(const ASTContext &Context, unsigned TypeQuals) const; /// \brief Retrieve the copy-assignment operator for this class, if available. @@ -579,11 +621,6 @@ /// a unique copy-assignment operator could not be found. CXXMethodDecl *getCopyAssignmentOperator(bool ArgIsConst) const; - /// addedConstructor - Notify the class that another constructor has - /// been added. This routine helps maintain information about the - /// class based on which constructors have been added. - void addedConstructor(ASTContext &Context, CXXConstructorDecl *ConDecl); - /// hasUserDeclaredConstructor - Whether this class has any /// user-declared constructors. When true, a default constructor /// will not be implicitly declared. @@ -606,17 +643,6 @@ return data().DeclaredCopyConstructor; } - /// \brief Note whether this class has already had its copy constructor - /// declared. - void setDeclaredCopyConstructor(bool DCC) { - data().DeclaredCopyConstructor = DCC; - } - - /// addedAssignmentOperator - Notify the class that another assignment - /// operator has been added. This routine helps maintain information about the - /// class based on which operators have been added. - void addedAssignmentOperator(ASTContext &Context, CXXMethodDecl *OpDecl); - /// hasUserDeclaredCopyAssignment - Whether this class has a /// user-declared copy assignment operator. When false, a copy /// assigment operator will be implicitly declared. @@ -632,12 +658,6 @@ return data().DeclaredCopyAssignment; } - /// \brief Note whether this class has already had its copy assignment - /// operator declared. - void setDeclaredCopyAssignment(bool DCA) { - data().DeclaredCopyAssignment = DCA; - } - /// hasUserDeclaredDestructor - Whether this class has a /// user-declared destructor. When false, a destructor will be /// implicitly declared. @@ -645,26 +665,12 @@ return data().UserDeclaredDestructor; } - /// setUserDeclaredDestructor - Set whether this class has a - /// user-declared destructor. If not set by the time the class is - /// fully defined, a destructor will be implicitly declared. - void setUserDeclaredDestructor(bool UCD) { - data().UserDeclaredDestructor = UCD; - if (UCD) - data().DeclaredDestructor = true; - } - /// \brief Determine whether this class has had its destructor declared, /// either via the user or via an implicit declaration. /// /// This value is used for lazy creation of destructors. bool hasDeclaredDestructor() const { return data().DeclaredDestructor; } - - /// \brief Note whether this class has already had its destructor declared. - void setDeclaredDestructor(bool DD) { - data().DeclaredDestructor = DD; - } - + /// getConversions - Retrieve the overload set containing all of the /// conversion functions in this class. UnresolvedSetImpl *getConversionFunctions() { @@ -682,13 +688,6 @@ return getConversionFunctions()->end(); } - /// Replaces a conversion function with a new declaration. - /// - /// Returns true if the old conversion was found. - bool replaceConversion(const NamedDecl* Old, NamedDecl *New) { - return getConversionFunctions()->replace(Old, New); - } - /// Removes a conversion function from this class. The conversion /// function must currently be a member of this class. Furthermore, /// this class must currently be in the process of being defined. @@ -698,105 +697,52 @@ /// in current class; including conversion function templates. const UnresolvedSetImpl *getVisibleConversionFunctions(); - /// addConversionFunction - Registers a conversion function which - /// this class declares directly. - void addConversionFunction(NamedDecl *Decl) { -#ifndef NDEBUG - CheckConversionFunction(Decl); -#endif - - // We intentionally don't use the decl's access here because it - // hasn't been set yet. That's really just a misdesign in Sema. - data().Conversions.addDecl(Decl); - } - /// isAggregate - Whether this class is an aggregate (C++ /// [dcl.init.aggr]), which is a class with no user-declared /// constructors, no private or protected non-static data members, /// no base classes, and no virtual functions (C++ [dcl.init.aggr]p1). bool isAggregate() const { return data().Aggregate; } - /// setAggregate - Set whether this class is an aggregate (C++ - /// [dcl.init.aggr]). - void setAggregate(bool Agg) { data().Aggregate = Agg; } - - /// setMethodAsVirtual - Make input method virtual and set the necesssary - /// special function bits and other bits accordingly. - void setMethodAsVirtual(FunctionDecl *Method); - /// isPOD - Whether this class is a POD-type (C++ [class]p4), which is a class /// that is an aggregate that has no non-static non-POD data members, no /// reference data members, no user-defined copy assignment operator and no /// user-defined destructor. bool isPOD() const { return data().PlainOldData; } - /// setPOD - Set whether this class is a POD-type (C++ [class]p4). - void setPOD(bool POD) { data().PlainOldData = POD; } - /// isEmpty - Whether this class is empty (C++0x [meta.unary.prop]), which /// means it has a virtual function, virtual base, data member (other than /// 0-width bit-field) or inherits from a non-empty class. Does NOT include /// a check for union-ness. bool isEmpty() const { return data().Empty; } - /// Set whether this class is empty (C++0x [meta.unary.prop]) - void setEmpty(bool Emp) { data().Empty = Emp; } - /// isPolymorphic - Whether this class is polymorphic (C++ [class.virtual]), /// which means that the class contains or inherits a virtual function. bool isPolymorphic() const { return data().Polymorphic; } - /// setPolymorphic - Set whether this class is polymorphic (C++ - /// [class.virtual]). - void setPolymorphic(bool Poly) { data().Polymorphic = Poly; } - /// isAbstract - Whether this class is abstract (C++ [class.abstract]), /// which means that the class contains or inherits a pure virtual function. bool isAbstract() const { return data().Abstract; } - /// setAbstract - Set whether this class is abstract (C++ [class.abstract]) - void setAbstract(bool Abs) { data().Abstract = Abs; } - // hasTrivialConstructor - Whether this class has a trivial constructor // (C++ [class.ctor]p5) bool hasTrivialConstructor() const { return data().HasTrivialConstructor; } - // setHasTrivialConstructor - Set whether this class has a trivial constructor - // (C++ [class.ctor]p5) - void setHasTrivialConstructor(bool TC) { data().HasTrivialConstructor = TC; } - // hasTrivialCopyConstructor - Whether this class has a trivial copy // constructor (C++ [class.copy]p6) bool hasTrivialCopyConstructor() const { return data().HasTrivialCopyConstructor; } - // setHasTrivialCopyConstructor - Set whether this class has a trivial - // copy constructor (C++ [class.copy]p6) - void setHasTrivialCopyConstructor(bool TC) { - data().HasTrivialCopyConstructor = TC; - } - // hasTrivialCopyAssignment - Whether this class has a trivial copy // assignment operator (C++ [class.copy]p11) bool hasTrivialCopyAssignment() const { return data().HasTrivialCopyAssignment; } - // setHasTrivialCopyAssignment - Set whether this class has a - // trivial copy assignment operator (C++ [class.copy]p11) - void setHasTrivialCopyAssignment(bool TC) { - data().HasTrivialCopyAssignment = TC; - } - // hasTrivialDestructor - Whether this class has a trivial destructor // (C++ [class.dtor]p3) bool hasTrivialDestructor() const { return data().HasTrivialDestructor; } - // setHasTrivialDestructor - Set whether this class has a trivial destructor - // (C++ [class.dtor]p3) - void setHasTrivialDestructor(bool TC) { data().HasTrivialDestructor = TC; } - /// \brief If this record is an instantiation of a member class, /// retrieves the member class from which it was instantiated. /// @@ -854,9 +800,6 @@ /// \brief Set the kind of specialization or template instantiation this is. void setTemplateSpecializationKind(TemplateSpecializationKind TSK); - - /// getDefaultConstructor - Returns the default constructor for this class - CXXConstructorDecl *getDefaultConstructor(); /// getDestructor - Returns the destructor decl for this class. CXXDestructorDecl *getDestructor() const; @@ -880,7 +823,7 @@ /// \param Base the base class we are searching for. /// /// \returns true if this class is derived from Base, false otherwise. - bool isDerivedFrom(CXXRecordDecl *Base) const; + bool isDerivedFrom(const CXXRecordDecl *Base) const; /// \brief Determine whether this class is derived from the type \p Base. /// @@ -898,7 +841,7 @@ /// /// \todo add a separate paramaeter to configure IsDerivedFrom, rather than /// tangling input and output in \p Paths - bool isDerivedFrom(CXXRecordDecl *Base, CXXBasePaths &Paths) const; + bool isDerivedFrom(const CXXRecordDecl *Base, CXXBasePaths &Paths) const; /// \brief Determine whether this class is virtually derived from /// the class \p Base. @@ -1034,6 +977,9 @@ /// most-derived class in the class hierarchy. void getFinalOverriders(CXXFinalOverriderMap &FinaOverriders) const; + /// \brief Get the indirect primary bases for this class. + void getIndirectPrimaryBases(CXXIndirectPrimaryBaseSet& Bases) const; + /// viewInheritance - Renders and displays an inheritance diagram /// for this C++ class and all of its base classes (transitively) using /// GraphViz. @@ -1048,6 +994,27 @@ return (PathAccess > DeclAccess ? PathAccess : DeclAccess); } + /// \brief Indicates that the definition of this class is now complete. + virtual void completeDefinition(); + + /// \brief Indicates that the definition of this class is now complete, + /// and provides a final overrider map to help determine + /// + /// \param FinalOverriders The final overrider map for this class, which can + /// be provided as an optimization for abstract-class checking. If NULL, + /// final overriders will be computed if they are needed to complete the + /// definition. + void completeDefinition(CXXFinalOverriderMap *FinalOverriders); + + /// \brief Determine whether this class may end up being abstract, even though + /// it is not yet known to be abstract. + /// + /// \returns true if this class is not known to be abstract but has any + /// base classes that are abstract. In this case, \c completeDefinition() + /// will need to compute final overriders to determine whether the class is + /// actually abstract. + bool mayBeAbstract() const; + static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classofKind(Kind K) { return K >= firstCXXRecord && K <= lastCXXRecord; @@ -1059,6 +1026,8 @@ friend class ASTDeclReader; friend class ASTDeclWriter; + friend class ASTReader; + friend class ASTWriter; }; /// CXXMethodDecl - Represents a static or instance method of a @@ -1139,6 +1108,20 @@ return getType()->getAs()->getTypeQuals(); } + /// \brief Retrieve the ref-qualifier associated with this method. + /// + /// In the following example, \c f() has an lvalue ref-qualifier, \c g() + /// has an rvalue ref-qualifier, and \c h() has no ref-qualifier. + /// \code + /// struct X { + /// void f() &; + /// void g() &&; + /// void h(); + /// }; + RefQualifierKind getRefQualifier() const { + return getType()->getAs()->getRefQualifier(); + } + bool hasInlineBody() const; // Implement isa/cast/dyncast/etc. @@ -1149,7 +1132,7 @@ } }; -/// CXXBaseOrMemberInitializer - Represents a C++ base or member +/// CXXCtorInitializer - Represents a C++ base or member /// initializer, which is part of a constructor initializer that /// initializes one non-static member variable or one base class. For /// example, in the following, both 'A(a)' and 'f(3.14159)' are member @@ -1163,37 +1146,23 @@ /// B(A& a) : A(a), f(3.14159) { } /// }; /// @endcode -class CXXBaseOrMemberInitializer { - /// \brief Either the base class name (stored as a TypeSourceInfo*) or the - /// field being initialized. - llvm::PointerUnion BaseOrMember; - - /// \brief The source location for the field name. - SourceLocation MemberLocation; +class CXXCtorInitializer { + /// \brief Either the base class name (stored as a TypeSourceInfo*), an normal + /// field (FieldDecl), anonymous field (IndirectFieldDecl*), or target + /// constructor (CXXConstructorDecl*) being initialized. + llvm::PointerUnion4 + Initializee; + + /// \brief The source location for the field name or, for a base initializer + /// pack expansion, the location of the ellipsis. In the case of a delegating + /// constructor, it will still include the type's source location as the + /// Initializee points to the CXXConstructorDecl (to allow loop detection). + SourceLocation MemberOrEllipsisLocation; /// \brief The argument used to initialize the base or member, which may /// end up constructing an object (when multiple arguments are involved). Stmt *Init; - - /// \brief Stores either the constructor to call to initialize this base or - /// member (a CXXConstructorDecl pointer), or stores the anonymous union of - /// which the initialized value is a member. - /// - /// When the value is a FieldDecl pointer, 'BaseOrMember' is class's - /// anonymous union data member, this field holds the FieldDecl for the - /// member of the anonymous union being initialized. - /// @code - /// struct X { - /// X() : au_i1(123) {} - /// union { - /// int au_i1; - /// float au_f1; - /// }; - /// }; - /// @endcode - /// In above example, BaseOrMember holds the field decl. for anonymous union - /// and AnonUnionMember holds field decl for au_i1. - FieldDecl *AnonUnionMember; /// LParenLoc - Location of the left paren of the ctor-initializer. SourceLocation LParenLoc; @@ -1208,6 +1177,7 @@ /// IsWritten - Whether or not the initializer is explicitly written /// in the sources. bool IsWritten : 1; + /// SourceOrderOrNumArrayIndices - If IsWritten is true, then this /// number keeps track of the textual order of this initializer in the /// original sources, counting from 0; otherwise, if IsWritten is false, @@ -1215,50 +1185,74 @@ /// object in memory. unsigned SourceOrderOrNumArrayIndices : 14; - CXXBaseOrMemberInitializer(ASTContext &Context, - FieldDecl *Member, SourceLocation MemberLoc, - SourceLocation L, - Expr *Init, - SourceLocation R, - VarDecl **Indices, - unsigned NumIndices); + CXXCtorInitializer(ASTContext &Context, FieldDecl *Member, + SourceLocation MemberLoc, SourceLocation L, Expr *Init, + SourceLocation R, VarDecl **Indices, unsigned NumIndices); public: - /// CXXBaseOrMemberInitializer - Creates a new base-class initializer. + /// CXXCtorInitializer - Creates a new base-class initializer. + explicit + CXXCtorInitializer(ASTContext &Context, TypeSourceInfo *TInfo, bool IsVirtual, + SourceLocation L, Expr *Init, SourceLocation R, + SourceLocation EllipsisLoc); + + /// CXXCtorInitializer - Creates a new member initializer. + explicit + CXXCtorInitializer(ASTContext &Context, FieldDecl *Member, + SourceLocation MemberLoc, SourceLocation L, Expr *Init, + SourceLocation R); + + /// CXXCtorInitializer - Creates a new anonymous field initializer. explicit - CXXBaseOrMemberInitializer(ASTContext &Context, - TypeSourceInfo *TInfo, bool IsVirtual, - SourceLocation L, - Expr *Init, - SourceLocation R); + CXXCtorInitializer(ASTContext &Context, IndirectFieldDecl *Member, + SourceLocation MemberLoc, SourceLocation L, Expr *Init, + SourceLocation R); - /// CXXBaseOrMemberInitializer - Creates a new member initializer. + /// CXXCtorInitializer - Creates a new delegating Initializer. explicit - CXXBaseOrMemberInitializer(ASTContext &Context, - FieldDecl *Member, SourceLocation MemberLoc, - SourceLocation L, - Expr *Init, - SourceLocation R); + CXXCtorInitializer(ASTContext &Context, SourceLocation D, SourceLocation L, + CXXConstructorDecl *Target, Expr *Init, SourceLocation R); /// \brief Creates a new member initializer that optionally contains /// array indices used to describe an elementwise initialization. - static CXXBaseOrMemberInitializer *Create(ASTContext &Context, - FieldDecl *Member, - SourceLocation MemberLoc, - SourceLocation L, - Expr *Init, - SourceLocation R, - VarDecl **Indices, - unsigned NumIndices); + static CXXCtorInitializer *Create(ASTContext &Context, FieldDecl *Member, + SourceLocation MemberLoc, SourceLocation L, + Expr *Init, SourceLocation R, + VarDecl **Indices, unsigned NumIndices); /// isBaseInitializer - Returns true when this initializer is /// initializing a base class. - bool isBaseInitializer() const { return BaseOrMember.is(); } + bool isBaseInitializer() const { return Initializee.is(); } /// isMemberInitializer - Returns true when this initializer is /// initializing a non-static data member. - bool isMemberInitializer() const { return BaseOrMember.is(); } + bool isMemberInitializer() const { return Initializee.is(); } + + bool isAnyMemberInitializer() const { + return isMemberInitializer() || isIndirectMemberInitializer(); + } + + bool isIndirectMemberInitializer() const { + return Initializee.is(); + } + + /// isDelegatingInitializer - Returns true when this initializer is creating + /// a delegating constructor. + bool isDelegatingInitializer() const { + return Initializee.is(); + } + /// \brief Determine whether this initializer is a pack expansion. + bool isPackExpansion() const { + return isBaseInitializer() && MemberOrEllipsisLocation.isValid(); + } + + // \brief For a pack expansion, returns the location of the ellipsis. + SourceLocation getEllipsisLoc() const { + assert(isPackExpansion() && "Initializer is not a pack expansion"); + return MemberOrEllipsisLocation; + } + /// If this is a base class initializer, returns the type of the /// base class with location information. Otherwise, returns an NULL /// type location. @@ -1267,7 +1261,6 @@ /// If this is a base class initializer, returns the type of the base class. /// Otherwise, returns NULL. const Type *getBaseClass() const; - Type *getBaseClass(); /// Returns whether the base is virtual or not. bool isBaseVirtual() const { @@ -1278,7 +1271,7 @@ /// \brief Returns the declarator information for a base class initializer. TypeSourceInfo *getBaseClassInfo() const { - return BaseOrMember.dyn_cast(); + return Initializee.dyn_cast(); } /// getMember - If this is a member initializer, returns the @@ -1286,18 +1279,35 @@ /// initialized. Otherwise, returns NULL. FieldDecl *getMember() const { if (isMemberInitializer()) - return BaseOrMember.get(); + return Initializee.get(); + else + return 0; + } + FieldDecl *getAnyMember() const { + if (isMemberInitializer()) + return Initializee.get(); + else if (isIndirectMemberInitializer()) + return Initializee.get()->getAnonField(); else return 0; } - SourceLocation getMemberLocation() const { - return MemberLocation; + IndirectFieldDecl *getIndirectMember() const { + if (isIndirectMemberInitializer()) + return Initializee.get(); + else + return 0; } - void setMember(FieldDecl *Member) { - assert(isMemberInitializer()); - BaseOrMember = Member; + CXXConstructorDecl *getTargetConstructor() const { + if (isDelegatingInitializer()) + return Initializee.get(); + else + return 0; + } + + SourceLocation getMemberLocation() const { + return MemberOrEllipsisLocation; } /// \brief Determine the source location of the initializer. @@ -1329,15 +1339,7 @@ IsWritten = true; SourceOrderOrNumArrayIndices = static_cast(pos); } - - FieldDecl *getAnonUnionMember() const { - return AnonUnionMember; - } - void setAnonUnionMember(FieldDecl *anonMember) { - AnonUnionMember = anonMember; - } - SourceLocation getLParenLoc() const { return LParenLoc; } SourceLocation getRParenLoc() const { return RParenLoc; } @@ -1388,10 +1390,10 @@ bool ImplicitlyDefined : 1; /// Support for base and member initializers. - /// BaseOrMemberInitializers - The arguments used to initialize the base + /// CtorInitializers - The arguments used to initialize the base /// or member. - CXXBaseOrMemberInitializer **BaseOrMemberInitializers; - unsigned NumBaseOrMemberInitializers; + CXXCtorInitializer **CtorInitializers; + unsigned NumCtorInitializers; CXXConstructorDecl(CXXRecordDecl *RD, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, @@ -1400,7 +1402,7 @@ : CXXMethodDecl(CXXConstructor, RD, NameInfo, T, TInfo, false, SC_None, isInline), IsExplicitSpecified(isExplicitSpecified), ImplicitlyDefined(false), - BaseOrMemberInitializers(0), NumBaseOrMemberInitializers(0) { + CtorInitializers(0), NumCtorInitializers(0) { setImplicit(isImplicitlyDeclared); } @@ -1443,37 +1445,54 @@ } /// init_iterator - Iterates through the member/base initializer list. - typedef CXXBaseOrMemberInitializer **init_iterator; + typedef CXXCtorInitializer **init_iterator; /// init_const_iterator - Iterates through the memberbase initializer list. - typedef CXXBaseOrMemberInitializer * const * init_const_iterator; + typedef CXXCtorInitializer * const * init_const_iterator; /// init_begin() - Retrieve an iterator to the first initializer. - init_iterator init_begin() { return BaseOrMemberInitializers; } + init_iterator init_begin() { return CtorInitializers; } /// begin() - Retrieve an iterator to the first initializer. - init_const_iterator init_begin() const { return BaseOrMemberInitializers; } + init_const_iterator init_begin() const { return CtorInitializers; } /// init_end() - Retrieve an iterator past the last initializer. init_iterator init_end() { - return BaseOrMemberInitializers + NumBaseOrMemberInitializers; + return CtorInitializers + NumCtorInitializers; } /// end() - Retrieve an iterator past the last initializer. init_const_iterator init_end() const { - return BaseOrMemberInitializers + NumBaseOrMemberInitializers; + return CtorInitializers + NumCtorInitializers; + } + + typedef std::reverse_iterator init_reverse_iterator; + typedef std::reverse_iterator init_const_reverse_iterator; + + init_reverse_iterator init_rbegin() { + return init_reverse_iterator(init_end()); + } + init_const_reverse_iterator init_rbegin() const { + return init_const_reverse_iterator(init_end()); + } + + init_reverse_iterator init_rend() { + return init_reverse_iterator(init_begin()); + } + init_const_reverse_iterator init_rend() const { + return init_const_reverse_iterator(init_begin()); } /// getNumArgs - Determine the number of arguments used to /// initialize the member or base. - unsigned getNumBaseOrMemberInitializers() const { - return NumBaseOrMemberInitializers; + unsigned getNumCtorInitializers() const { + return NumCtorInitializers; } - void setNumBaseOrMemberInitializers(unsigned numBaseOrMemberInitializers) { - NumBaseOrMemberInitializers = numBaseOrMemberInitializers; + void setNumCtorInitializers(unsigned numCtorInitializers) { + NumCtorInitializers = numCtorInitializers; } - void setBaseOrMemberInitializers(CXXBaseOrMemberInitializer ** initializers) { - BaseOrMemberInitializers = initializers; + void setCtorInitializers(CXXCtorInitializer ** initializers) { + CtorInitializers = initializers; } /// isDefaultConstructor - Whether this constructor is a default /// constructor (C++ [class.ctor]p5), which can be used to @@ -1502,15 +1521,44 @@ return isCopyConstructor(TypeQuals); } + /// \brief Determine whether this constructor is a move constructor + /// (C++0x [class.copy]p3), which can be used to move values of the class. + /// + /// \param TypeQuals If this constructor is a move constructor, will be set + /// to the type qualifiers on the referent of the first parameter's type. + bool isMoveConstructor(unsigned &TypeQuals) const; + + /// \brief Determine whether this constructor is a move constructor + /// (C++0x [class.copy]p3), which can be used to move values of the class. + bool isMoveConstructor() const; + + /// \brief Determine whether this is a copy or move constructor. + /// + /// \param TypeQuals Will be set to the type qualifiers on the reference + /// parameter, if in fact this is a copy or move constructor. + bool isCopyOrMoveConstructor(unsigned &TypeQuals) const; + + /// \brief Determine whether this a copy or move constructor. + bool isCopyOrMoveConstructor() const { + unsigned Quals; + return isCopyOrMoveConstructor(Quals); + } + /// isConvertingConstructor - Whether this constructor is a /// converting constructor (C++ [class.conv.ctor]), which can be /// used for user-defined conversions. bool isConvertingConstructor(bool AllowExplicit) const; /// \brief Determine whether this is a member template specialization that - /// looks like a copy constructor. Such constructors are never used to copy + /// would copy the object to itself. Such constructors are never used to copy /// an object. - bool isCopyConstructorLikeSpecialization() const; + bool isSpecializationCopyingObject() const; + + /// \brief Get the constructor that this inheriting constructor is based on. + const CXXConstructorDecl *getInheritedConstructor() const; + + /// \brief Set the constructor that this inheriting constructor is based on. + void setInheritedConstructor(const CXXConstructorDecl *BaseCtor); // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } @@ -1542,8 +1590,9 @@ FunctionDecl *OperatorDelete; CXXDestructorDecl(CXXRecordDecl *RD, const DeclarationNameInfo &NameInfo, - QualType T, bool isInline, bool isImplicitlyDeclared) - : CXXMethodDecl(CXXDestructor, RD, NameInfo, T, /*TInfo=*/0, false, + QualType T, TypeSourceInfo *TInfo, + bool isInline, bool isImplicitlyDeclared) + : CXXMethodDecl(CXXDestructor, RD, NameInfo, T, TInfo, false, SC_None, isInline), ImplicitlyDefined(false), OperatorDelete(0) { setImplicit(isImplicitlyDeclared); @@ -1553,7 +1602,8 @@ static CXXDestructorDecl *Create(ASTContext& C, EmptyShell Empty); static CXXDestructorDecl *Create(ASTContext &C, CXXRecordDecl *RD, const DeclarationNameInfo &NameInfo, - QualType T, bool isInline, + QualType T, TypeSourceInfo* TInfo, + bool isInline, bool isImplicitlyDeclared); /// isImplicitlyDefined - Whether this destructor was implicitly @@ -1661,18 +1711,18 @@ /// Language - The language for this linkage specification. LanguageIDs Language; - /// HadBraces - Whether this linkage specification had curly braces or not. - bool HadBraces : 1; + /// RBraceLoc - The source location for the right brace (if valid). + SourceLocation RBraceLoc; LinkageSpecDecl(DeclContext *DC, SourceLocation L, LanguageIDs lang, - bool Braces) - : Decl(LinkageSpec, DC, L), - DeclContext(LinkageSpec), Language(lang), HadBraces(Braces) { } + SourceLocation RBLoc) + : Decl(LinkageSpec, DC, L), DeclContext(LinkageSpec), + Language(lang), RBraceLoc(RBLoc) { } public: static LinkageSpecDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L, LanguageIDs Lang, - bool Braces); + SourceLocation RBraceLoc = SourceLocation()); /// \brief Return the language specified by this linkage specification. LanguageIDs getLanguage() const { return Language; } @@ -1682,11 +1732,21 @@ /// \brief Determines whether this linkage specification had braces in /// its syntactic form. - bool hasBraces() const { return HadBraces; } + bool hasBraces() const { return RBraceLoc.isValid(); } + SourceLocation getRBraceLoc() const { return RBraceLoc; } + void setRBraceLoc(SourceLocation L) { RBraceLoc = L; } + + SourceLocation getLocEnd() const { + if (hasBraces()) + return getRBraceLoc(); + // No braces: get the end location of the (only) declaration in context + // (if present). + return decls_empty() ? getLocation() : decls_begin()->getLocEnd(); + } - /// \brief Set whether this linkage specification has braces in its - /// syntactic form. - void setHasBraces(bool B) { HadBraces = B; } + SourceRange getSourceRange() const { + return SourceRange(getLocation(), getLocEnd()); + } static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const LinkageSpecDecl *D) { return true; } @@ -1713,13 +1773,8 @@ /// SourceLocation - Location of 'namespace' token. SourceLocation NamespaceLoc; - /// \brief The source range that covers the nested-name-specifier - /// preceding the namespace name. - SourceRange QualifierRange; - - /// \brief The nested-name-specifier that precedes the namespace - /// name, if any. - NestedNameSpecifier *Qualifier; + /// \brief The nested-name-specifier that precedes the namespace. + NestedNameSpecifierLoc QualifierLoc; /// NominatedNamespace - Namespace nominated by using-directive. NamedDecl *NominatedNamespace; @@ -1737,25 +1792,24 @@ UsingDirectiveDecl(DeclContext *DC, SourceLocation UsingLoc, SourceLocation NamespcLoc, - SourceRange QualifierRange, - NestedNameSpecifier *Qualifier, + NestedNameSpecifierLoc QualifierLoc, SourceLocation IdentLoc, NamedDecl *Nominated, DeclContext *CommonAncestor) : NamedDecl(UsingDirective, DC, IdentLoc, getName()), UsingLoc(UsingLoc), - NamespaceLoc(NamespcLoc), QualifierRange(QualifierRange), - Qualifier(Qualifier), NominatedNamespace(Nominated), - CommonAncestor(CommonAncestor) { - } + NamespaceLoc(NamespcLoc), QualifierLoc(QualifierLoc), + NominatedNamespace(Nominated), CommonAncestor(CommonAncestor) { } public: - /// \brief Retrieve the source range of the nested-name-specifier - /// that qualifies the namespace name. - SourceRange getQualifierRange() const { return QualifierRange; } - + /// \brief Retrieve the nested-name-specifier that qualifies the + /// name of the namespace, with source-location information. + NestedNameSpecifierLoc getQualifierLoc() const { return QualifierLoc; } + /// \brief Retrieve the nested-name-specifier that qualifies the /// name of the namespace. - NestedNameSpecifier *getQualifier() const { return Qualifier; } + NestedNameSpecifier *getQualifier() const { + return QualifierLoc.getNestedNameSpecifier(); + } NamedDecl *getNominatedNamespaceAsWritten() { return NominatedNamespace; } const NamedDecl *getNominatedNamespaceAsWritten() const { @@ -1787,8 +1841,7 @@ static UsingDirectiveDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation UsingLoc, SourceLocation NamespaceLoc, - SourceRange QualifierRange, - NestedNameSpecifier *Qualifier, + NestedNameSpecifierLoc QualifierLoc, SourceLocation IdentLoc, NamedDecl *Nominated, DeclContext *CommonAncestor); @@ -1816,49 +1869,37 @@ /// \brief The location of the "namespace" keyword. SourceLocation NamespaceLoc; - /// \brief The source range that covers the nested-name-specifier - /// preceding the namespace name. - SourceRange QualifierRange; - - /// \brief The nested-name-specifier that precedes the namespace - /// name, if any. - NestedNameSpecifier *Qualifier; - /// IdentLoc - Location of namespace identifier. Accessed by TargetNameLoc. SourceLocation IdentLoc; - + + /// \brief The nested-name-specifier that precedes the namespace. + NestedNameSpecifierLoc QualifierLoc; + /// Namespace - The Decl that this alias points to. Can either be a /// NamespaceDecl or a NamespaceAliasDecl. NamedDecl *Namespace; NamespaceAliasDecl(DeclContext *DC, SourceLocation NamespaceLoc, SourceLocation AliasLoc, IdentifierInfo *Alias, - SourceRange QualifierRange, - NestedNameSpecifier *Qualifier, + NestedNameSpecifierLoc QualifierLoc, SourceLocation IdentLoc, NamedDecl *Namespace) : NamedDecl(NamespaceAlias, DC, AliasLoc, Alias), - NamespaceLoc(NamespaceLoc), QualifierRange(QualifierRange), - Qualifier(Qualifier), IdentLoc(IdentLoc), Namespace(Namespace) { } + NamespaceLoc(NamespaceLoc), IdentLoc(IdentLoc), + QualifierLoc(QualifierLoc), Namespace(Namespace) { } friend class ASTDeclReader; public: - /// \brief Retrieve the source range of the nested-name-specifier - /// that qualifiers the namespace name. - SourceRange getQualifierRange() const { return QualifierRange; } - - /// \brief Set the source range of the nested-name-specifier that qualifies - /// the namespace name. - void setQualifierRange(SourceRange R) { QualifierRange = R; } - + /// \brief Retrieve the nested-name-specifier that qualifies the + /// name of the namespace, with source-location information. + NestedNameSpecifierLoc getQualifierLoc() const { return QualifierLoc; } + /// \brief Retrieve the nested-name-specifier that qualifies the /// name of the namespace. - NestedNameSpecifier *getQualifier() const { return Qualifier; } - - /// \brief Set the nested-name-specifier that qualifies the name of the - /// namespace. - void setQualifier(NestedNameSpecifier *NNS) { Qualifier = NNS; } - + NestedNameSpecifier *getQualifier() const { + return QualifierLoc.getNestedNameSpecifier(); + } + /// \brief Retrieve the namespace declaration aliased by this directive. NamespaceDecl *getNamespace() { if (NamespaceAliasDecl *AD = dyn_cast(Namespace)) @@ -1889,8 +1930,7 @@ SourceLocation NamespaceLoc, SourceLocation AliasLoc, IdentifierInfo *Alias, - SourceRange QualifierRange, - NestedNameSpecifier *Qualifier, + NestedNameSpecifierLoc QualifierLoc, SourceLocation IdentLoc, NamedDecl *Namespace); @@ -1918,13 +1958,16 @@ /// The referenced declaration. NamedDecl *Underlying; - /// The using declaration which introduced this decl. - UsingDecl *Using; + /// \brief The using declaration which introduced this decl or the next using + /// shadow declaration contained in the aforementioned using declaration. + NamedDecl *UsingOrNextShadow; + friend class UsingDecl; UsingShadowDecl(DeclContext *DC, SourceLocation Loc, UsingDecl *Using, NamedDecl *Target) : NamedDecl(UsingShadow, DC, Loc, DeclarationName()), - Underlying(Target), Using(Using) { + Underlying(Target), + UsingOrNextShadow(reinterpret_cast(Using)) { if (Target) { setDeclName(Target->getDeclName()); IdentifierNamespace = Target->getIdentifierNamespace(); @@ -1952,73 +1995,64 @@ } /// \brief Gets the using declaration to which this declaration is tied. - UsingDecl *getUsingDecl() const { return Using; } + UsingDecl *getUsingDecl() const; - /// \brief Sets the using declaration that introduces this target - /// declaration. - void setUsingDecl(UsingDecl* UD) { Using = UD; } + /// \brief The next using shadow declaration contained in the shadow decl + /// chain of the using declaration which introduced this decl. + UsingShadowDecl *getNextUsingShadowDecl() const { + return dyn_cast_or_null(UsingOrNextShadow); + } static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const UsingShadowDecl *D) { return true; } static bool classofKind(Kind K) { return K == Decl::UsingShadow; } + + friend class ASTDeclReader; + friend class ASTDeclWriter; }; /// UsingDecl - Represents a C++ using-declaration. For example: /// using someNameSpace::someIdentifier; class UsingDecl : public NamedDecl { - /// \brief The source range that covers the nested-name-specifier - /// preceding the declaration name. - SourceRange NestedNameRange; - /// \brief The source location of the "using" location itself. SourceLocation UsingLocation; - /// \brief Target nested name specifier. - NestedNameSpecifier* TargetNestedName; + /// \brief The nested-name-specifier that precedes the name. + NestedNameSpecifierLoc QualifierLoc; /// DNLoc - Provides source/type location info for the /// declaration name embedded in the ValueDecl base class. DeclarationNameLoc DNLoc; - /// \brief The collection of shadow declarations associated with - /// this using declaration. This set can change as a class is - /// processed. - llvm::SmallPtrSet Shadows; + /// \brief The first shadow declaration of the shadow decl chain associated + /// with this using declaration. + UsingShadowDecl *FirstUsingShadow; // \brief Has 'typename' keyword. bool IsTypeName; - UsingDecl(DeclContext *DC, SourceRange NNR, - SourceLocation UL, NestedNameSpecifier* TargetNNS, + UsingDecl(DeclContext *DC, SourceLocation UL, + NestedNameSpecifierLoc QualifierLoc, const DeclarationNameInfo &NameInfo, bool IsTypeNameArg) : NamedDecl(Using, DC, NameInfo.getLoc(), NameInfo.getName()), - NestedNameRange(NNR), UsingLocation(UL), TargetNestedName(TargetNNS), - DNLoc(NameInfo.getInfo()), IsTypeName(IsTypeNameArg) { + UsingLocation(UL), QualifierLoc(QualifierLoc), + DNLoc(NameInfo.getInfo()), FirstUsingShadow(0),IsTypeName(IsTypeNameArg) { } public: - /// \brief Returns the source range that covers the nested-name-specifier - /// preceding the namespace name. - SourceRange getNestedNameRange() const { return NestedNameRange; } - - /// \brief Set the source range of the nested-name-specifier. - void setNestedNameRange(SourceRange R) { NestedNameRange = R; } - - // FIXME: Naming is inconsistent with other get*Loc functions. /// \brief Returns the source location of the "using" keyword. SourceLocation getUsingLocation() const { return UsingLocation; } /// \brief Set the source location of the 'using' keyword. void setUsingLocation(SourceLocation L) { UsingLocation = L; } - /// \brief Get the target nested name declaration. - NestedNameSpecifier* getTargetNestedNameDecl() const { - return TargetNestedName; - } - - /// \brief Set the target nested name declaration. - void setTargetNestedNameDecl(NestedNameSpecifier *NNS) { - TargetNestedName = NNS; + /// \brief Retrieve the nested-name-specifier that qualifies the name, + /// with source-location information. + NestedNameSpecifierLoc getQualifierLoc() const { return QualifierLoc; } + + /// \brief Retrieve the nested-name-specifier that qualifies the name. + NestedNameSpecifier *getQualifier() const { + return QualifierLoc.getNestedNameSpecifier(); } DeclarationNameInfo getNameInfo() const { @@ -2031,32 +2065,61 @@ /// \brief Sets whether the using declaration has 'typename'. void setTypeName(bool TN) { IsTypeName = TN; } - typedef llvm::SmallPtrSet::const_iterator shadow_iterator; - shadow_iterator shadow_begin() const { return Shadows.begin(); } - shadow_iterator shadow_end() const { return Shadows.end(); } - - void addShadowDecl(UsingShadowDecl *S) { - assert(S->getUsingDecl() == this); - if (!Shadows.insert(S)) { - assert(false && "declaration already in set"); + /// \brief Iterates through the using shadow declarations assosiated with + /// this using declaration. + class shadow_iterator { + /// \brief The current using shadow declaration. + UsingShadowDecl *Current; + + public: + typedef UsingShadowDecl* value_type; + typedef UsingShadowDecl* reference; + typedef UsingShadowDecl* pointer; + typedef std::forward_iterator_tag iterator_category; + typedef std::ptrdiff_t difference_type; + + shadow_iterator() : Current(0) { } + explicit shadow_iterator(UsingShadowDecl *C) : Current(C) { } + + reference operator*() const { return Current; } + pointer operator->() const { return Current; } + + shadow_iterator& operator++() { + Current = Current->getNextUsingShadowDecl(); + return *this; } - } - void removeShadowDecl(UsingShadowDecl *S) { - assert(S->getUsingDecl() == this); - if (!Shadows.erase(S)) { - assert(false && "declaration not in set"); + + shadow_iterator operator++(int) { + shadow_iterator tmp(*this); + ++(*this); + return tmp; + } + + friend bool operator==(shadow_iterator x, shadow_iterator y) { + return x.Current == y.Current; } + friend bool operator!=(shadow_iterator x, shadow_iterator y) { + return x.Current != y.Current; + } + }; + + shadow_iterator shadow_begin() const { + return shadow_iterator(FirstUsingShadow); } + shadow_iterator shadow_end() const { return shadow_iterator(); } /// \brief Return the number of shadowed declarations associated with this /// using declaration. - unsigned getNumShadowDecls() const { - return Shadows.size(); + unsigned shadow_size() const { + return std::distance(shadow_begin(), shadow_end()); } + void addShadowDecl(UsingShadowDecl *S); + void removeShadowDecl(UsingShadowDecl *S); + static UsingDecl *Create(ASTContext &C, DeclContext *DC, - SourceRange NNR, SourceLocation UsingL, - NestedNameSpecifier* TargetNNS, + SourceLocation UsingL, + NestedNameSpecifierLoc QualifierLoc, const DeclarationNameInfo &NameInfo, bool IsTypeNameArg); @@ -2081,61 +2144,49 @@ /// using Base::foo; /// }; class UnresolvedUsingValueDecl : public ValueDecl { - /// \brief The source range that covers the nested-name-specifier - /// preceding the declaration name. - SourceRange TargetNestedNameRange; - /// \brief The source location of the 'using' keyword SourceLocation UsingLocation; - NestedNameSpecifier *TargetNestedNameSpecifier; + /// \brief The nested-name-specifier that precedes the name. + NestedNameSpecifierLoc QualifierLoc; /// DNLoc - Provides source/type location info for the /// declaration name embedded in the ValueDecl base class. DeclarationNameLoc DNLoc; UnresolvedUsingValueDecl(DeclContext *DC, QualType Ty, - SourceLocation UsingLoc, SourceRange TargetNNR, - NestedNameSpecifier *TargetNNS, + SourceLocation UsingLoc, + NestedNameSpecifierLoc QualifierLoc, const DeclarationNameInfo &NameInfo) : ValueDecl(UnresolvedUsingValue, DC, NameInfo.getLoc(), NameInfo.getName(), Ty), - TargetNestedNameRange(TargetNNR), UsingLocation(UsingLoc), - TargetNestedNameSpecifier(TargetNNS), DNLoc(NameInfo.getInfo()) + UsingLocation(UsingLoc), QualifierLoc(QualifierLoc), + DNLoc(NameInfo.getInfo()) { } public: - /// \brief Returns the source range that covers the nested-name-specifier - /// preceding the namespace name. - SourceRange getTargetNestedNameRange() const { return TargetNestedNameRange; } - - /// \brief Set the source range coverting the nested-name-specifier preceding - /// the namespace name. - void setTargetNestedNameRange(SourceRange R) { TargetNestedNameRange = R; } - - /// \brief Get target nested name declaration. - NestedNameSpecifier* getTargetNestedNameSpecifier() const { - return TargetNestedNameSpecifier; - } - - /// \brief Set the nested name declaration. - void setTargetNestedNameSpecifier(NestedNameSpecifier* NNS) { - TargetNestedNameSpecifier = NNS; - } - /// \brief Returns the source location of the 'using' keyword. SourceLocation getUsingLoc() const { return UsingLocation; } /// \brief Set the source location of the 'using' keyword. void setUsingLoc(SourceLocation L) { UsingLocation = L; } + /// \brief Retrieve the nested-name-specifier that qualifies the name, + /// with source-location information. + NestedNameSpecifierLoc getQualifierLoc() const { return QualifierLoc; } + + /// \brief Retrieve the nested-name-specifier that qualifies the name. + NestedNameSpecifier *getQualifier() const { + return QualifierLoc.getNestedNameSpecifier(); + } + DeclarationNameInfo getNameInfo() const { return DeclarationNameInfo(getDeclName(), getLocation(), DNLoc); } static UnresolvedUsingValueDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation UsingLoc, - SourceRange TargetNNR, NestedNameSpecifier *TargetNNS, + NestedNameSpecifierLoc QualifierLoc, const DeclarationNameInfo &NameInfo); SourceRange getSourceRange() const { @@ -2145,6 +2196,9 @@ static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const UnresolvedUsingValueDecl *D) { return true; } static bool classofKind(Kind K) { return K == UnresolvedUsingValue; } + + friend class ASTDeclReader; + friend class ASTDeclWriter; }; /// UnresolvedUsingTypenameDecl - Represents a dependent using @@ -2157,55 +2211,47 @@ /// The type associated with a unresolved using typename decl is /// currently always a typename type. class UnresolvedUsingTypenameDecl : public TypeDecl { - /// \brief The source range that covers the nested-name-specifier - /// preceding the declaration name. - SourceRange TargetNestedNameRange; - /// \brief The source location of the 'using' keyword SourceLocation UsingLocation; /// \brief The source location of the 'typename' keyword SourceLocation TypenameLocation; - NestedNameSpecifier *TargetNestedNameSpecifier; + /// \brief The nested-name-specifier that precedes the name. + NestedNameSpecifierLoc QualifierLoc; UnresolvedUsingTypenameDecl(DeclContext *DC, SourceLocation UsingLoc, - SourceLocation TypenameLoc, - SourceRange TargetNNR, NestedNameSpecifier *TargetNNS, - SourceLocation TargetNameLoc, IdentifierInfo *TargetName) - : TypeDecl(UnresolvedUsingTypename, DC, TargetNameLoc, TargetName), - TargetNestedNameRange(TargetNNR), UsingLocation(UsingLoc), - TypenameLocation(TypenameLoc), TargetNestedNameSpecifier(TargetNNS) - { } + SourceLocation TypenameLoc, + NestedNameSpecifierLoc QualifierLoc, + SourceLocation TargetNameLoc, + IdentifierInfo *TargetName) + : TypeDecl(UnresolvedUsingTypename, DC, TargetNameLoc, TargetName, + UsingLoc), + TypenameLocation(TypenameLoc), QualifierLoc(QualifierLoc) { } friend class ASTDeclReader; public: - /// \brief Returns the source range that covers the nested-name-specifier - /// preceding the namespace name. - SourceRange getTargetNestedNameRange() const { return TargetNestedNameRange; } - - /// \brief Get target nested name declaration. - NestedNameSpecifier* getTargetNestedNameSpecifier() { - return TargetNestedNameSpecifier; - } - /// \brief Returns the source location of the 'using' keyword. - SourceLocation getUsingLoc() const { return UsingLocation; } + SourceLocation getUsingLoc() const { return getLocStart(); } /// \brief Returns the source location of the 'typename' keyword. SourceLocation getTypenameLoc() const { return TypenameLocation; } + /// \brief Retrieve the nested-name-specifier that qualifies the name, + /// with source-location information. + NestedNameSpecifierLoc getQualifierLoc() const { return QualifierLoc; } + + /// \brief Retrieve the nested-name-specifier that qualifies the name. + NestedNameSpecifier *getQualifier() const { + return QualifierLoc.getNestedNameSpecifier(); + } + static UnresolvedUsingTypenameDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation UsingLoc, - SourceLocation TypenameLoc, - SourceRange TargetNNR, NestedNameSpecifier *TargetNNS, + SourceLocation TypenameLoc, NestedNameSpecifierLoc QualifierLoc, SourceLocation TargetNameLoc, DeclarationName TargetName); - SourceRange getSourceRange() const { - return SourceRange(UsingLocation, getLocation()); - } - static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const UnresolvedUsingTypenameDecl *D) { return true; } static bool classofKind(Kind K) { return K == UnresolvedUsingTypename; } diff -Nru clang-2.8/tools/clang/include/clang/AST/DeclFriend.h clang-2.9/tools/clang/include/clang/AST/DeclFriend.h --- clang-2.8/tools/clang/include/clang/AST/DeclFriend.h 2010-09-01 22:55:38.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/AST/DeclFriend.h 2011-03-04 10:59:18.000000000 +0000 @@ -43,11 +43,16 @@ FriendUnion Friend; // A pointer to the next friend in the sequence. - FriendDecl *NextFriend; + LazyDeclPtr NextFriend; // Location of the 'friend' specifier. SourceLocation FriendLoc; + /// True if this 'friend' declaration is unsupported. Eventually we + /// will support every possible friend declaration, but for now we + /// silently ignore some and set this flag to authorize all access. + bool UnsupportedFriend; + friend class CXXRecordDecl::friend_iterator; friend class CXXRecordDecl; @@ -55,13 +60,19 @@ SourceLocation FriendL) : Decl(Decl::Friend, DC, L), Friend(Friend), - NextFriend(0), - FriendLoc(FriendL) { + NextFriend(), + FriendLoc(FriendL), + UnsupportedFriend(false) { } explicit FriendDecl(EmptyShell Empty) - : Decl(Decl::Friend, Empty), NextFriend(0) { } + : Decl(Decl::Friend, Empty), NextFriend() { } + FriendDecl *getNextFriend() { + return cast_or_null( + NextFriend.get(getASTContext().getExternalSource())); + } + public: static FriendDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L, FriendUnion Friend_, @@ -87,6 +98,25 @@ return FriendLoc; } + /// Retrieves the source range for the friend declaration. + SourceRange getSourceRange() const { + /* FIXME: consider the case of templates wrt start of range. */ + if (NamedDecl *ND = getFriendDecl()) + return SourceRange(getFriendLoc(), ND->getLocEnd()); + else if (TypeSourceInfo *TInfo = getFriendType()) + return SourceRange(getFriendLoc(), TInfo->getTypeLoc().getEndLoc()); + else + return SourceRange(getFriendLoc(), getLocation()); + } + + /// Determines if this friend kind is unsupported. + bool isUnsupportedFriend() const { + return UnsupportedFriend; + } + void setUnsupportedFriend(bool Unsupported) { + UnsupportedFriend = Unsupported; + } + // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const FriendDecl *D) { return true; } @@ -115,7 +145,7 @@ friend_iterator &operator++() { assert(Ptr && "attempt to increment past end of friend list"); - Ptr = Ptr->NextFriend; + Ptr = Ptr->getNextFriend(); return *this; } diff -Nru clang-2.8/tools/clang/include/clang/AST/DeclGroup.h clang-2.9/tools/clang/include/clang/AST/DeclGroup.h --- clang-2.8/tools/clang/include/clang/AST/DeclGroup.h 2010-07-25 18:32:30.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/AST/DeclGroup.h 2011-02-23 00:09:59.000000000 +0000 @@ -14,7 +14,7 @@ #ifndef LLVM_CLANG_AST_DECLGROUP_H #define LLVM_CLANG_AST_DECLGROUP_H -#include "llvm/System/DataTypes.h" +#include "llvm/Support/DataTypes.h" #include namespace clang { @@ -39,12 +39,12 @@ Decl*& operator[](unsigned i) { assert (i < NumDecls && "Out-of-bounds access."); - return *((Decl**) (this+1)); + return ((Decl**) (this+1))[i]; } Decl* const& operator[](unsigned i) const { assert (i < NumDecls && "Out-of-bounds access."); - return *((Decl* const*) (this+1)); + return ((Decl* const*) (this+1))[i]; } }; diff -Nru clang-2.8/tools/clang/include/clang/AST/Decl.h clang-2.9/tools/clang/include/clang/AST/Decl.h --- clang-2.8/tools/clang/include/clang/AST/Decl.h 2010-09-01 20:41:53.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/AST/Decl.h 2011-03-06 16:09:14.000000000 +0000 @@ -36,6 +36,7 @@ class DependentFunctionTemplateSpecializationInfo; class TypeLoc; class UnresolvedSetImpl; +class LabelStmt; /// \brief A container of type source information. /// @@ -118,6 +119,14 @@ return getIdentifier() ? getIdentifier()->getName() : ""; } + llvm::StringRef getMessageUnavailableAttr(bool unavailable) const { + if (!unavailable) + return ""; + if (const UnavailableAttr *UA = getAttr()) + return UA->getMessage(); + return ""; + } + /// getNameAsString - Get a human-readable name for the declaration, even if /// it is one of the special kinds of names (C++ constructor, Objective-C /// selector, etc). Creating this name requires expensive string @@ -196,9 +205,86 @@ /// determine whether it's an instance member of its class. bool isCXXInstanceMember() const; + class LinkageInfo { + Linkage linkage_; + Visibility visibility_; + bool explicit_; + + public: + LinkageInfo() : linkage_(ExternalLinkage), visibility_(DefaultVisibility), + explicit_(false) {} + LinkageInfo(Linkage L, Visibility V, bool E) + : linkage_(L), visibility_(V), explicit_(E) {} + + static LinkageInfo external() { + return LinkageInfo(); + } + static LinkageInfo internal() { + return LinkageInfo(InternalLinkage, DefaultVisibility, false); + } + static LinkageInfo uniqueExternal() { + return LinkageInfo(UniqueExternalLinkage, DefaultVisibility, false); + } + static LinkageInfo none() { + return LinkageInfo(NoLinkage, DefaultVisibility, false); + } + + Linkage linkage() const { return linkage_; } + Visibility visibility() const { return visibility_; } + bool visibilityExplicit() const { return explicit_; } + + void setLinkage(Linkage L) { linkage_ = L; } + void setVisibility(Visibility V) { visibility_ = V; } + void setVisibility(Visibility V, bool E) { visibility_ = V; explicit_ = E; } + void setVisibility(LinkageInfo Other) { + setVisibility(Other.visibility(), Other.visibilityExplicit()); + } + + void mergeLinkage(Linkage L) { + setLinkage(minLinkage(linkage(), L)); + } + void mergeLinkage(LinkageInfo Other) { + setLinkage(minLinkage(linkage(), Other.linkage())); + } + + void mergeVisibility(Visibility V) { + setVisibility(minVisibility(visibility(), V)); + } + void mergeVisibility(Visibility V, bool E) { + setVisibility(minVisibility(visibility(), V), visibilityExplicit() || E); + } + void mergeVisibility(LinkageInfo Other) { + mergeVisibility(Other.visibility(), Other.visibilityExplicit()); + } + + void merge(LinkageInfo Other) { + mergeLinkage(Other); + mergeVisibility(Other); + } + void merge(std::pair LV) { + mergeLinkage(LV.first); + mergeVisibility(LV.second); + } + + friend LinkageInfo merge(LinkageInfo L, LinkageInfo R) { + L.merge(R); + return L; + } + }; + /// \brief Determine what kind of linkage this entity has. Linkage getLinkage() const; + /// \brief Determines the visibility of this entity. + Visibility getVisibility() const { return getLinkageAndVisibility().visibility(); } + + /// \brief Determines the linkage and visibility of this entity. + LinkageInfo getLinkageAndVisibility() const; + + /// \brief Clear the linkage cache in response to a change + /// to the declaration. + void ClearLinkageCache(); + /// \brief Looks through UsingDecls and ObjCCompatibleAliasDecls for /// the underlying named decl. NamedDecl *getUnderlyingDecl(); @@ -217,6 +303,45 @@ return OS; } +/// LabelDecl - Represents the declaration of a label. Labels also have a +/// corresponding LabelStmt, which indicates the position that the label was +/// defined at. For normal labels, the location of the decl is the same as the +/// location of the statement. For GNU local labels (__label__), the decl +/// location is where the __label__ is. +class LabelDecl : public NamedDecl { + LabelStmt *TheStmt; + /// LocStart - For normal labels, this is the same as the main declaration + /// label, i.e., the location of the identifier; for GNU local labels, + /// this is the location of the __label__ keyword. + SourceLocation LocStart; + + LabelDecl(DeclContext *DC, SourceLocation IdentL, IdentifierInfo *II, + LabelStmt *S, SourceLocation StartL) + : NamedDecl(Label, DC, IdentL, II), TheStmt(S), LocStart(StartL) {} + +public: + static LabelDecl *Create(ASTContext &C, DeclContext *DC, + SourceLocation IdentL, IdentifierInfo *II); + static LabelDecl *Create(ASTContext &C, DeclContext *DC, + SourceLocation IdentL, IdentifierInfo *II, + SourceLocation GnuLabelL); + + LabelStmt *getStmt() const { return TheStmt; } + void setStmt(LabelStmt *T) { TheStmt = T; } + + bool isGnuLocal() const { return LocStart != getLocation(); } + void setLocStart(SourceLocation L) { LocStart = L; } + + SourceRange getSourceRange() const { + return SourceRange(LocStart, getLocation()); + } + + // Implement isa/cast/dyncast/etc. + static bool classof(const Decl *D) { return classofKind(D->getKind()); } + static bool classof(const LabelDecl *D) { return true; } + static bool classofKind(Kind K) { return K == Label; } +}; + /// NamespaceDecl - Represent a C++ namespace. class NamespaceDecl : public NamedDecl, public DeclContext { bool IsInline : 1; @@ -232,7 +357,7 @@ // NextNamespace points to the next extended declaration. // OrigNamespace points to the original namespace declaration. // OrigNamespace of the first namespace decl points to its anonymous namespace - NamespaceDecl *NextNamespace; + LazyDeclPtr NextNamespace; /// \brief A pointer to either the original namespace definition for /// this namespace (if the boolean value is false) or the anonymous @@ -250,7 +375,7 @@ NamespaceDecl(DeclContext *DC, SourceLocation L, IdentifierInfo *Id) : NamedDecl(Namespace, DC, L, Id), DeclContext(Namespace), - IsInline(false), NextNamespace(0), OrigOrAnonNamespace(0, true) { } + IsInline(false), NextNamespace(), OrigOrAnonNamespace(0, true) { } public: static NamespaceDecl *Create(ASTContext &C, DeclContext *DC, @@ -281,8 +406,10 @@ /// \brief Return the next extended namespace declaration or null if there /// is none. - NamespaceDecl *getNextNamespace() { return NextNamespace; } - const NamespaceDecl *getNextNamespace() const { return NextNamespace; } + NamespaceDecl *getNextNamespace(); + const NamespaceDecl *getNextNamespace() const { + return const_cast(this)->getNextNamespace(); + } /// \brief Set the next extended namespace declaration. void setNextNamespace(NamespaceDecl *ND) { NextNamespace = ND; } @@ -331,9 +458,9 @@ SourceLocation getLBracLoc() const { return LBracLoc; } SourceLocation getRBracLoc() const { return RBracLoc; } - void setLBracLoc(SourceLocation LBrace) { LBracLoc = LBrace; } - void setRBracLoc(SourceLocation RBrace) { RBracLoc = RBrace; } - + void setLBracLoc(SourceLocation L) { LBracLoc = L; } + void setRBracLoc(SourceLocation R) { RBracLoc = R; } + // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const NamespaceDecl *D) { return true; } @@ -372,10 +499,7 @@ /// QualifierInfo - A struct with extended info about a syntactic /// name qualifier, to be used for the case of out-of-line declarations. struct QualifierInfo { - /// NNS - The syntactic name qualifier. - NestedNameSpecifier *NNS; - /// NNSRange - The source range for the qualifier. - SourceRange NNSRange; + NestedNameSpecifierLoc QualifierLoc; /// NumTemplParamLists - The number of template parameter lists /// that were matched against the template-ids occurring into the NNS. unsigned NumTemplParamLists; @@ -384,8 +508,7 @@ TemplateParameterList** TemplParamLists; /// Default constructor. - QualifierInfo() - : NNS(0), NNSRange(), NumTemplParamLists(0), TemplParamLists(0) {} + QualifierInfo() : QualifierLoc(), NumTemplParamLists(0), TemplParamLists(0) {} /// setTemplateParameterListsInfo - Sets info about matched template /// parameter lists. void setTemplateParameterListsInfo(ASTContext &Context, @@ -442,14 +565,22 @@ return SourceRange(getOuterLocStart(), getLocation()); } + /// \brief Retrieve the nested-name-specifier that qualifies the name of this + /// declaration, if it was present in the source. NestedNameSpecifier *getQualifier() const { - return hasExtInfo() ? getExtInfo()->NNS : 0; + return hasExtInfo() ? getExtInfo()->QualifierLoc.getNestedNameSpecifier() + : 0; } - SourceRange getQualifierRange() const { - return hasExtInfo() ? getExtInfo()->NNSRange : SourceRange(); + + /// \brief Retrieve the nested-name-specifier (with source-location + /// information) that qualifies the name of this declaration, if it was + /// present in the source. + NestedNameSpecifierLoc getQualifierLoc() const { + return hasExtInfo() ? getExtInfo()->QualifierLoc + : NestedNameSpecifierLoc(); } - void setQualifierInfo(NestedNameSpecifier *Qualifier, - SourceRange QualifierRange); + + void setQualifierInfo(NestedNameSpecifierLoc QualifierLoc); unsigned getNumTemplateParameterLists() const { return hasExtInfo() ? getExtInfo()->NumTemplParamLists : 0; @@ -471,6 +602,9 @@ static bool classofKind(Kind K) { return K >= firstDeclarator && K <= lastDeclarator; } + + friend class ASTDeclReader; + friend class ASTDeclWriter; }; /// \brief Structure used to store a statement, the constant value to @@ -545,8 +679,10 @@ /// \brief Whether this local variable could be allocated in the return /// slot of its function, enabling the named return value optimization (NRVO). bool NRVOVariable : 1; - + friend class StmtIteratorBase; + friend class ASTDeclReader; + protected: VarDecl(Kind DK, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, StorageClass SC, @@ -582,10 +718,7 @@ StorageClass getStorageClassAsWritten() const { return (StorageClass) SClassAsWritten; } - void setStorageClass(StorageClass SC) { - assert(isLegalForVariable(SC)); - SClass = SC; - } + void setStorageClass(StorageClass SC); void setStorageClassAsWritten(StorageClass SC) { assert(isLegalForVariable(SC)); SClassAsWritten = SC; @@ -630,13 +763,13 @@ /// external, C linkage. bool isExternC() const; - /// isBlockVarDecl - Returns true for local variable declarations. Note that - /// this includes static variables inside of functions. It also includes - /// variables inside blocks. + /// isLocalVarDecl - Returns true for local variable declarations + /// other than parameters. Note that this includes static variables + /// inside of functions. It also includes variables inside blocks. /// /// void foo() { int x; static int y; extern int z; } /// - bool isBlockVarDecl() const { + bool isLocalVarDecl() const { if (getKind() != Decl::Var) return false; if (const DeclContext *DC = getDeclContext()) @@ -644,8 +777,8 @@ return false; } - /// isFunctionOrMethodVarDecl - Similar to isBlockVarDecl, but excludes - /// variables declared in blocks. + /// isFunctionOrMethodVarDecl - Similar to isLocalVarDecl, but + /// excludes variables declared in blocks. bool isFunctionOrMethodVarDecl() const { if (getKind() != Decl::Var) return false; @@ -683,6 +816,10 @@ /// definition. DefinitionKind isThisDeclarationADefinition() const; + /// \brief Check whether this variable is defined in this + /// translation unit. + DefinitionKind hasDefinition() const; + /// \brief Get the tentative definition that acts as the real definition in /// a TU. Returns null if there is a proper definition available. VarDecl *getActingDefinition(); @@ -733,7 +870,7 @@ const Expr *getAnyInitializer(const VarDecl *&D) const; bool hasInit() const { - return !Init.isNull(); + return !Init.isNull() && (Init.is() || Init.is()); } const Expr *getInit() const { if (Init.isNull()) @@ -925,14 +1062,18 @@ }; class ImplicitParamDecl : public VarDecl { -protected: - ImplicitParamDecl(Kind DK, DeclContext *DC, SourceLocation L, - IdentifierInfo *Id, QualType Tw) - : VarDecl(DK, DC, L, Id, Tw, /*TInfo=*/0, SC_None, SC_None) {} public: static ImplicitParamDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, QualType T); + + ImplicitParamDecl(DeclContext *DC, SourceLocation loc, + IdentifierInfo *name, QualType type) + : VarDecl(ImplicitParam, DC, loc, name, type, + /*tinfo*/ 0, SC_None, SC_None) { + setImplicit(); + } + // Implement isa/cast/dyncast/etc. static bool classof(const ImplicitParamDecl *D) { return true; } static bool classof(const Decl *D) { return classofKind(D->getKind()); } @@ -1046,6 +1187,10 @@ return getType(); } + /// \brief Determine whether this parameter is actually a function + /// parameter pack. + bool isParameterPack() const; + /// setOwningFunction - Sets the function declaration that owns this /// ParmVarDecl. Since ParmVarDecls are often created before the /// FunctionDecls that own them, this routine is required to update @@ -1096,13 +1241,13 @@ unsigned SClass : 2; unsigned SClassAsWritten : 2; bool IsInline : 1; + bool IsInlineSpecified : 1; bool IsVirtualAsWritten : 1; bool IsPure : 1; bool HasInheritedPrototype : 1; bool HasWrittenPrototype : 1; bool IsDeleted : 1; bool IsTrivial : 1; // sunk from CXXMethodDecl - bool IsCopyAssignment : 1; // sunk from CXXMethodDecl bool HasImplicitReturnZero : 1; /// \brief End part of this FunctionDecl's source range. @@ -1136,19 +1281,54 @@ /// declaration name embedded in the DeclaratorDecl base class. DeclarationNameLoc DNLoc; + /// \brief Specify that this function declaration is actually a function + /// template specialization. + /// + /// \param C the ASTContext. + /// + /// \param Template the function template that this function template + /// specialization specializes. + /// + /// \param TemplateArgs the template arguments that produced this + /// function template specialization from the template. + /// + /// \param InsertPos If non-NULL, the position in the function template + /// specialization set where the function template specialization data will + /// be inserted. + /// + /// \param TSK the kind of template specialization this is. + /// + /// \param TemplateArgsAsWritten location info of template arguments. + /// + /// \param PointOfInstantiation point at which the function template + /// specialization was first instantiated. + void setFunctionTemplateSpecialization(ASTContext &C, + FunctionTemplateDecl *Template, + const TemplateArgumentList *TemplateArgs, + void *InsertPos, + TemplateSpecializationKind TSK, + const TemplateArgumentListInfo *TemplateArgsAsWritten, + SourceLocation PointOfInstantiation); + + /// \brief Specify that this record is an instantiation of the + /// member function FD. + void setInstantiationOfMemberFunction(ASTContext &C, FunctionDecl *FD, + TemplateSpecializationKind TSK); + + void setParams(ASTContext &C, ParmVarDecl **NewParamInfo, unsigned NumParams); + protected: FunctionDecl(Kind DK, DeclContext *DC, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, - StorageClass S, StorageClass SCAsWritten, bool isInline) + StorageClass S, StorageClass SCAsWritten, bool isInlineSpecified) : DeclaratorDecl(DK, DC, NameInfo.getLoc(), NameInfo.getName(), T, TInfo), DeclContext(DK), ParamInfo(0), Body(), - SClass(S), SClassAsWritten(SCAsWritten), IsInline(isInline), + SClass(S), SClassAsWritten(SCAsWritten), + IsInline(isInlineSpecified), IsInlineSpecified(isInlineSpecified), IsVirtualAsWritten(false), IsPure(false), HasInheritedPrototype(false), HasWrittenPrototype(true), IsDeleted(false), IsTrivial(false), - IsCopyAssignment(false), - HasImplicitReturnZero(false), - EndRangeLoc(NameInfo.getEndLoc()), + HasImplicitReturnZero(false), EndRangeLoc(NameInfo.getEndLoc()), TemplateOrSpecialization(), DNLoc(NameInfo.getInfo()) {} @@ -1169,11 +1349,11 @@ TypeSourceInfo *TInfo, StorageClass S = SC_None, StorageClass SCAsWritten = SC_None, - bool isInline = false, + bool isInlineSpecified = false, bool hasWrittenPrototype = true) { DeclarationNameInfo NameInfo(N, L); return FunctionDecl::Create(C, DC, NameInfo, T, TInfo, S, SCAsWritten, - isInline, hasWrittenPrototype); + isInlineSpecified, hasWrittenPrototype); } static FunctionDecl *Create(ASTContext &C, DeclContext *DC, @@ -1181,7 +1361,7 @@ QualType T, TypeSourceInfo *TInfo, StorageClass S = SC_None, StorageClass SCAsWritten = SC_None, - bool isInline = false, + bool isInlineSpecified = false, bool hasWrittenPrototype = true); DeclarationNameInfo getNameInfo() const { @@ -1246,7 +1426,7 @@ /// Whether this virtual function is pure, i.e. makes the containing class /// abstract. bool isPure() const { return IsPure; } - void setPure(bool P = true) { IsPure = P; } + void setPure(bool P = true); /// Whether this function is "trivial" in some specialized C++ senses. /// Can only be true for default constructors, copy constructors, @@ -1255,9 +1435,6 @@ bool isTrivial() const { return IsTrivial; } void setTrivial(bool IT) { IsTrivial = IT; } - bool isCopyAssignment() const { return IsCopyAssignment; } - void setCopyAssignment(bool CA) { IsCopyAssignment = CA; } - /// Whether falling off this function implicitly returns null/zero. /// If a more specific implicit return value is required, front-ends /// should synthesize the appropriate return statements. @@ -1273,7 +1450,6 @@ } bool hasWrittenPrototype() const { return HasWrittenPrototype; } - void setHasWrittenPrototype(bool P) { HasWrittenPrototype = P; } /// \brief Whether this function inherited its prototype from a /// previous declaration. @@ -1343,7 +1519,9 @@ assert(i < getNumParams() && "Illegal param #"); return ParamInfo[i]; } - void setParams(ParmVarDecl **NewParamInfo, unsigned NumParams); + void setParams(ParmVarDecl **NewParamInfo, unsigned NumParams) { + setParams(getASTContext(), NewParamInfo, NumParams); + } /// getMinRequiredArguments - Returns the minimum number of arguments /// needed to call this function. This may be fewer than the number of @@ -1361,31 +1539,32 @@ } StorageClass getStorageClass() const { return StorageClass(SClass); } - void setStorageClass(StorageClass SC) { - assert(isLegalForFunction(SC)); - SClass = SC; - } + void setStorageClass(StorageClass SC); StorageClass getStorageClassAsWritten() const { return StorageClass(SClassAsWritten); } - void setStorageClassAsWritten(StorageClass SC) { - assert(isLegalForFunction(SC)); - SClassAsWritten = SC; - } /// \brief Determine whether the "inline" keyword was specified for this /// function. - bool isInlineSpecified() const { return IsInline; } + bool isInlineSpecified() const { return IsInlineSpecified; } /// Set whether the "inline" keyword was specified for this function. - void setInlineSpecified(bool I) { IsInline = I; } + void setInlineSpecified(bool I) { + IsInlineSpecified = I; + IsInline = I; + } + + /// Flag that this function is implicitly inline. + void setImplicitlyInline() { + IsInline = true; + } /// \brief Determine whether this function should be inlined, because it is /// either marked "inline" or is a member function of a C++ class that /// was defined in the class body. bool isInlined() const; - + bool isInlineDefinitionExternallyVisible() const; /// isOverloadedOperator - Whether this function declaration @@ -1432,7 +1611,9 @@ /// \brief Specify that this record is an instantiation of the /// member function FD. void setInstantiationOfMemberFunction(FunctionDecl *FD, - TemplateSpecializationKind TSK); + TemplateSpecializationKind TSK) { + setInstantiationOfMemberFunction(getASTContext(), FD, TSK); + } /// \brief Retrieves the function template that is described by this /// function declaration. @@ -1526,43 +1707,11 @@ void *InsertPos, TemplateSpecializationKind TSK = TSK_ImplicitInstantiation, const TemplateArgumentListInfo *TemplateArgsAsWritten = 0, - SourceLocation PointOfInstantiation = SourceLocation()); - - /// \brief Specify that this function declaration is actually a function - /// template specialization. - /// - /// \param Template the function template that this function template - /// specialization specializes. - /// - /// \param NumTemplateArgs number of template arguments that produced this - /// function template specialization from the template. - /// - /// \param TemplateArgs array of template arguments that produced this - /// function template specialization from the template. - /// - /// \param TSK the kind of template specialization this is. - /// - /// \param NumTemplateArgsAsWritten number of template arguments that produced - /// this function template specialization from the template. - /// - /// \param TemplateArgsAsWritten array of location info for the template - /// arguments. - /// - /// \param LAngleLoc location of left angle token. - /// - /// \param RAngleLoc location of right angle token. - /// - /// \param PointOfInstantiation point at which the function template - /// specialization was first instantiated. - void setFunctionTemplateSpecialization(FunctionTemplateDecl *Template, - unsigned NumTemplateArgs, - const TemplateArgument *TemplateArgs, - TemplateSpecializationKind TSK, - unsigned NumTemplateArgsAsWritten, - TemplateArgumentLoc *TemplateArgsAsWritten, - SourceLocation LAngleLoc, - SourceLocation RAngleLoc, - SourceLocation PointOfInstantiation); + SourceLocation PointOfInstantiation = SourceLocation()) { + setFunctionTemplateSpecialization(getASTContext(), Template, TemplateArgs, + InsertPos, TSK, TemplateArgsAsWritten, + PointOfInstantiation); + } /// \brief Specifies that this function declaration is actually a /// dependent function template specialization. @@ -1620,19 +1769,26 @@ class FieldDecl : public DeclaratorDecl { // FIXME: This can be packed into the bitfields in Decl. bool Mutable : 1; + mutable unsigned CachedFieldIndex : 31; + Expr *BitWidth; protected: FieldDecl(Kind DK, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, Expr *BW, bool Mutable) - : DeclaratorDecl(DK, DC, L, Id, T, TInfo), Mutable(Mutable), BitWidth(BW) { + : DeclaratorDecl(DK, DC, L, Id, T, TInfo), + Mutable(Mutable), CachedFieldIndex(0), BitWidth(BW) { } public: - static FieldDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L, - IdentifierInfo *Id, QualType T, + static FieldDecl *Create(const ASTContext &C, DeclContext *DC, + SourceLocation L, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, Expr *BW, bool Mutable); + /// getFieldIndex - Returns the index of this field within its record, + /// as appropriate for passing to ASTRecordLayout::getFieldOffset. + unsigned getFieldIndex() const; + /// isMutable - Determines whether this field is mutable (C++ only). bool isMutable() const { return Mutable; } @@ -1707,6 +1863,45 @@ friend class StmtIteratorBase; }; +/// IndirectFieldDecl - An instance of this class is created to represent a +/// field injected from an anonymous union/struct into the parent scope. +/// IndirectFieldDecl are always implicit. +class IndirectFieldDecl : public ValueDecl { + NamedDecl **Chaining; + unsigned ChainingSize; + + IndirectFieldDecl(DeclContext *DC, SourceLocation L, + DeclarationName N, QualType T, + NamedDecl **CH, unsigned CHS) + : ValueDecl(IndirectField, DC, L, N, T), Chaining(CH), ChainingSize(CHS) {} + +public: + static IndirectFieldDecl *Create(ASTContext &C, DeclContext *DC, + SourceLocation L, IdentifierInfo *Id, + QualType T, NamedDecl **CH, unsigned CHS); + + typedef NamedDecl * const *chain_iterator; + chain_iterator chain_begin() const { return Chaining; } + chain_iterator chain_end() const { return Chaining+ChainingSize; } + + unsigned getChainingSize() const { return ChainingSize; } + + FieldDecl *getAnonField() const { + assert(ChainingSize >= 2); + return cast(Chaining[ChainingSize - 1]); + } + + VarDecl *getVarDecl() const { + assert(ChainingSize >= 2); + return dyn_cast(*chain_begin()); + } + + // Implement isa/cast/dyncast/etc. + static bool classof(const Decl *D) { return classofKind(D->getKind()); } + static bool classof(const IndirectFieldDecl *D) { return true; } + static bool classofKind(Kind K) { return K == IndirectField; } + friend class ASTDeclReader; +}; /// TypeDecl - Represents a declaration of a type. /// @@ -1715,7 +1910,9 @@ /// this TypeDecl. It is a cache maintained by /// ASTContext::getTypedefType, ASTContext::getTagDeclType, and /// ASTContext::getTemplateTypeParmType, and TemplateTypeParmDecl. - mutable Type *TypeForDecl; + mutable const Type *TypeForDecl; + /// LocStart - The start of the source range for this declaration. + SourceLocation LocStart; friend class ASTContext; friend class DeclContext; friend class TagDecl; @@ -1723,14 +1920,23 @@ friend class TagType; protected: - TypeDecl(Kind DK, DeclContext *DC, SourceLocation L, - IdentifierInfo *Id) - : NamedDecl(DK, DC, L, Id), TypeForDecl(0) {} + TypeDecl(Kind DK, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, + SourceLocation StartL = SourceLocation()) + : NamedDecl(DK, DC, L, Id), TypeForDecl(0), LocStart(StartL) {} public: // Low-level accessor - Type *getTypeForDecl() const { return TypeForDecl; } - void setTypeForDecl(Type *TD) { TypeForDecl = TD; } + const Type *getTypeForDecl() const { return TypeForDecl; } + void setTypeForDecl(const Type *TD) { TypeForDecl = TD; } + + SourceLocation getLocStart() const { return LocStart; } + void setLocStart(SourceLocation L) { LocStart = L; } + SourceRange getSourceRange() const { + if (LocStart.isValid()) + return SourceRange(LocStart, getLocation()); + else + return SourceRange(getLocation()); + } // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } @@ -1743,9 +1949,9 @@ /// UnderlyingType - This is the type the typedef is set to. TypeSourceInfo *TInfo; - TypedefDecl(DeclContext *DC, SourceLocation L, + TypedefDecl(DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, TypeSourceInfo *TInfo) - : TypeDecl(Typedef, DC, L, Id), TInfo(TInfo) {} + : TypeDecl(Typedef, DC, IdLoc, Id, StartLoc), TInfo(TInfo) {} protected: typedef Redeclarable redeclarable_base; @@ -1761,8 +1967,8 @@ } static TypedefDecl *Create(ASTContext &C, DeclContext *DC, - SourceLocation L, IdentifierInfo *Id, - TypeSourceInfo *TInfo); + SourceLocation StartLoc, SourceLocation IdLoc, + IdentifierInfo *Id, TypeSourceInfo *TInfo); TypeSourceInfo *getTypeSourceInfo() const { return TInfo; @@ -1789,8 +1995,6 @@ static bool classofKind(Kind K) { return K == Typedef; } }; -class TypedefDecl; - /// TagDecl - Represents the declaration of a struct/union/class/enum. class TagDecl : public TypeDecl, public DeclContext, public Redeclarable { @@ -1820,8 +2024,20 @@ unsigned NumPositiveBits : 8; unsigned NumNegativeBits : 8; + /// IsScoped - True if this tag declaration is a scoped enumeration. Only + /// possible in C++0x mode. + bool IsScoped : 1; + /// IsScopedUsingClassTag - If this tag declaration is a scoped enum, + /// then this is true if the scoped enum was declared using the class + /// tag, false if it was declared with the struct tag. No meaning is + /// associated if this tag declaration is not a scoped enum. + bool IsScopedUsingClassTag : 1; + + /// IsFixed - True if this is an enumeration with fixed underlying type. Only + /// possible in C++0x mode. + bool IsFixed : 1; + private: - SourceLocation TagKeywordLoc; SourceLocation RBraceLoc; // A struct representing syntactic qualifier info, @@ -1844,8 +2060,8 @@ protected: TagDecl(Kind DK, TagKind TK, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, - TagDecl *PrevDecl, SourceLocation TKL = SourceLocation()) - : TypeDecl(DK, DC, L, Id), DeclContext(DK), TagKeywordLoc(TKL), + TagDecl *PrevDecl, SourceLocation StartL) + : TypeDecl(DK, DC, L, Id, StartL), DeclContext(DK), TypedefDeclOrQualifier((TypedefDecl*) 0) { assert((DK != Enum || TK == TTK_Enum) && "EnumDecl not matched with TTK_Enum"); @@ -1859,6 +2075,11 @@ typedef Redeclarable redeclarable_base; virtual TagDecl *getNextRedeclaration() { return RedeclLink.getNext(); } + /// @brief Completes the definition of this tag declaration. + /// + /// This is a helper function for derived classes. + void completeDefinition(); + public: typedef redeclarable_base::redecl_iterator redecl_iterator; redecl_iterator redecls_begin() const { @@ -1871,12 +2092,9 @@ SourceLocation getRBraceLoc() const { return RBraceLoc; } void setRBraceLoc(SourceLocation L) { RBraceLoc = L; } - SourceLocation getTagKeywordLoc() const { return TagKeywordLoc; } - void setTagKeywordLoc(SourceLocation TKL) { TagKeywordLoc = TKL; } - /// getInnerLocStart - Return SourceLocation representing start of source /// range ignoring outer template declarations. - virtual SourceLocation getInnerLocStart() const { return TagKeywordLoc; } + virtual SourceLocation getInnerLocStart() const { return getLocStart(); } /// getOuterLocStart - Return SourceLocation representing start of source /// range taking into account any outer template declarations. @@ -1923,9 +2141,6 @@ /// where it is in the process of being defined. void startDefinition(); - /// @brief Completes the definition of this tag declaration. - void completeDefinition(); - /// getDefinition - Returns the TagDecl that actually defines this /// struct/union/class/enum. When determining whether or not a /// struct/union/class/enum is completely defined, one should use this method @@ -1958,14 +2173,22 @@ void setTypedefForAnonDecl(TypedefDecl *TDD); + /// \brief Retrieve the nested-name-specifier that qualifies the name of this + /// declaration, if it was present in the source. NestedNameSpecifier *getQualifier() const { - return hasExtInfo() ? getExtInfo()->NNS : 0; + return hasExtInfo() ? getExtInfo()->QualifierLoc.getNestedNameSpecifier() + : 0; } - SourceRange getQualifierRange() const { - return hasExtInfo() ? getExtInfo()->NNSRange : SourceRange(); + + /// \brief Retrieve the nested-name-specifier (with source-location + /// information) that qualifies the name of this declaration, if it was + /// present in the source. + NestedNameSpecifierLoc getQualifierLoc() const { + return hasExtInfo() ? getExtInfo()->QualifierLoc + : NestedNameSpecifierLoc(); } - void setQualifierInfo(NestedNameSpecifier *Qualifier, - SourceRange QualifierRange); + + void setQualifierInfo(NestedNameSpecifierLoc QualifierLoc); unsigned getNumTemplateParameterLists() const { return hasExtInfo() ? getExtInfo()->NumTemplParamLists : 0; @@ -2001,7 +2224,19 @@ /// IntegerType - This represent the integer type that the enum corresponds /// to for code generation purposes. Note that the enumerator constants may /// have a different type than this does. - QualType IntegerType; + /// + /// If the underlying integer type was explicitly stated in the source + /// code, this is a TypeSourceInfo* for that type. Otherwise this type + /// was automatically deduced somehow, and this is a Type*. + /// + /// Normally if IsFixed(), this would contain a TypeSourceInfo*, but in + /// some cases it won't. + /// + /// The underlying type of an enumeration never has any qualifiers, so + /// we can get away with just storing a raw Type*, and thus save an + /// extra pointer when TypeSourceInfo is needed. + + llvm::PointerUnion IntegerType; /// PromotionType - The integer type that values of this type should /// promote to. In C, enumerators are generally of an integer type @@ -2022,12 +2257,18 @@ }; EnumDecl(DeclContext *DC, SourceLocation L, - IdentifierInfo *Id, EnumDecl *PrevDecl, SourceLocation TKL) - : TagDecl(Enum, TTK_Enum, DC, L, Id, PrevDecl, TKL), InstantiatedFrom(0) { - IntegerType = QualType(); - NumNegativeBits = 0; - NumPositiveBits = 0; - } + IdentifierInfo *Id, EnumDecl *PrevDecl, SourceLocation StartL, + bool Scoped, bool ScopedUsingClassTag, bool Fixed) + : TagDecl(Enum, TTK_Enum, DC, L, Id, PrevDecl, StartL), + InstantiatedFrom(0) { + assert(Scoped || !ScopedUsingClassTag); + IntegerType = (const Type*)0; + NumNegativeBits = 0; + NumPositiveBits = 0; + IsScoped = Scoped; + IsScopedUsingClassTag = ScopedUsingClassTag; + IsFixed = Fixed; + } public: EnumDecl *getCanonicalDecl() { return cast(TagDecl::getCanonicalDecl()); @@ -2045,7 +2286,9 @@ static EnumDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, - SourceLocation TKL, EnumDecl *PrevDecl); + SourceLocation StartL, EnumDecl *PrevDecl, + bool IsScoped, bool IsScopedUsingClassTag, + bool IsFixed); static EnumDecl *Create(ASTContext &C, EmptyShell Empty); /// completeDefinition - When created, the EnumDecl corresponds to a @@ -2085,10 +2328,25 @@ /// getIntegerType - Return the integer type this enum decl corresponds to. /// This returns a null qualtype for an enum forward definition. - QualType getIntegerType() const { return IntegerType; } + QualType getIntegerType() const { + if (!IntegerType) + return QualType(); + if (const Type* T = IntegerType.dyn_cast()) + return QualType(T, 0); + return IntegerType.get()->getType(); + } /// \brief Set the underlying integer type. - void setIntegerType(QualType T) { IntegerType = T; } + void setIntegerType(QualType T) { IntegerType = T.getTypePtrOrNull(); } + + /// \brief Set the underlying integer type source info. + void setIntegerTypeSourceInfo(TypeSourceInfo* TInfo) { IntegerType = TInfo; } + + /// \brief Return the type source info for the underlying integer type, + /// if no type source info exists, return 0. + TypeSourceInfo* getIntegerTypeSourceInfo() const { + return IntegerType.dyn_cast(); + } /// \brief Returns the width in bits requred to store all the /// non-negative enumerators of this enum. @@ -2116,6 +2374,27 @@ NumNegativeBits = Num; } + /// \brief Returns true if this is a C++0x scoped enumeration. + bool isScoped() const { + return IsScoped; + } + + /// \brief Returns true if this is a C++0x scoped enumeration. + bool isScopedUsingClassTag() const { + return IsScopedUsingClassTag; + } + + /// \brief Returns true if this is a C++0x enumeration with fixed underlying + /// type. + bool isFixed() const { + return IsFixed; + } + + /// \brief Returns true if this can be considered a complete type. + bool isComplete() const { + return isDefinition() || isFixed(); + } + /// \brief Returns the enumeration (declared within the template) /// from which this enumeration type was instantiated, or NULL if /// this enumeration was not instantiated from any template. @@ -2128,6 +2407,8 @@ static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const EnumDecl *D) { return true; } static bool classofKind(Kind K) { return K == Enum; } + + friend class ASTDeclReader; }; @@ -2151,17 +2432,24 @@ /// containing an object. bool HasObjectMember : 1; + /// \brief Whether the field declarations of this record have been loaded + /// from external storage. To avoid unnecessary deserialization of + /// methods/nested types we allow deserialization of just the fields + /// when needed. + mutable bool LoadedFieldsFromExternalStorage : 1; + friend class DeclContext; + protected: RecordDecl(Kind DK, TagKind TK, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, - RecordDecl *PrevDecl, SourceLocation TKL); + RecordDecl *PrevDecl, SourceLocation StartL); public: - static RecordDecl *Create(ASTContext &C, TagKind TK, DeclContext *DC, + static RecordDecl *Create(const ASTContext &C, TagKind TK, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, - SourceLocation TKL = SourceLocation(), + SourceLocation StartL = SourceLocation(), RecordDecl* PrevDecl = 0); - static RecordDecl *Create(ASTContext &C, EmptyShell Empty); + static RecordDecl *Create(const ASTContext &C, EmptyShell Empty); const RecordDecl *getPreviousDeclaration() const { return cast_or_null(TagDecl::getPreviousDeclaration()); @@ -2190,11 +2478,6 @@ AnonymousStructOrUnion = Anon; } - ValueDecl *getAnonymousStructOrUnionObject(); - const ValueDecl *getAnonymousStructOrUnionObject() const { - return const_cast(this)->getAnonymousStructOrUnionObject(); - } - bool hasObjectMember() const { return HasObjectMember; } void setHasObjectMember (bool val) { HasObjectMember = val; } @@ -2229,11 +2512,10 @@ // data members, functions, constructors, destructors, etc. typedef specific_decl_iterator field_iterator; - field_iterator field_begin() const { - return field_iterator(decls_begin()); - } + field_iterator field_begin() const; + field_iterator field_end() const { - return field_iterator(decls_end()); + return field_iterator(decl_iterator()); } // field_empty - Whether there are any fields (non-static data @@ -2244,22 +2526,36 @@ /// completeDefinition - Notes that the definition of this type is /// now complete. - void completeDefinition(); + virtual void completeDefinition(); static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const RecordDecl *D) { return true; } static bool classofKind(Kind K) { return K >= firstRecord && K <= lastRecord; } + +private: + /// \brief Deserialize just the fields. + void LoadFieldsFromExternalStorage() const; }; class FileScopeAsmDecl : public Decl { StringLiteral *AsmString; - FileScopeAsmDecl(DeclContext *DC, SourceLocation L, StringLiteral *asmstring) - : Decl(FileScopeAsm, DC, L), AsmString(asmstring) {} + SourceLocation RParenLoc; + FileScopeAsmDecl(DeclContext *DC, StringLiteral *asmstring, + SourceLocation StartL, SourceLocation EndL) + : Decl(FileScopeAsm, DC, StartL), AsmString(asmstring), RParenLoc(EndL) {} public: static FileScopeAsmDecl *Create(ASTContext &C, DeclContext *DC, - SourceLocation L, StringLiteral *Str); + StringLiteral *Str, SourceLocation AsmLoc, + SourceLocation RParenLoc); + + SourceLocation getAsmLoc() const { return getLocation(); } + SourceLocation getRParenLoc() const { return RParenLoc; } + void setRParenLoc(SourceLocation L) { RParenLoc = L; } + SourceRange getSourceRange() const { + return SourceRange(getAsmLoc(), getRParenLoc()); + } const StringLiteral *getAsmString() const { return AsmString; } StringLiteral *getAsmString() { return AsmString; } @@ -2275,8 +2571,49 @@ /// ^{ statement-body } or ^(int arg1, float arg2){ statement-body } /// class BlockDecl : public Decl, public DeclContext { +public: + /// A class which contains all the information about a particular + /// captured value. + class Capture { + enum { + flag_isByRef = 0x1, + flag_isNested = 0x2 + }; + + /// The variable being captured. + llvm::PointerIntPair VariableAndFlags; + + /// The copy expression, expressed in terms of a DeclRef (or + /// BlockDeclRef) to the captured variable. Only required if the + /// variable has a C++ class type. + Expr *CopyExpr; + + public: + Capture(VarDecl *variable, bool byRef, bool nested, Expr *copy) + : VariableAndFlags(variable, + (byRef ? flag_isByRef : 0) | (nested ? flag_isNested : 0)), + CopyExpr(copy) {} + + /// The variable being captured. + VarDecl *getVariable() const { return VariableAndFlags.getPointer(); } + + /// Whether this is a "by ref" capture, i.e. a capture of a __block + /// variable. + bool isByRef() const { return VariableAndFlags.getInt() & flag_isByRef; } + + /// Whether this is a nested capture, i.e. the variable captured + /// is not from outside the immediately enclosing function/block. + bool isNested() const { return VariableAndFlags.getInt() & flag_isNested; } + + bool hasCopyExpr() const { return CopyExpr != 0; } + Expr *getCopyExpr() const { return CopyExpr; } + void setCopyExpr(Expr *e) { CopyExpr = e; } + }; + +private: // FIXME: This can be packed into the bitfields in Decl. bool IsVariadic : 1; + bool CapturesCXXThis : 1; /// ParamInfo - new[]'d array of pointers to ParmVarDecls for the formal /// parameters of this function. This is null if a prototype or if there are /// no formals. @@ -2286,11 +2623,15 @@ Stmt *Body; TypeSourceInfo *SignatureAsWritten; + Capture *Captures; + unsigned NumCaptures; + protected: BlockDecl(DeclContext *DC, SourceLocation CaretLoc) : Decl(Block, DC, CaretLoc), DeclContext(Block), - IsVariadic(false), ParamInfo(0), NumParams(0), Body(0), - SignatureAsWritten(0) {} + IsVariadic(false), CapturesCXXThis(false), + ParamInfo(0), NumParams(0), Body(0), + SignatureAsWritten(0), Captures(0), NumCaptures(0) {} public: static BlockDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L); @@ -2319,7 +2660,7 @@ param_const_iterator param_begin() const { return ParamInfo; } param_const_iterator param_end() const { return ParamInfo+param_size(); } - unsigned getNumParams() const; + unsigned getNumParams() const { return NumParams; } const ParmVarDecl *getParamDecl(unsigned i) const { assert(i < getNumParams() && "Illegal param #"); return ParamInfo[i]; @@ -2330,6 +2671,30 @@ } void setParams(ParmVarDecl **NewParamInfo, unsigned NumParams); + /// hasCaptures - True if this block (or its nested blocks) captures + /// anything of local storage from its enclosing scopes. + bool hasCaptures() const { return NumCaptures != 0 || CapturesCXXThis; } + + /// getNumCaptures - Returns the number of captured variables. + /// Does not include an entry for 'this'. + unsigned getNumCaptures() const { return NumCaptures; } + + typedef const Capture *capture_iterator; + typedef const Capture *capture_const_iterator; + capture_iterator capture_begin() { return Captures; } + capture_iterator capture_end() { return Captures + NumCaptures; } + capture_const_iterator capture_begin() const { return Captures; } + capture_const_iterator capture_end() const { return Captures + NumCaptures; } + + bool capturesCXXThis() const { return CapturesCXXThis; } + + void setCaptures(ASTContext &Context, + const Capture *begin, + const Capture *end, + bool capturesCXXThis); + + virtual SourceRange getSourceRange() const; + // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const BlockDecl *D) { return true; } @@ -2350,6 +2715,32 @@ return DB; } +template +void Redeclarable::setPreviousDeclaration(decl_type *PrevDecl) { + // Note: This routine is implemented here because we need both NamedDecl + // and Redeclarable to be defined. + + decl_type *First; + + if (PrevDecl) { + // Point to previous. Make sure that this is actually the most recent + // redeclaration, or we can build invalid chains. If the most recent + // redeclaration is invalid, it won't be PrevDecl, but we want it anyway. + RedeclLink = PreviousDeclLink(llvm::cast( + PrevDecl->getMostRecentDeclaration())); + First = PrevDecl->getFirstDeclaration(); + assert(First->RedeclLink.NextIsLatest() && "Expected first"); + } else { + // Make this first. + First = static_cast(this); + } + + // First one will point to this one as latest. + First->RedeclLink = LatestDeclLink(static_cast(this)); + if (NamedDecl *ND = dyn_cast(static_cast(this))) + ND->ClearLinkageCache(); +} + } // end namespace clang #endif diff -Nru clang-2.8/tools/clang/include/clang/AST/DeclObjC.h clang-2.9/tools/clang/include/clang/AST/DeclObjC.h --- clang-2.8/tools/clang/include/clang/AST/DeclObjC.h 2010-09-01 01:21:15.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/AST/DeclObjC.h 2011-03-02 01:50:55.000000000 +0000 @@ -28,7 +28,7 @@ class ObjCCategoryDecl; class ObjCPropertyDecl; class ObjCPropertyImplDecl; -class CXXBaseOrMemberInitializer; +class CXXCtorInitializer; class ObjCListBase { void operator=(const ObjCListBase &); // DO NOT IMPLEMENT @@ -112,17 +112,20 @@ public: enum ImplementationControl { None, Required, Optional }; private: - /// Bitfields must be first fields in this class so they pack with those - /// declared in class Decl. + // The conventional meaning of this method; an ObjCMethodFamily. + // This is not serialized; instead, it is computed on demand and + // cached. + mutable unsigned Family : ObjCMethodFamilyBitWidth; + /// instance (true) or class (false) method. - bool IsInstance : 1; - bool IsVariadic : 1; + unsigned IsInstance : 1; + unsigned IsVariadic : 1; // Synthesized declaration method for a property setter/getter - bool IsSynthesized : 1; + unsigned IsSynthesized : 1; // Method has a definition. - bool IsDefined : 1; + unsigned IsDefined : 1; // NOTE: VC++ treats enums as signed, avoid using ImplementationControl enum /// @required/@optional @@ -170,7 +173,7 @@ ImplementationControl impControl = None, unsigned numSelectorArgs = 0) : NamedDecl(ObjCMethod, contextDecl, beginLoc, SelInfo), - DeclContext(ObjCMethod), + DeclContext(ObjCMethod), Family(InvalidObjCMethodFamily), IsInstance(isInstance), IsVariadic(isVariadic), IsSynthesized(isSynthesized), IsDefined(isDefined), @@ -279,6 +282,9 @@ ImplicitParamDecl * getCmdDecl() const { return CmdDecl; } void setCmdDecl(ImplicitParamDecl *CD) { CmdDecl = CD; } + /// Determines the family of this method. + ObjCMethodFamily getMethodFamily() const; + bool isInstanceMethod() const { return IsInstance; } void setInstanceMethod(bool isInst) { IsInstance = isInst; } bool isVariadic() const { return IsVariadic; } @@ -437,7 +443,7 @@ class ObjCInterfaceDecl : public ObjCContainerDecl { /// TypeForDecl - This indicates the Type object that represents this /// TypeDecl. It is a cache maintained by ASTContext::getObjCInterfaceType - mutable Type *TypeForDecl; + mutable const Type *TypeForDecl; friend class ASTContext; /// Class's super class. @@ -449,8 +455,11 @@ /// Protocols reference in both the @interface and class extensions. ObjCList AllReferencedProtocols; - /// List of categories defined for this class. - /// FIXME: Why is this a linked list?? + /// \brief List of categories and class extensions defined for this class. + /// + /// Categories are stored as a linked list in the AST, since the categories + /// and class extensions come long after the initial interface declaration, + /// and we avoid dynamically-resized arrays in the AST whereever possible. ObjCCategoryDecl *CategoryList; /// IvarList - List of all ivars defined by this class; including class @@ -459,7 +468,11 @@ bool ForwardDecl:1; // declared with @class. bool InternalInterface:1; // true - no @interface for @implementation - + + /// \brief Indicates that the contents of this Objective-C class will be + /// completed by the external AST source when required. + mutable bool ExternallyCompleted : 1; + SourceLocation ClassLoc; // location of the class identifier. SourceLocation SuperClassLoc; // location of the super class identifier. SourceLocation EndLoc; // marks the '>', '}', or identifier. @@ -467,6 +480,7 @@ ObjCInterfaceDecl(DeclContext *DC, SourceLocation atLoc, IdentifierInfo *Id, SourceLocation CLoc, bool FD, bool isInternal); + void LoadExternalDefinition() const; public: static ObjCInterfaceDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation atLoc, @@ -474,7 +488,16 @@ SourceLocation ClassLoc = SourceLocation(), bool ForwardDecl = false, bool isInternal = false); + + /// \brief Indicate that this Objective-C class is complete, but that + /// the external AST source will be responsible for filling in its contents + /// when a complete class is required. + void setExternallyCompleted(); + const ObjCProtocolList &getReferencedProtocols() const { + if (ExternallyCompleted) + LoadExternalDefinition(); + return ReferencedProtocols; } @@ -494,29 +517,47 @@ typedef ObjCProtocolList::iterator protocol_iterator; protocol_iterator protocol_begin() const { + if (ExternallyCompleted) + LoadExternalDefinition(); + return ReferencedProtocols.begin(); } protocol_iterator protocol_end() const { + if (ExternallyCompleted) + LoadExternalDefinition(); + return ReferencedProtocols.end(); } typedef ObjCProtocolList::loc_iterator protocol_loc_iterator; protocol_loc_iterator protocol_loc_begin() const { + if (ExternallyCompleted) + LoadExternalDefinition(); + return ReferencedProtocols.loc_begin(); } protocol_loc_iterator protocol_loc_end() const { + if (ExternallyCompleted) + LoadExternalDefinition(); + return ReferencedProtocols.loc_end(); } typedef ObjCList::iterator all_protocol_iterator; all_protocol_iterator all_referenced_protocol_begin() const { + if (ExternallyCompleted) + LoadExternalDefinition(); + return AllReferencedProtocols.empty() ? protocol_begin() : AllReferencedProtocols.begin(); } all_protocol_iterator all_referenced_protocol_end() const { + if (ExternallyCompleted) + LoadExternalDefinition(); + return AllReferencedProtocols.empty() ? protocol_end() : AllReferencedProtocols.end(); } @@ -551,10 +592,22 @@ bool isForwardDecl() const { return ForwardDecl; } void setForwardDecl(bool val) { ForwardDecl = val; } - ObjCInterfaceDecl *getSuperClass() const { return SuperClass; } + ObjCInterfaceDecl *getSuperClass() const { + if (ExternallyCompleted) + LoadExternalDefinition(); + + return SuperClass; + } + void setSuperClass(ObjCInterfaceDecl * superCls) { SuperClass = superCls; } - ObjCCategoryDecl* getCategoryList() const { return CategoryList; } + ObjCCategoryDecl* getCategoryList() const { + if (ExternallyCompleted) + LoadExternalDefinition(); + + return CategoryList; + } + void setCategoryList(ObjCCategoryDecl *category) { CategoryList = category; } @@ -595,7 +648,7 @@ ObjCInterfaceDecl *lookupInheritedClass(const IdentifierInfo *ICName); // Lookup a method in the classes implementation hierarchy. - ObjCMethodDecl *lookupPrivateInstanceMethod(const Selector &Sel); + ObjCMethodDecl *lookupPrivateMethod(const Selector &Sel, bool Instance=true); // Location information, modeled after the Stmt API. SourceLocation getLocStart() const { return getLocation(); } // '@'interface @@ -621,8 +674,8 @@ bool RHSIsQualifiedID = false); // Low-level accessor - Type *getTypeForDecl() const { return TypeForDecl; } - void setTypeForDecl(Type *TD) const { TypeForDecl = TD; } + const Type *getTypeForDecl() const { return TypeForDecl; } + void setTypeForDecl(const Type *TD) const { TypeForDecl = TD; } static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const ObjCInterfaceDecl *D) { return true; } @@ -991,6 +1044,7 @@ void insertNextClassCategory() { NextClassCategory = ClassInterface->getCategoryList(); ClassInterface->setCategoryList(this); + ClassInterface->setChangedSinceDeserialization(true); } bool IsClassExtension() const { return getIdentifier() == 0; } @@ -1168,7 +1222,7 @@ ObjCInterfaceDecl *SuperClass; /// Support for ivar initialization. /// IvarInitializers - The arguments used to initialize the ivars - CXXBaseOrMemberInitializer **IvarInitializers; + CXXCtorInitializer **IvarInitializers; unsigned NumIvarInitializers; /// true of class extension has at least one bitfield ivar. @@ -1187,10 +1241,10 @@ ObjCInterfaceDecl *superDecl); /// init_iterator - Iterates through the ivar initializer list. - typedef CXXBaseOrMemberInitializer **init_iterator; + typedef CXXCtorInitializer **init_iterator; /// init_const_iterator - Iterates through the ivar initializer list. - typedef CXXBaseOrMemberInitializer * const * init_const_iterator; + typedef CXXCtorInitializer * const * init_const_iterator; /// init_begin() - Retrieve an iterator to the first initializer. init_iterator init_begin() { return IvarInitializers; } @@ -1215,7 +1269,7 @@ } void setIvarInitializers(ASTContext &C, - CXXBaseOrMemberInitializer ** initializers, + CXXCtorInitializer ** initializers, unsigned numInitializers); bool hasSynthBitfield() const { return HasSynthBitfield; } @@ -1322,7 +1376,8 @@ OBJC_PR_retain = 0x10, OBJC_PR_copy = 0x20, OBJC_PR_nonatomic = 0x40, - OBJC_PR_setter = 0x80 + OBJC_PR_setter = 0x80, + OBJC_PR_atomic = 0x100 }; enum SetterKind { Assign, Retain, Copy }; @@ -1330,8 +1385,8 @@ private: SourceLocation AtLoc; // location of @property TypeSourceInfo *DeclType; - unsigned PropertyAttributes : 8; - unsigned PropertyAttributesAsWritten : 8; + unsigned PropertyAttributes : 9; + unsigned PropertyAttributesAsWritten : 9; // @required/@optional unsigned PropertyImplementation : 2; @@ -1429,6 +1484,10 @@ return PropertyIvarDecl; } + virtual SourceRange getSourceRange() const { + return SourceRange(AtLoc, getLocation()); + } + /// Lookup a property by name in the specified DeclContext. static ObjCPropertyDecl *findPropertyDecl(const DeclContext *DC, IdentifierInfo *propertyID); @@ -1450,6 +1509,15 @@ }; private: SourceLocation AtLoc; // location of @synthesize or @dynamic + + /// \brief For @synthesize, the location of the ivar, if it was written in + /// the source code. + /// + /// \code + /// @synthesize int a = b + /// \endcode + SourceLocation IvarLoc; + /// Property declaration being implemented ObjCPropertyDecl *PropertyDecl; @@ -1466,9 +1534,10 @@ ObjCPropertyImplDecl(DeclContext *DC, SourceLocation atLoc, SourceLocation L, ObjCPropertyDecl *property, Kind PK, - ObjCIvarDecl *ivarDecl) + ObjCIvarDecl *ivarDecl, + SourceLocation ivarLoc) : Decl(ObjCPropertyImpl, DC, L), AtLoc(atLoc), - PropertyDecl(property), PropertyIvarDecl(ivarDecl), + IvarLoc(ivarLoc), PropertyDecl(property), PropertyIvarDecl(ivarDecl), GetterCXXConstructor(0), SetterCXXAssignment(0) { assert (PK == Dynamic || PropertyIvarDecl); } @@ -1478,11 +1547,11 @@ SourceLocation atLoc, SourceLocation L, ObjCPropertyDecl *property, Kind PK, - ObjCIvarDecl *ivarDecl); + ObjCIvarDecl *ivarDecl, + SourceLocation ivarLoc); - virtual SourceRange getSourceRange() const { - return SourceRange(AtLoc, getLocation()); - } + virtual SourceRange getSourceRange() const; + SourceLocation getLocStart() const { return AtLoc; } void setAtLoc(SourceLocation Loc) { AtLoc = Loc; } @@ -1498,7 +1567,13 @@ ObjCIvarDecl *getPropertyIvarDecl() const { return PropertyIvarDecl; } - void setPropertyIvarDecl(ObjCIvarDecl *Ivar) { PropertyIvarDecl = Ivar; } + SourceLocation getPropertyIvarDeclLoc() const { return IvarLoc; } + + void setPropertyIvarDecl(ObjCIvarDecl *Ivar, + SourceLocation IvarLoc) { + PropertyIvarDecl = Ivar; + this->IvarLoc = IvarLoc; + } Expr *getGetterCXXConstructor() const { return GetterCXXConstructor; @@ -1517,6 +1592,8 @@ static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const ObjCPropertyImplDecl *D) { return true; } static bool classofKind(Decl::Kind K) { return K == ObjCPropertyImpl; } + + friend class ASTDeclReader; }; } // end namespace clang diff -Nru clang-2.8/tools/clang/include/clang/AST/DeclTemplate.h clang-2.9/tools/clang/include/clang/AST/DeclTemplate.h --- clang-2.8/tools/clang/include/clang/AST/DeclTemplate.h 2010-09-02 00:07:54.000000000 +0000 +++ clang-2.9/tools/clang/include/clang/AST/DeclTemplate.h 2011-03-06 15:48:19.000000000 +0000 @@ -48,12 +48,13 @@ /// parameter list. unsigned NumParams; +protected: TemplateParameterList(SourceLocation TemplateLoc, SourceLocation LAngleLoc, NamedDecl **Params, unsigned NumParams, SourceLocation RAngleLoc); public: - static TemplateParameterList *Create(ASTContext &C, + static TemplateParameterList *Create(const ASTContext &C, SourceLocation TemplateLoc, SourceLocation LAngleLoc, NamedDecl **Params, @@ -85,7 +86,7 @@ return begin()[Idx]; } - /// \btief Returns the minimum number of arguments needed to form a + /// \brief Returns the minimum number of arguments needed to form a /// template specialization. This may be fewer than the number of /// template parameters, if some of the parameters have default /// arguments or if there is a parameter pack. @@ -107,101 +108,70 @@ } }; -/// \brief A helper class for making template argument lists. -class TemplateArgumentListBuilder { - TemplateArgument *StructuredArgs; - unsigned MaxStructuredArgs; - unsigned NumStructuredArgs; - - llvm::SmallVector FlatArgs; - unsigned MaxFlatArgs; - unsigned NumFlatArgs; - - bool AddingToPack; - unsigned PackBeginIndex; +/// FixedSizeTemplateParameterList - Stores a list of template parameters for a +/// TemplateDecl and its derived classes. Suitable for creating on the stack. +template +class FixedSizeTemplateParameterList : public TemplateParameterList { + NamedDecl *Params[N]; public: - TemplateArgumentListBuilder(const TemplateParameterList *Parameters, - unsigned NumTemplateArgs) - : StructuredArgs(0), MaxStructuredArgs(Parameters->size()), - NumStructuredArgs(0), FlatArgs(0), - MaxFlatArgs(std::max(MaxStructuredArgs, NumTemplateArgs)), NumFlatArgs(0), - AddingToPack(false), PackBeginIndex(0) { } - - void Append(const TemplateArgument &Arg); - void BeginPack(); - void EndPack(); - - unsigned flatSize() const { return FlatArgs.size(); } - const TemplateArgument *getFlatArguments() const { return FlatArgs.data(); } - - unsigned structuredSize() const { - // If we don't have any structured args, just reuse the flat size. - if (!StructuredArgs) - return flatSize(); - - return NumStructuredArgs; - } - const TemplateArgument *getStructuredArguments() const { - // If we don't have any structured args, just reuse the flat args. - if (!StructuredArgs) - return getFlatArguments(); - - return StructuredArgs; + FixedSizeTemplateParameterList(SourceLocation TemplateLoc, SourceLocation LAngleLoc, + NamedDecl **Params, SourceLocation RAngleLoc) : + TemplateParameterList(TemplateLoc, LAngleLoc, Params, N, RAngleLoc) { } }; /// \brief A template argument list. -/// -/// FIXME: In the future, this class will be extended to support -/// variadic templates and member templates, which will make some of -/// the function names below make more sense. class TemplateArgumentList { /// \brief The template argument list. /// /// The integer value will be non-zero to indicate that this /// template argument list does own the pointer. - llvm::PointerIntPair FlatArguments; + llvm::PointerIntPair Arguments; /// \brief The number of template arguments in this template /// argument list. - unsigned NumFlatArguments; - - llvm::PointerIntPair StructuredArguments; - unsigned NumStructuredArguments; + unsigned NumArguments; TemplateArgumentList(const TemplateArgumentList &Other); // DO NOT IMPL void operator=(const TemplateArgumentList &Other); // DO NOT IMPL + + TemplateArgumentList(const TemplateArgument *Args, unsigned NumArgs, + bool Owned) + : Arguments(Args, Owned), NumArguments(NumArgs) { } + public: - /// TemplateArgumentList - If this constructor is passed "true" for 'TakeArgs' - /// it copies them into a locally new[]'d array. If passed "false", then it - /// just references the array passed in. This is only safe if the builder - /// outlives it, but saves a copy. - TemplateArgumentList(ASTContext &Context, - TemplateArgumentListBuilder &Builder, - bool TakeArgs); - - /// TemplateArgumentList - It copies the template arguments into a locally - /// new[]'d array. - TemplateArgumentList(ASTContext &Context, - const TemplateArgument *Args, unsigned NumArgs); - - /// Produces a shallow copy of the given template argument list. This - /// assumes that the input argument list outlives it. This takes the list as - /// a pointer to avoid looking like a copy constructor, since this really - /// really isn't safe to use that way. - explicit TemplateArgumentList(const TemplateArgumentList *Other); - - TemplateArgumentList() : NumFlatArguments(0), NumStructuredArguments(0) { } - - /// \brief Copies the template arguments into a locally new[]'d array. - void init(ASTContext &Context, - const TemplateArgument *Args, unsigned NumArgs); + /// \brief Type used to indicate that the template argument list itself is a + /// stack object. It does not own its template arguments. + enum OnStackType { OnStack }; + + /// \brief Create a new template argument list that copies the given set of + /// template arguments. + static TemplateArgumentList *CreateCopy(ASTContext &Context, + const TemplateArgument *Args, + unsigned NumArgs); + + /// \brief Construct a new, temporary template argument list on the stack. + /// + /// The template argument list does not own the template arguments + /// provided. + explicit TemplateArgumentList(OnStackType, + const TemplateArgument *Args, unsigned NumArgs) + : Arguments(Args, false), NumArguments(NumArgs) { } + + /// \brief Produces a shallow copy of the given template argument list. + /// + /// This operation assumes that the input argument list outlives it. + /// This takes the list as a pointer to avoid looking like a copy + /// constructor, since this really really isn't safe to use that + /// way. + explicit TemplateArgumentList(const TemplateArgumentList *Other) + : Arguments(Other->data(), false), NumArguments(Other->size()) { } /// \brief Retrieve the template argument at a given index. const TemplateArgument &get(unsigned Idx) const { - assert(Idx < NumFlatArguments && "Invalid template argument index"); - return getFlatArgumentList()[Idx]; + assert(Idx < NumArguments && "Invalid template argument index"); + return data()[Idx]; } /// \brief Retrieve the template argument at a given index. @@ -209,15 +179,11 @@ /// \brief Retrieve the number of template arguments in this /// template argument list. - unsigned size() const { return NumFlatArguments; } + unsigned size() const { return NumArguments; } - /// \brief Retrieve the number of template arguments in the - /// flattened template argument list. - unsigned flat_size() const { return NumFlatArguments; } - - /// \brief Retrieve the flattened template argument list. - const TemplateArgument *getFlatArgumentList() const { - return FlatArguments.getPointer(); + /// \brief Retrieve a pointer to the template argument list. + const TemplateArgument *data() const { + return Arguments.getPointer(); } }; @@ -292,7 +258,31 @@ /// which is a FunctionDecl that has been explicitly specialization or /// instantiated from a function template. class FunctionTemplateSpecializationInfo : public llvm::FoldingSetNode { + FunctionTemplateSpecializationInfo(FunctionDecl *FD, + FunctionTemplateDecl *Template, + TemplateSpecializationKind TSK, + const TemplateArgumentList *TemplateArgs, + const TemplateArgumentListInfo *TemplateArgsAsWritten, + SourceLocation POI) + : Function(FD), + Template(Template, TSK - 1), + TemplateArguments(TemplateArgs), + TemplateArgumentsAsWritten(TemplateArgsAsWritten), + PointOfInstantiation(POI) { } + public: + static FunctionTemplateSpecializationInfo * + Create(ASTContext &C, FunctionDecl *FD, FunctionTemplateDecl *Template, + TemplateSpecializationKind TSK, + const TemplateArgumentList *TemplateArgs, + const TemplateArgumentListInfo *TemplateArgsAsWritten, + SourceLocation POI) { + return new (C) FunctionTemplateSpecializationInfo(FD, Template, TSK, + TemplateArgs, + TemplateArgsAsWritten, + POI); + } + /// \brief The function template specialization that this structure /// describes. FunctionDecl *Function; @@ -345,8 +335,8 @@ } void Profile(llvm::FoldingSetNodeID &ID) { - Profile(ID, TemplateArguments->getFlatArgumentList(), - TemplateArguments->flat_size(), + Profile(ID, TemplateArguments->data(), + TemplateArguments->size(), Function->getASTContext()); } @@ -441,11 +431,6 @@ return reinterpret_cast(this+1); } - const TemplateArgumentLoc *getTemplateArgs() const { - return reinterpret_cast( - &getTemplates()[getNumTemplates()]); - } - public: DependentFunctionTemplateSpecializationInfo( const UnresolvedSetImpl &Templates, @@ -463,6 +448,12 @@ return getTemplates()[I]; } + /// \brief Returns the explicit template arguments that were given. + const TemplateArgumentLoc *getTemplateArgs() const { + return reinterpret_cast( + &getTemplates()[getNumTemplates()]); + } + /// \brief Returns the number of explicit template arguments that were given. unsigned getNumTemplateArgs() const { return d.NumArgs; @@ -584,7 +575,7 @@ /// for the common pointer. CommonBase *getCommonPtr(); - virtual CommonBase *newCommon() = 0; + virtual CommonBase *newCommon(ASTContext &C) = 0; // Construct a template decl with name, parameters, and templated element. RedeclarableTemplateDecl(Kind DK, DeclContext *DC, SourceLocation L, @@ -780,28 +771,33 @@ /// \brief Data that is common to all of the declarations of a given /// function template. struct Common : CommonBase { + Common() : InjectedArgs(0) { } + /// \brief The function template specializations for this function /// template, including explicit specializations and instantiations. llvm::FoldingSet Specializations; + + /// \brief The set of "injected" template arguments used within this + /// function template. + /// + /// This pointer refers to the template arguments (there are as + /// many template arguments as template parameaters) for the function + /// template, and is allocated lazily, since most function templates do not + /// require the use of this information. + TemplateArgument *InjectedArgs; }; FunctionTemplateDecl(DeclContext *DC, SourceLocation L, DeclarationName Name, TemplateParameterList *Params, NamedDecl *Decl) : RedeclarableTemplateDecl(FunctionTemplate, DC, L, Name, Params, Decl) { } - CommonBase *newCommon(); + CommonBase *newCommon(ASTContext &C); Common *getCommonPtr() { return static_cast(RedeclarableTemplateDecl::getCommonPtr()); } - friend void FunctionDecl::setFunctionTemplateSpecialization( - FunctionTemplateDecl *Template, - const TemplateArgumentList *TemplateArgs, - void *InsertPos, - TemplateSpecializationKind TSK, - const TemplateArgumentListInfo *TemplateArgsAsWritten, - SourceLocation PointOfInstantiation); + friend class FunctionDecl; /// \brief Retrieve the set of function template specializations of this /// function template. @@ -859,13 +855,25 @@ return makeSpecIterator(getSpecializations(), true); } - /// Create a template function node. + /// \brief Retrieve the "injected" template arguments that correspond to the + /// template parameters of this function template. + /// + /// Although the C++ standard has no notion of the "injected" template + /// arguments for a function template, the notion is convenient when + /// we need to perform substitutions inside the definition of a function + /// template. + std::pair getInjectedTemplateArgs(); + + /// \brief Create a function template node. static FunctionTemplateDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L, DeclarationName Name, TemplateParameterList *Params, NamedDecl *Decl); + /// \brief Create an empty function template node. + static FunctionTemplateDecl *Create(ASTContext &C, EmptyShell); + // Implement isa/cast/dyncast support static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const FunctionTemplateDecl *D) { return true; } @@ -936,19 +944,25 @@ /// \brief The default template argument, if any. TypeSourceInfo *DefaultArgument; - TemplateTypeParmDecl(DeclContext *DC, SourceLocation L, IdentifierInfo *Id, + TemplateTypeParmDecl(DeclContext *DC, SourceLocation KeyLoc, + SourceLocation IdLoc, IdentifierInfo *Id, bool Typename, QualType Type, bool ParameterPack) - : TypeDecl(TemplateTypeParm, DC, L, Id), Typename(Typename), + : TypeDecl(TemplateTypeParm, DC, IdLoc, Id, KeyLoc), Typename(Typename), InheritedDefault(false), ParameterPack(ParameterPack), DefaultArgument() { - TypeForDecl = Type.getTypePtr(); + TypeForDecl = Type.getTypePtrOrNull(); } + /// Sema creates these on the stack during auto type deduction. + friend class Sema; + public: - static TemplateTypeParmDecl *Create(ASTContext &C, DeclContext *DC, - SourceLocation L, unsigned D, unsigned P, + static TemplateTypeParmDecl *Create(const ASTContext &C, DeclContext *DC, + SourceLocation KeyLoc, + SourceLocation NameLoc, + unsigned D, unsigned P, IdentifierInfo *Id, bool Typename, bool ParameterPack); - static TemplateTypeParmDecl *Create(ASTContext &C, EmptyShell Empty); + static TemplateTypeParmDecl *Create(const ASTContext &C, EmptyShell Empty); /// \brief Whether this template type parameter was declared with /// the 'typename' keyword. If not, it was declared with the 'class' @@ -1002,6 +1016,8 @@ /// \brief Returns whether this is a parameter pack. bool isParameterPack() const { return ParameterPack; } + SourceRange getSourceRange() const; + // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const TemplateTypeParmDecl *D) { return true; } @@ -1014,22 +1030,54 @@ /// template class array { }; /// @endcode class NonTypeTemplateParmDecl - : public VarDecl, protected TemplateParmPosition { + : public DeclaratorDecl, protected TemplateParmPosition { /// \brief The default template argument, if any, and whether or not /// it was inherited. llvm::PointerIntPair DefaultArgumentAndInherited; + // FIXME: Collapse this into TemplateParamPosition; or, just move depth/index + // down here to save memory. + + /// \brief Whether this non-type template parameter is a parameter pack. + bool ParameterPack; + + /// \brief Whether this non-type template parameter is an "expanded" + /// parameter pack, meaning that its type is a pack expansion and we + /// already know the set of types that expansion expands to. + bool ExpandedParameterPack; + + /// \brief The number of types in an expanded parameter pack. + unsigned NumExpandedTypes; + NonTypeTemplateParmDecl(DeclContext *DC, SourceLocation L, unsigned D, unsigned P, IdentifierInfo *Id, QualType T, - TypeSourceInfo *TInfo) - : VarDecl(NonTypeTemplateParm, DC, L, Id, T, TInfo, SC_None, SC_None), - TemplateParmPosition(D, P), DefaultArgumentAndInherited(0, false) + bool ParameterPack, TypeSourceInfo *TInfo) + : DeclaratorDecl(NonTypeTemplateParm, DC, L, Id, T, TInfo), + TemplateParmPosition(D, P), DefaultArgumentAndInherited(0, false), + ParameterPack(ParameterPack), ExpandedParameterPack(false), + NumExpandedTypes(0) { } + NonTypeTemplateParmDecl(DeclContext *DC, SourceLocation L, unsigned D, + unsigned P, IdentifierInfo *Id, QualType T, + TypeSourceInfo *TInfo, + const QualType *ExpandedTypes, + unsigned NumExpandedTypes, + TypeSourceInfo **ExpandedTInfos); + + friend class ASTDeclReader; + public: static NonTypeTemplateParmDecl * - Create(ASTContext &C, DeclContext *DC, SourceLocation L, unsigned D, - unsigned P, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo); + Create(const ASTContext &C, DeclContext *DC, SourceLocation L, unsigned D, + unsigned P, IdentifierInfo *Id, QualType T, bool ParameterPack, + TypeSourceInfo *TInfo); + + static NonTypeTemplateParmDecl * + Create(const ASTContext &C, DeclContext *DC, SourceLocation L, unsigned D, + unsigned P, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, + const QualType *ExpandedTypes, unsigned NumExpandedTypes, + TypeSourceInfo **ExpandedTInfos); using TemplateParmPosition::getDepth; using TemplateParmPosition::setDepth; @@ -1037,6 +1085,9 @@ using TemplateParmPosition::setPosition; using TemplateParmPosition::getIndex; + SourceLocation getInnerLocStart() const; + SourceRange getSourceRange() const; + /// \brief Determine whether this template parameter has a default /// argument. bool hasDefaultArgument() const { @@ -1071,6 +1122,65 @@ DefaultArgumentAndInherited.setInt(false); } + /// \brief Whether this parameter is a non-type template parameter pack. + /// + /// If the parameter is a parameter pack, the type may be a + /// \c PackExpansionType. In the following example, the \c Dims parameter + /// is a parameter pack (whose type is 'unsigned'). + /// + /// \code + /// template struct multi_array; + /// \endcode + bool isParameterPack() const { return ParameterPack; } + + /// \brief Whether this parameter is a non-type template parameter pack + /// that has different types at different positions. + /// + /// A parameter pack is an expanded parameter pack when the original + /// parameter pack's type was itself a pack expansion, and that expansion + /// has already been expanded. For example, given: + /// + /// \code + /// template + /// struct X { + /// template + /// struct Y { /* ... */ }; + /// }; + /// \endcode + /// + /// The parameter pack \c Values has a \c PackExpansionType as its type, + /// which expands \c Types. When \c Types is supplied with template arguments + /// by instantiating \c X, the instantiation of \c Values becomes an + /// expanded parameter pack. For example, instantiating + /// \c X results in \c Values being an expanded parameter + /// pack with expansion types \c int and \c unsigned int. + /// + /// The \c getExpansionType() and \c getExpansionTypeSourceInfo() functions + /// return the expansion types. + bool isExpandedParameterPack() const { return ExpandedParameterPack; } + + /// \brief Retrieves the number of expansion types in an expanded parameter pack. + unsigned getNumExpansionTypes() const { + assert(ExpandedParameterPack && "Not an expansion parameter pack"); + return NumExpandedTypes; + } + + /// \brief Retrieve a particular expansion type within an expanded parameter + /// pack. + QualType getExpansionType(unsigned I) const { + assert(I < NumExpandedTypes && "Out-of-range expansion type index"); + void * const *TypesAndInfos = reinterpret_cast(this + 1); + return QualType::getFromOpaquePtr(TypesAndInfos[2*I]); + } + + /// \brief Retrieve a particular expansion type source info within an + /// expanded parameter pack. + TypeSourceInfo *getExpansionTypeSourceInfo(unsigned I) const { + assert(I < NumExpandedTypes && "Out-of-range expansion type index"); + void * const *TypesAndInfos = reinterpret_cast(this + 1); + return static_cast(TypesAndInfos[2*I+1]); + } + // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const NonTypeTemplateParmDecl *D) { return true; } @@ -1092,24 +1202,36 @@ /// Whether or not the default argument was inherited. bool DefaultArgumentWasInherited; + /// \brief Whether this parameter is a parameter pack. + bool ParameterPack; + TemplateTemplateParmDecl(DeclContext *DC, SourceLocation L, - unsigned D, unsigned P, + unsigned D, unsigned P, bool ParameterPack, IdentifierInfo *Id, TemplateParameterList *Params) : TemplateDecl(TemplateTemplateParm, DC, L, Id, Params), TemplateParmPosition(D, P), DefaultArgument(), - DefaultArgumentWasInherited(false) + DefaultArgumentWasInherited(false), ParameterPack(ParameterPack) { } public: - static TemplateTemplateParmDecl *Create(ASTContext &C, DeclContext *DC, + static TemplateTemplateParmDecl *Create(const ASTContext &C, DeclContext *DC, SourceLocation L, unsigned D, - unsigned P, IdentifierInfo *Id, + unsigned P, bool ParameterPack, + IdentifierInfo *Id, TemplateParameterList *Params); using TemplateParmPosition::getDepth; using TemplateParmPosition::getPosition; using TemplateParmPosition::getIndex; + /// \brief Whether this template template parameter is a template + /// parameter pack. + /// + /// \code + /// template