]> granicus.if.org Git - clang/log
clang
11 years ago[ms-inline asm] Refactor/clean up the SemaLookup interface. No functional
Chad Rosier [Mon, 22 Apr 2013 17:01:37 +0000 (17:01 +0000)]
[ms-inline asm] Refactor/clean up the SemaLookup interface.  No functional
change indended.
Part of rdar://13663589

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180027 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMove debug info tests for scoped enums into a separate file.
Adrian Prantl [Mon, 22 Apr 2013 16:47:50 +0000 (16:47 +0000)]
Move debug info tests for scoped enums into a separate file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180026 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUse the ugly PRIx64 macro to make format string portable.
Benjamin Kramer [Mon, 22 Apr 2013 16:10:38 +0000 (16:10 +0000)]
Use the ugly PRIx64 macro to make format string portable.

This is debugging code so functionality isn't a concern, but mingw32 warns
because it doesn't understand the %llx format specifier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180024 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoC++1y constexpr extensions, round 1: Allow most forms of declaration and
Richard Smith [Mon, 22 Apr 2013 15:31:51 +0000 (15:31 +0000)]
C++1y constexpr extensions, round 1: Allow most forms of declaration and
statement in constexpr functions. Everything which doesn't require variable
mutation is also allowed as an extension in C++11. 'void' becomes a literal
type to support constexpr functions which return 'void'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180022 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agocmake: Only add -pedantic if LLVM didn't add it. Don't unconditionally add
Richard Smith [Mon, 22 Apr 2013 14:51:21 +0000 (14:51 +0000)]
cmake: Only add -pedantic if LLVM didn't add it. Don't unconditionally add
-Wall -W, since it's already provided by LLVM's cmake config, and that
overrides fixes (such as -Wno-uninitialized) which LLVM's cmake setup may have
provided.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180018 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix array constant expression evaluation bug: we can have different values for
Richard Smith [Mon, 22 Apr 2013 14:44:29 +0000 (14:44 +0000)]
Fix array constant expression evaluation bug: we can have different values for
different array elements, even if they're all constructed using the same
default constructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180017 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDon't emit _ZTW wrappers for TLS variables which don't use the C++ thread_local keyword.
Richard Smith [Mon, 22 Apr 2013 08:06:17 +0000 (08:06 +0000)]
Don't emit _ZTW wrappers for TLS variables which don't use the C++ thread_local keyword.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180004 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoCleanup: test source file does not need to be executable
Arnaud A. de Grandmaison [Mon, 22 Apr 2013 08:00:37 +0000 (08:00 +0000)]
Cleanup: test source file does not need to be executable

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180002 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix bin-packing behavior of constructor initialziers.
Daniel Jasper [Mon, 22 Apr 2013 07:59:53 +0000 (07:59 +0000)]
Fix bin-packing behavior of constructor initialziers.

In Google style, constructor initializers need to be all on one line or
one initializer per line if that does not fit. Without this patch, this
non-bin-packing-behavior incorrectly extends to the parameters of the
initializers.

Before:
Constructor()
    : aaaaa(aaaaaaaaaaaaaaaaaaaaaa,
            aaaaaaaaaaaaaaaaaaaaaa,
            aaaaaaaaaaaaaaaaaaaaaa) {}

After:
Constructor()
    : aaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
            aaaaaaaaaaaaaaaaaaaaaa) {}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180001 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRevert "Revert "PR14606: Debug info for using directives/DW_TAG_imported_module""
David Blaikie [Mon, 22 Apr 2013 06:13:21 +0000 (06:13 +0000)]
Revert "Revert "PR14606: Debug info for using directives/DW_TAG_imported_module""

This reverts commit 179839 now that the corresponding LLVM patch has been fixed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179997 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd a triple to make a test resilient to non-TLS hosts (eg: darwin10)
David Blaikie [Mon, 22 Apr 2013 04:18:25 +0000 (04:18 +0000)]
Add a triple to make a test resilient to non-TLS hosts (eg: darwin10)

Making the test introduced in r179962 resilient to being run on darwin10 hosts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179992 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix return type of isBitfield in the binding definition
Dmitri Gribenko [Sun, 21 Apr 2013 18:35:51 +0000 (18:35 +0000)]
Fix return type of isBitfield in the binding definition

Patch by Loïc Jaquemet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179984 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[Mips] Convert a GNU style Mips ABI name to the name accepted by LLVM
Simon Atanasyan [Sun, 21 Apr 2013 13:30:10 +0000 (13:30 +0000)]
[Mips] Convert a GNU style Mips ABI name to the name accepted by LLVM
Mips backend.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179981 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[Mips] Do not add unnecessary Mips toolchain path to the list
Simon Atanasyan [Sun, 21 Apr 2013 12:55:59 +0000 (12:55 +0000)]
[Mips] Do not add unnecessary Mips toolchain path to the list
of system include directories with extern "C" semantics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179979 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoThe 'constexpr implies const' rule for non-static member functions is gone in
Richard Smith [Sun, 21 Apr 2013 01:08:50 +0000 (01:08 +0000)]
The 'constexpr implies const' rule for non-static member functions is gone in
C++1y, so stop adding the 'const' there. Provide a compatibility warning for
code relying on this in C++11, with a fix-it hint. Update our lazily-written
tests to add the const, except for those ones which were testing our
implementation of this rule.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179969 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDisable VLA diagnostic in C++1y mode, and add some tests.
Richard Smith [Sat, 20 Apr 2013 23:28:26 +0000 (23:28 +0000)]
Disable VLA diagnostic in C++1y mode, and add some tests.

Still to do here:
  - we have a collection of syntactic accepts-invalids to diagnose
  - support non-PODs in VLAs, including dynamic initialization /
    destruction
  - runtime checks (and throw std::bad_array_length) for bad bound
  - support VLA capture by reference in lambdas
  - properly support VLAs in range-based for (don't recompute bound)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179962 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd another test I forgot to svn add.
Richard Smith [Sat, 20 Apr 2013 22:23:29 +0000 (22:23 +0000)]
Add another test I forgot to svn add.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179959 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoC++1y: Allow aggregates to have default initializers.
Richard Smith [Sat, 20 Apr 2013 22:23:05 +0000 (22:23 +0000)]
C++1y: Allow aggregates to have default initializers.

Add a CXXDefaultInitExpr, analogous to CXXDefaultArgExpr, and use it both in
CXXCtorInitializers and in InitListExprs to represent a default initializer.

There's an additional complication here: because the default initializer can
refer to the initialized object via its 'this' pointer, we need to make sure
that 'this' points to the right thing within the evaluation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179958 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUpdate some stuff on the open projects page to reflect things we've already done.
Richard Smith [Sat, 20 Apr 2013 16:20:44 +0000 (16:20 +0000)]
Update some stuff on the open projects page to reflect things we've already done.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179953 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSwitch C++11 open project to C++1y :)
Richard Smith [Sat, 20 Apr 2013 15:57:27 +0000 (15:57 +0000)]
Switch C++11 open project to C++1y :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179951 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd note that some of these links are dead for now.
Richard Smith [Sat, 20 Apr 2013 13:22:50 +0000 (13:22 +0000)]
Add note that some of these links are dead for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179950 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoVLAs in C++14!
Richard Smith [Sat, 20 Apr 2013 13:20:33 +0000 (13:20 +0000)]
VLAs in C++14!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179949 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoVariable templates and generic lambdas are approved for C++14.
Richard Smith [Sat, 20 Apr 2013 12:58:57 +0000 (12:58 +0000)]
Variable templates and generic lambdas are approved for C++14.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179947 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoClarifying memory allocation: approved for C++14. Move from N/A to no, since we curre...
Richard Smith [Sat, 20 Apr 2013 12:57:49 +0000 (12:57 +0000)]
Clarifying memory allocation: approved for C++14. Move from N/A to no, since we currently relax 'operator new' calls which didn't come from new-expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179946 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoNo digit separators for C++14.
Richard Smith [Sat, 20 Apr 2013 12:56:37 +0000 (12:56 +0000)]
No digit separators for C++14.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179945 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoGeneralized constexpr is approved for C++14.
Richard Smith [Sat, 20 Apr 2013 12:49:36 +0000 (12:49 +0000)]
Generalized constexpr is approved for C++14.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179944 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMore approved C++14 features.
Richard Smith [Sat, 20 Apr 2013 12:47:36 +0000 (12:47 +0000)]
More approved C++14 features.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179943 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoBinary literals are approved for C++14.
Richard Smith [Sat, 20 Apr 2013 12:44:32 +0000 (12:44 +0000)]
Binary literals are approved for C++14.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179942 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoImplement core issue 1608: class members can be found via operator lookup in a traili...
Richard Smith [Sat, 20 Apr 2013 12:41:22 +0000 (12:41 +0000)]
Implement core issue 1608: class members can be found via operator lookup in a trailing return type in that class's body.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179941 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSupports Sourcery CodeBench Mips toolchain directories tree.
Simon Atanasyan [Sat, 20 Apr 2013 08:15:03 +0000 (08:15 +0000)]
Supports Sourcery CodeBench Mips toolchain directories tree.

Sourcery CodeBench and modern FSF Mips toolchains require a bit more
complicated algorithm to calculate headers, libraries and sysroot paths
than implemented by Clang driver now. The main problem is that all these
paths depend on a set of command line arguments additionally to a target
triple value. For example, let $TC is a toolchain installation directory.
If we compile big-endian 32-bit mips code, crtbegin.o is in the
$TC/lib/gcc/mips-linux-gnu/4.7.2 folder and the toolchain's linker requires
--sysroot=$TC/mips-linux-gnu/libc argument. If we compile little-endian
32-bit soft-float mips code, crtbegin.o is in the
$TC/lib/gcc/mips-linux-gnu/4.7.2/soft-float/el folder and the toolchain's
linker requires --sysroot=$TC/mips-linux-gnu/libc/soft-float/el argument.

1. Calculate MultiarchSuffix using all necessary command line options and
   use this MultiarchSuffix to detect crtbegin.o location in the
   GCCInstallationDetector::ScanLibDirForGCCTriple() routine.
2. If a user does not provide --sysroot argument to the driver explicitly,
   calculate new sysroot value based on command line options. Then use this
   calculated sysroot path:
   a. To populate a file search paths list in the Linux::Linux() constructor.
   b. To find Mips toolchain specific include headers directories
      in the Linux::AddClangSystemIncludeArgs() routine.
   c. To provide -–sysroot argument for a linker.

Note:
- The FSF's tree slightly differs (folder names) and is not supported
  yet.
- New addExternCSystemIncludeIfExits() routine is a temporary solution.
  I plan to move path existence check to the addExternCSystemInclude()
  routine by a separate commit.

The patch reviewed by Rafael Espindola.
http://llvm-reviews.chandlerc.com/D644

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179934 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Ensure BugReporterTracking works on regions with pointer arithmetic
Anna Zaks [Sat, 20 Apr 2013 01:15:42 +0000 (01:15 +0000)]
[analyzer] Ensure BugReporterTracking works on regions with pointer arithmetic

Introduce a new helper function, which computes the first symbolic region in
the base region chain. The corresponding symbol has been used for assuming that
a pointer is null. Now, it will also be used for checking if it is null.

This ensures that we are tracking a null pointer correctly in the BugReporter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179916 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Flip printPretty and printPrettyAsExpr as per suggestion from Jordan ...
Anna Zaks [Sat, 20 Apr 2013 01:15:36 +0000 (01:15 +0000)]
[analyzer] Flip printPretty and printPrettyAsExpr as per suggestion from Jordan (r179572)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179915 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Correct the comment
Anna Zaks [Sat, 20 Apr 2013 01:15:32 +0000 (01:15 +0000)]
[analyzer] Correct the comment

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179914 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[libclang] Make sure the preable does not truncate comments.
Argyrios Kyrtzidis [Fri, 19 Apr 2013 23:24:25 +0000 (23:24 +0000)]
[libclang] Make sure the preable does not truncate comments.

rdar://13647445

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179907 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Website: update lists of potential and actual checkers.
Jordan Rose [Fri, 19 Apr 2013 22:19:14 +0000 (22:19 +0000)]
[analyzer] Website: update lists of potential and actual checkers.

- memory.MismatchedDelete, memory.MultipleDelete, and memory.DeallocateNonPtr
  are complete (unix.MismatchedDeallocator and cplusplus.NewDelete)
- Per discussion on the mailing list, different.UnaryPlusWithUnsigned has
  dubious value; remove it.
- Add potential checker ctordtor.PlacementSelfCopy per an internal bug report.
- core.AttributeNonNull is now core.NonNullParamChecker, though no one should
  be depending on this name anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179900 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove an empty line so the line numbers match up again after the recent documentatio...
Adrian Prantl [Fri, 19 Apr 2013 21:59:40 +0000 (21:59 +0000)]
Remove an empty line so the line numbers match up again after the recent documentation change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179898 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agostill not relaxed enough.
Adrian Prantl [Fri, 19 Apr 2013 21:52:06 +0000 (21:52 +0000)]
still not relaxed enough.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179897 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agocleanup and relax test cases
Adrian Prantl [Fri, 19 Apr 2013 21:48:07 +0000 (21:48 +0000)]
cleanup and relax test cases

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179896 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoNote that we support (and in fact have supported since the dawn of time itself)
Richard Smith [Fri, 19 Apr 2013 20:47:20 +0000 (20:47 +0000)]
Note that we support (and in fact have supported since the dawn of time itself)
C++1y binary literals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179883 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[ms-inline asm] The parsing of C++ identifiers is a task of the front-end parser,
Chad Rosier [Fri, 19 Apr 2013 20:37:49 +0000 (20:37 +0000)]
[ms-inline asm] The parsing of C++ identifiers is a task of the front-end parser,
not the asm parser.  As such, begin moving the parsing logic in that direction.
This patch is just a temporary hack until the real frontend parser can be hooked
up.  Part of rdar://13663589

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179882 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoEmit the underlying type in the debug info for all kinds of fixed enums
Adrian Prantl [Fri, 19 Apr 2013 19:56:39 +0000 (19:56 +0000)]
Emit the underlying type in the debug info for all kinds of fixed enums
instead of only C++11-scoped-with-class-tag enums.

rdar://problem/13463793

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179879 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agos/C++0x/C++11/
Adrian Prantl [Fri, 19 Apr 2013 19:56:35 +0000 (19:56 +0000)]
s/C++0x/C++11/

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179878 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoInitial work on status page for C++14.
Richard Smith [Fri, 19 Apr 2013 17:27:48 +0000 (17:27 +0000)]
Initial work on status page for C++14.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179864 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoKeep the parentheses in #pragma message (partial revert of r179771).
Andy Gibbs [Fri, 19 Apr 2013 17:13:17 +0000 (17:13 +0000)]
Keep the parentheses in #pragma message (partial revert of r179771).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179862 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoC++11 support is now feature-complete.
Richard Smith [Fri, 19 Apr 2013 17:00:31 +0000 (17:00 +0000)]
C++11 support is now feature-complete.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179861 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAvoid names like __in that conflict with SAL in builtin headers
Reid Kleckner [Fri, 19 Apr 2013 17:00:14 +0000 (17:00 +0000)]
Avoid names like __in that conflict with SAL in builtin headers

Microsoft's Source Annotation Language (SAL) defines a bunch of keywords
for annotating the inputs and outputs of functions.  Empty definitions
for the keywords are provided by <stdlib.h> -> <crtdefs.h> -> <sal.h>.
This makes it basically impossible to include MSVC's stdlib.h and
Clang's *mmintrin.h headers at the same time if they have variables
named __in.  As a workaround, I've renamed those variables.

This fixes the Modules/compiler_builtins.m test which was XFAILed,
presumably due to this conflict.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179860 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoImplement CodeGen for C++11 thread_local, following the Itanium ABI specification...
Richard Smith [Fri, 19 Apr 2013 16:42:07 +0000 (16:42 +0000)]
Implement CodeGen for C++11 thread_local, following the Itanium ABI specification as discussed on cxx-abi-dev.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179858 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Call proper callback for const regions escaped other then on call.
Anton Yartsev [Fri, 19 Apr 2013 09:39:51 +0000 (09:39 +0000)]
[analyzer] Call proper callback for const regions escaped other then on call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179846 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRevert "PR14606: Debug info for using directives/DW_TAG_imported_module"
Eric Christopher [Fri, 19 Apr 2013 07:46:36 +0000 (07:46 +0000)]
Revert "PR14606: Debug info for using directives/DW_TAG_imported_module"

This reverts commit r179837 as it seems to be causing test failures.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179839 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoPR14606: Debug info for using directives/DW_TAG_imported_module
David Blaikie [Fri, 19 Apr 2013 07:04:02 +0000 (07:04 +0000)]
PR14606: Debug info for using directives/DW_TAG_imported_module

More changes later for using declarations/DW_TAG_imported_declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179837 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoGive CGDebugInfo::getContextDescriptor a more specific return type
David Blaikie [Fri, 19 Apr 2013 06:56:38 +0000 (06:56 +0000)]
Give CGDebugInfo::getContextDescriptor a more specific return type

Not that the DI* hierarchy is terribly type safe, but this makes the contract a
little clearer I think.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179835 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[libclang] Fix copy-paste error in comment.
Argyrios Kyrtzidis [Fri, 19 Apr 2013 00:51:52 +0000 (00:51 +0000)]
[libclang] Fix copy-paste error in comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179823 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[libclang] Introduce clang_Cursor_isVariadic, which returns non-zero if the given...
Argyrios Kyrtzidis [Thu, 18 Apr 2013 23:53:05 +0000 (23:53 +0000)]
[libclang] Introduce clang_Cursor_isVariadic, which returns non-zero if the given cursor is a variadic function or method.

rdar://13667150

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179819 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoObjective-C++: Enable passing of modern C++11 style
Fariborz Jahanian [Thu, 18 Apr 2013 23:43:21 +0000 (23:43 +0000)]
Objective-C++: Enable passing of modern C++11 style
initialized temporaries to objc++ methods.
// rdar://12788429

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179818 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[libclang] Introduce clang_Cursor_getObjCDeclQualifiers, to query for 'ObjC Qualifier...
Argyrios Kyrtzidis [Thu, 18 Apr 2013 23:29:12 +0000 (23:29 +0000)]
[libclang] Introduce clang_Cursor_getObjCDeclQualifiers, to query for 'ObjC Qualifiers' written next to the return and
parameter types in an ObjC method declarations.

rdar://13676977

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179816 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix typo.
Chad Rosier [Thu, 18 Apr 2013 23:12:05 +0000 (23:12 +0000)]
Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179811 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd comment to describe cleverness.
Benjamin Kramer [Thu, 18 Apr 2013 22:49:48 +0000 (22:49 +0000)]
Add comment to describe cleverness.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179806 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[libclang] Introduce clang_Cursor_getObjCPropertyAttributes to query the written...
Argyrios Kyrtzidis [Thu, 18 Apr 2013 22:15:49 +0000 (22:15 +0000)]
[libclang] Introduce clang_Cursor_getObjCPropertyAttributes to query the written attributes in a property declaration.

rdar://13684512

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179803 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoComment parsing: simplify code. As a side effect, this also silences GCC's
Dmitri Gribenko [Thu, 18 Apr 2013 20:50:35 +0000 (20:50 +0000)]
Comment parsing: simplify code.  As a side effect, this also silences GCC's
-Wunitnitialized warning.

Patch by Rui Ueyama.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179794 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoObjective-C parsing [qoi]: Provide good recovery when
Fariborz Jahanian [Thu, 18 Apr 2013 19:37:43 +0000 (19:37 +0000)]
Objective-C parsing [qoi]: Provide good recovery when
Objective-C dictionary literals has bad syntax for the
separator. // rdar://10679157

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179784 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[CMake] Create the directory before creating the link to the clang headers.
Argyrios Kyrtzidis [Thu, 18 Apr 2013 18:54:03 +0000 (18:54 +0000)]
[CMake] Create the directory before creating the link to the clang headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179782 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agosome more tests for r179743.
Argyrios Kyrtzidis [Thu, 18 Apr 2013 18:32:48 +0000 (18:32 +0000)]
some more tests for r179743.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179781 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd IRGen test case for r179743.
Argyrios Kyrtzidis [Thu, 18 Apr 2013 17:52:10 +0000 (17:52 +0000)]
Add IRGen test case for r179743.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179777 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Refine 'nil receiver' diagnostics to mention the name of the method not...
Ted Kremenek [Thu, 18 Apr 2013 17:44:15 +0000 (17:44 +0000)]
[analyzer] Refine 'nil receiver' diagnostics to mention the name of the method not called.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179776 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDropped the parentheses for #pragma message and its kin in the -E output generator.
Andy Gibbs [Thu, 18 Apr 2013 16:49:37 +0000 (16:49 +0000)]
Dropped the parentheses for #pragma message and its kin in the -E output generator.

This was a suggestion by Jordan Rose since the documented format for these pragmas is without the parentheses.  At the same time, I've increased test coverage too for the preprocessed output.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179771 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdds a new doxygen tag needed. // rdar://12379053
Fariborz Jahanian [Thu, 18 Apr 2013 16:45:57 +0000 (16:45 +0000)]
Adds a new doxygen tag needed. // rdar://12379053

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179770 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[libclang] Report parameter array types as written in source, not decayed to pointer...
Argyrios Kyrtzidis [Thu, 18 Apr 2013 16:41:15 +0000 (16:41 +0000)]
[libclang] Report parameter array types as written in source, not decayed to pointer types.

Patch by Doug.
rdar://13684618

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179769 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] "Force" LazyCompoundVals on bind when they are simple enough.
Jordan Rose [Thu, 18 Apr 2013 16:33:46 +0000 (16:33 +0000)]
[analyzer] "Force" LazyCompoundVals on bind when they are simple enough.

The analyzer uses LazyCompoundVals to represent rvalues of aggregate types,
most importantly structs and arrays. This allows us to efficiently copy
around an entire struct, rather than doing a memberwise load every time a
struct rvalue is encountered. This can also keep memory usage down by
allowing several structs to "share" the same snapshotted bindings.

However, /lookup/ through LazyCompoundVals can be expensive, especially
since they can end up chaining back to the original value. While we try
to reuse LazyCompoundVals whenever it's safe, and cache information about
this transitivity, the fact is it's sometimes just not a good idea to
perpetuate LazyCompoundVals -- the tradeoffs just aren't worth it.

This commit changes RegionStore so that binding a LazyCompoundVal to struct
will do a memberwise copy if the struct is simple enough. Today's definition
of "simple enough" is "up to N scalar members" (see below), but that could
easily be changed in the future. This is enough to bring the test case in
PR15697 back down to a manageable analysis time (within 20% of its original
time, in an unfair test where the new analyzer is not compiled with LTO).

The actual value of "N" is controlled by a new -analyzer-config option,
'region-store-small-struct-limit'. It defaults to "2", meaning structs with
zero, one, or two scalar members will be considered "simple enough" for
this code path.

It's worth noting that a more straightforward implementation would do this
on load, not on bind, and make use of the structure we already have for this:
CompoundVal. A long time ago, this was actually how RegionStore modeled
aggregate-to-aggregate copies, but today it's only used for compound literals.
Unfortunately, it seems that we've special-cased LazyCompoundVal in certain
places (such as liveness checks) but failed to similarly special-case
CompoundVal in all of them. Until we're confident that CompoundVal is
handled properly everywhere, this solution is safer, since the entire
optimization is just an implementation detail of RegionStore.

<rdar://problem/13599304>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179767 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Don't crash if we cache out after making a temporary region.
Jordan Rose [Thu, 18 Apr 2013 16:33:40 +0000 (16:33 +0000)]
[analyzer] Don't crash if we cache out after making a temporary region.

A C++ overloaded operator may be implemented as an instance method, and
that instance method may be called on an rvalue object, which has no
associated region. The analyzer handles this by creating a temporary region
just for the evaluation of this call; however, it is possible that /by
creating the region/, the analyzer ends up in a previously-explored state.
In this case we don't need to continue along this path.

This doesn't actually show any behavioral change now, but it starts being
used with the next commit and prevents an assertion failure there.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179766 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSpecify that we're parsing ms-style inline assembly.
Chad Rosier [Thu, 18 Apr 2013 15:45:31 +0000 (15:45 +0000)]
Specify that we're parsing ms-style inline assembly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179762 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMultiple improvements to the AST matcher tutorial.
Manuel Klimek [Thu, 18 Apr 2013 14:30:45 +0000 (14:30 +0000)]
Multiple improvements to the AST matcher tutorial.

Patch by Jochen Eisinger.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179758 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoReject asm output constraints that consist of modifiers only.
Benjamin Kramer [Thu, 18 Apr 2013 13:23:23 +0000 (13:23 +0000)]
Reject asm output constraints that consist of modifiers only.

Fixes PR15759.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179756 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd llvm_unreachable at end of fully covered switch to pacify GCC.
Benjamin Kramer [Thu, 18 Apr 2013 10:44:27 +0000 (10:44 +0000)]
Add llvm_unreachable at end of fully covered switch to pacify GCC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179753 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[Parser] Handle #pragma pack/align inside C structs.
Argyrios Kyrtzidis [Thu, 18 Apr 2013 01:42:35 +0000 (01:42 +0000)]
[Parser] Handle #pragma pack/align inside C structs.

Fixes PR13580. Patch by Serge Pavlov!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179743 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSwitch the note order for -Woverloaded-shift-op-parentheses so that the note
Richard Trieu [Thu, 18 Apr 2013 01:04:37 +0000 (01:04 +0000)]
Switch the note order for -Woverloaded-shift-op-parentheses so that the note
with the silence fix-it comes first.  This is more consistent with the rest
of the warnings in -Wparentheses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179742 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUpdate the -Wparentheses tests to check that fix-its are in the correct place.
Richard Trieu [Thu, 18 Apr 2013 00:56:23 +0000 (00:56 +0000)]
Update the -Wparentheses tests to check that fix-its are in the correct place.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179740 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Tweak getDerefExpr more to track DeclRefExprs to references.
Anna Zaks [Thu, 18 Apr 2013 00:15:15 +0000 (00:15 +0000)]
[analyzer] Tweak getDerefExpr more to track DeclRefExprs to references.

In the committed example, we now see a note that tells us when the pointer
was assumed to be null.

This is the only case in which getDerefExpr returned null (failed to get
the dereferenced expr) throughout our regression tests. (There were multiple
occurrences of this one.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179736 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Improve dereferenced expression tracking for MemberExpr with a dot and...
Anna Zaks [Wed, 17 Apr 2013 23:17:43 +0000 (23:17 +0000)]
[analyzer] Improve dereferenced expression tracking for MemberExpr with a dot and non-reference base

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179734 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd description of -Ofast optimization option to the man page. <rdar://13660458>
Bob Wilson [Wed, 17 Apr 2013 22:32:43 +0000 (22:32 +0000)]
Add description of -Ofast optimization option to the man page. <rdar://13660458>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179733 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Gain more precision retrieving the right SVal by specifying the type of...
Anna Zaks [Wed, 17 Apr 2013 22:29:51 +0000 (22:29 +0000)]
[analyzer] Gain more precision retrieving the right SVal by specifying the type of the expression.

Thanks to Jordan for suggesting the fix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179732 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Allow TrackConstraintBRVisitor to work when the value it’s tracking is...
Anna Zaks [Wed, 17 Apr 2013 22:29:47 +0000 (22:29 +0000)]
[analyzer] Allow TrackConstraintBRVisitor to work when the value it’s tracking is not live in the last node of the path

We always register the visitor on a node in which the value we are tracking is live and constrained. However,
the visitation can restart at a node, later on the path, in which the value is under constrained because
it is no longer live. Previously, we just silently stopped tracking in that case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179731 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[Modules] Use global index to improve typo correction performance
Argyrios Kyrtzidis [Wed, 17 Apr 2013 22:10:55 +0000 (22:10 +0000)]
[Modules] Use global index to improve typo correction performance

Typo correction for an unqualified name needs to walk through all of the identifier tables of all modules.
When we have a global index, just walk its identifier table only.

rdar://13425732

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179730 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd support for gcc's spelling of -fcolor-diagnostics.
Nico Weber [Wed, 17 Apr 2013 21:52:44 +0000 (21:52 +0000)]
Add support for gcc's spelling of -fcolor-diagnostics.

See http://gcc.gnu.org/onlinedocs/gcc/Language-Independent-Options.html

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179728 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[tests] Only include stdint.h if we are in freestanding mode.
Daniel Dunbar [Wed, 17 Apr 2013 21:11:07 +0000 (21:11 +0000)]
[tests] Only include stdint.h if we are in freestanding mode.

 - We shouldn't even try to include stdint.h in hosted mode, as the dependency
   on even parsing a platforms stdint.h might fail for some targets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179723 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[document parsing]: When tag declaration (but not definition!)
Fariborz Jahanian [Wed, 17 Apr 2013 21:05:20 +0000 (21:05 +0000)]
[document parsing]: When tag declaration (but not definition!)
is part of the decl-specifier-seq of some other declaration,
it doesn't get comment. // rdar://12390371

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179722 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoTest cases for r179719.
Chad Rosier [Wed, 17 Apr 2013 21:02:39 +0000 (21:02 +0000)]
Test cases for r179719.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179720 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix off-by-one error in #pragma clang system_header.
Jordan Rose [Wed, 17 Apr 2013 19:09:18 +0000 (19:09 +0000)]
Fix off-by-one error in #pragma clang system_header.

The system_header pragma (from GCC) is implemented using line notes in the
source manager. However, a line note's line number specifies the number
not for the current line, but for the next line. This was making all
line numbers appear off by one after the pragma.

Reported by Andy Gibbs, uncovered during r179677.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179709 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoPR15755: don't drop parameter packs when dropping parameters with default
Richard Smith [Wed, 17 Apr 2013 19:00:52 +0000 (19:00 +0000)]
PR15755: don't drop parameter packs when dropping parameters with default
arguments in the formation of a candidate set of inheriting constructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179708 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSema: Remove unused variable.
Benjamin Kramer [Wed, 17 Apr 2013 18:05:23 +0000 (18:05 +0000)]
Sema: Remove unused variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179701 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Don't warn for returning void expressions in void blocks.
Jordan Rose [Wed, 17 Apr 2013 18:03:48 +0000 (18:03 +0000)]
[analyzer] Don't warn for returning void expressions in void blocks.

This was slightly tricky because BlockDecls don't currently store an
inferred return type. However, we can rely on the fact that blocks with
inferred return types will have return statements that match the inferred
type.

<rdar://problem/13665798>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179699 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUnified token breaking logic: support for line comments.
Alexander Kornienko [Wed, 17 Apr 2013 17:34:05 +0000 (17:34 +0000)]
Unified token breaking logic: support for line comments.

Summary:
Added BreakableLineComment, moved common code from
BreakableBlockComment to newly added BreakableComment. As a side-effect of the
rewrite, found another problem with escaped newlines and had to change
code which removes trailing whitespace from line comments not to break after
this patch.

Reviewers: klimek, djasper

Reviewed By: klimek

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D682

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179693 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRevert r179671 and just pass a triple to the test for a platform with known
Eric Christopher [Wed, 17 Apr 2013 17:27:51 +0000 (17:27 +0000)]
Revert r179671 and just pass a triple to the test for a platform with known
TLS support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179692 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDR974: Lambdas can have default arguments.
Richard Smith [Wed, 17 Apr 2013 16:25:20 +0000 (16:25 +0000)]
DR974: Lambdas can have default arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179688 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoImplemented #pragma GCC warning/error in the same mould as #pragma message.
Andy Gibbs [Wed, 17 Apr 2013 16:16:16 +0000 (16:16 +0000)]
Implemented #pragma GCC warning/error in the same mould as #pragma message.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179687 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoThis corrects problems in the LibASTMatchers tutorial.
Manuel Klimek [Wed, 17 Apr 2013 15:02:12 +0000 (15:02 +0000)]
This corrects problems in the LibASTMatchers tutorial.

Patch by Jochen Eisinger.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179683 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSet SRet flags properly in '-cxx-abi microsoft'.
Timur Iskhodzhanov [Wed, 17 Apr 2013 12:54:10 +0000 (12:54 +0000)]
Set SRet flags properly in '-cxx-abi microsoft'.

Also,
- abstract out the indirect/in memory/in registers decisions into the CGCXXABI
- fix handling of empty struct arguments for '-cxx-abi microsoft'
- add/fix tests

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179681 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix PR15291: noreturn adjustment in overload resolution for function templates, from...
Douglas Gregor [Wed, 17 Apr 2013 08:45:07 +0000 (08:45 +0000)]
Fix PR15291: noreturn adjustment in overload resolution for function templates, from Alexander Zinenko!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179680 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoExtended VerifyDiagnosticConsumer to also verify source file for diagnostic.
Andy Gibbs [Wed, 17 Apr 2013 08:06:46 +0000 (08:06 +0000)]
Extended VerifyDiagnosticConsumer to also verify source file for diagnostic.

VerifyDiagnosticConsumer previously would not check that the diagnostic and
its matching directive referenced the same source file.  Common practice was
to create directives that referenced other files but only by line number,
and this led to problems such as when the file containing the directive
didn't have enough lines to match the location of the diagnostic in the
other file, leading to bizarre file formatting and other oddities.

This patch causes VerifyDiagnosticConsumer to match source files as well as
line numbers.  Therefore, a new syntax is made available for directives, for
example:

// expected-error@file:line {{diagnostic message}}

This extends the @line feature where "file" is the file where the diagnostic
is generated.  The @line syntax is still available and uses the current file
for the diagnostic.  "file" can be specified either as a relative or absolute
path - although the latter has less usefulness, I think!  The #include search
paths will be used to locate the file and if it is not found an error will be
generated.

The new check is not optional: if the directive is in a different file to the
diagnostic, the file must be specified.  Therefore, a number of test-cases
have been updated with regard to this.

This closes out PR15613.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179677 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSmall improvements to clang-format documentation and integration
Daniel Jasper [Wed, 17 Apr 2013 07:55:02 +0000 (07:55 +0000)]
Small improvements to clang-format documentation and integration
scripts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179676 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd a bit of a hack to deal with a failing testcase on darwin10 bots.
Eric Christopher [Wed, 17 Apr 2013 07:19:56 +0000 (07:19 +0000)]
Add a bit of a hack to deal with a failing testcase on darwin10 bots.

We currently emit an error message when you try to use thread local
storage on targets that don't support it and testing C++11 thread
locals will trip this. We don't want to xfail the test for all darwin
hosts so add a quick hack to check for darwin10 and disable the
test based on that. Only checking darwin10 because anything earlier
is really old and I don't have a list of what other hosts don't
support tls handy.

Alternate suggestions welcome!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179671 91177308-0d34-0410-b5e6-96231b3b80d8