Eric Liu [Mon, 19 Dec 2016 10:41:05 +0000 (10:41 +0000)]
[clang-format] revert an unintended change in r288493 and add a test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290093
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Mon, 19 Dec 2016 10:09:25 +0000 (10:09 +0000)]
Revert "[c++1z] P0195R2: Support pack-expansion of using-declarations."
This reverts commit r290080 as it leads to many Clang crashes, e.g.:
http://lab.llvm.org:8011/builders/clang-cmake-aarch64-quick/builds/1814
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290092
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Mon, 19 Dec 2016 08:40:56 +0000 (08:40 +0000)]
clang-format: Fix regression introduced in r290084.
We still want to try in linewrap within single elements of a 1-column
list.
After:
Type *Params[] = {PointerType::getUnqual(FunctionType::get(
Builder.getVoidTy(), Builder.getInt8PtrTy(), false)),
Builder.getInt8PtrTy(),
Builder.getInt32Ty(),
LongType,
LongType,
LongType};
Before:
No line break in the first element, so column limit violation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290090
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Mon, 19 Dec 2016 07:26:11 +0000 (07:26 +0000)]
clang-format: Allow "single column" list layout even if that violates the
column limit.
Single-column layout basically means that we format the list with one
element per line. Not doing that when there is a column limit violation
doesn't change the fact that there is an item that doesn't fit within
the column limit.
Before (with a column limit of 30):
std::vector<int> a = {
aaaaaaaa,
aaaaaaaa,
aaaaaaaa,
aaaaaaaa,
aaaaaaaaaa,
aaaaaaaa,
aaaaaaaaaaaaaaaaaaaaaaaaaaa};
After:
std::vector<int> a = {
aaaaaaaa,
aaaaaaaa,
aaaaaaaa,
aaaaaaaa,
aaaaaaaaaa,
aaaaaaaa,
aaaaaaaaaaaaaaaaaaaaaaaaaaa};
(and previously we would have formatted like "After" it wasn't for the one
item that is too long)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290084
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Mon, 19 Dec 2016 04:21:36 +0000 (04:21 +0000)]
Add __cpp_structured_bindings feature test macro for structured bindings, per
latest (provisional) draft of SD-6.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290082
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Mon, 19 Dec 2016 04:16:03 +0000 (04:16 +0000)]
[c++1z] cxx_status: mark p0195r2 as done.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290081
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Mon, 19 Dec 2016 04:08:53 +0000 (04:08 +0000)]
[c++1z] P0195R2: Support pack-expansion of using-declarations.
This change introduces UsingPackDecl as a marker for the set of UsingDecls
produced by pack expansion of a single (unresolved) using declaration. This is
not strictly necessary (we just need to be able to map from the original using
declaration to its expansions somehow), but it's useful to maintain the
invariant that each declaration reference instantiates to refer to one
declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290080
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaxun Liu [Mon, 19 Dec 2016 02:55:53 +0000 (02:55 +0000)]
Add a lit test for PR31374
Differential Revision: https://reviews.llvm.org/D27909
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290075
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Sun, 18 Dec 2016 22:01:46 +0000 (22:01 +0000)]
Fix name hiding and redeclaration checking for dependent local
using-declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290072
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Sun, 18 Dec 2016 21:39:37 +0000 (21:39 +0000)]
Fix some interactions between C++11 and C++14 features and using-declarations:
* a dependent non-type using-declaration within a function template can be
valid, as it can refer to an enumerator, so don't reject it in the template
definition
* we can partially substitute into a dependent using-declaration if it appears
within a (local class in a) generic lambda within a function template, which
means an UnresolvedUsing*Decl doesn't necessarily instantiate to a UsingDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290071
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 18 Dec 2016 14:12:38 +0000 (14:12 +0000)]
Wdocumentation fix
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290063
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaxun Liu [Sun, 18 Dec 2016 07:26:01 +0000 (07:26 +0000)]
Fix a lit test issue exposed by r290056
The test requests a target which supports cl_khr_gl_msaa_sharing since in test/PCH/ocl_types.h
it tries to enable cl_khr_gl_msaa_sharing. Therefore this test fails on targets not supporting
cl_khr_gl_msaa_sharing, e.g. ppc64, etc.
The fix is to add triple spir-unknown-unknown which supports cl_khr_gl_msaa_sharing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290059
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaxun Liu [Sun, 18 Dec 2016 06:35:06 +0000 (06:35 +0000)]
Attempt to fix build failure and regressions due to r290056
Add llvm:: namespace to StringRef.
Make conversion between bool and uint64_t explicit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290058
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaxun Liu [Sun, 18 Dec 2016 05:18:55 +0000 (05:18 +0000)]
Recommit r289979 [OpenCL] Allow disabling types and declarations associated with extensions
Fixed undefined behavior due to cast integer to bool in initializer list.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290056
91177308-0d34-0410-b5e6-
96231b3b80d8
Kelvin Li [Sat, 17 Dec 2016 05:48:59 +0000 (05:48 +0000)]
[OpenMP] Sema and parsing for 'target teams' pragma
This patch is to implement sema and parsing for 'target teams' pragma.
Differential Revision: https://reviews.llvm.org/D27818
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290038
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 17 Dec 2016 01:09:40 +0000 (01:09 +0000)]
[libclang] Remove the 'extern "C"' blocks from the implementation files.
These are unnecessary, the declarations already carry the 'extern C' property, and if there is mismatch
between declaration and definition then we will get linker errors via libclang.exports.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290025
91177308-0d34-0410-b5e6-
96231b3b80d8
Devin Coughlin [Sat, 17 Dec 2016 01:08:17 +0000 (01:08 +0000)]
[analyzer] UnixAPIChecker: Don't diagnose for functions in C++ namespaces
Update the UnixAPIChecker to not diagnose for calls to functions that
are declared in C++ namespaces. This avoids false positives when a
namespaced function has the same name as a Unix API.
This address PR28331.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290023
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Fri, 16 Dec 2016 23:45:03 +0000 (23:45 +0000)]
Added clangLex to the dependencies for clang-import-test.
This is part of the effort to get the i686-mingw32-RA-on-linux bot to like clang-import-test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290010
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 16 Dec 2016 23:44:44 +0000 (23:44 +0000)]
Fix MSVC build of libclang after r288438
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290009
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 16 Dec 2016 23:43:51 +0000 (23:43 +0000)]
Add explicit triple to test to fix arm bots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290008
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Fri, 16 Dec 2016 23:34:16 +0000 (23:34 +0000)]
Fixed library dependencies on clang-import-test to clean up the bots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290006
91177308-0d34-0410-b5e6-
96231b3b80d8
Devin Coughlin [Fri, 16 Dec 2016 23:31:56 +0000 (23:31 +0000)]
[analyzer] Extend UnixAPIChecker open() checks to handle openat().
The openat() API has similar constraints to the open() API -- it just takes
an extra parameter.
rdar://problem/
29526458
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290005
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Fri, 16 Dec 2016 23:21:38 +0000 (23:21 +0000)]
Testbed and skeleton of a new expression parser
LLVM's JIT is now the foundation of dynamic-compilation features for many languages. Clang also has low-level support for dynamic compilation (ASTImporter and ExternalASTSource, notably). How the compiler is set up for dynamic parsing is generally left up to individual clients, for example LLDB's C/C++/Objective-C expression parser and the ROOT project.
Although this arrangement offers external clients the flexibility to implement dynamic features as they see fit, the lack of an in-tree client means that subtle bugs can be introduced that cause regressions in the external clients but aren't caught by tests (or users) until much later. LLDB for example regularly encounters complicated ODR violation scenarios where it is not immediately clear who is at fault.
Other external clients (notably, Cling) rely on similar functionality, and another goal is to break this functionality up into composable parts so that any client can be built easily on top of Clang without requiring extensive additional code.
I propose that the parts required to build a simple expression parser be added to Clang. Initially, I aim to have the following features:
- A piece that looks up external declarations from a variety of sources (e.g., from previous dynamic compilations, from modules, or from DWARF) and uses clear conflict resolution rules to reconcile differences, with easily understood errors. This functionality will be supported by in-tree tests.
- A piece that works hand in hand with the LLVM JIT to resolve the locations of external declarations so that e.g. variables can be redeclared and (for high-performance applications like DTrace) external variables can be accessed directly from the registers where they reside.
This commit adds a tester that parses a sequence of source files and then uses them as source data for an expression. External references are resolved using an ExternalASTSource that responds to name queries using an ASTImporter. This is the setup that LLDB uses, and the motivating reason for MinimalImport in ASTImporter. When complete, this tester will implement the first of the above goals.
Differential Revision: https://reviews.llvm.org/D27180
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290004
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 16 Dec 2016 22:11:28 +0000 (22:11 +0000)]
Really revert all changes from r289979. Apparently conflict resolution failed
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289997
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 16 Dec 2016 22:10:52 +0000 (22:10 +0000)]
IRGen: Fix assertion failure when creating debug info for an integer constant wider than 64 bits.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289996
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 16 Dec 2016 21:40:16 +0000 (21:40 +0000)]
[libclang] Restore the CXXRecordDecl path for clang_Type_getNumTemplateArguments and clang_Type_getTemplateArgumentAsType
Patch by Emilio Cobos Álvarez!
See https://reviews.llvm.org/D26907
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289995
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaxun Liu [Fri, 16 Dec 2016 21:23:55 +0000 (21:23 +0000)]
Revert r289979 due to regressions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289991
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 16 Dec 2016 21:16:57 +0000 (21:16 +0000)]
[Sema] Transform the default arguments of a lambda expression when the
lambda expression is instantiated.
Rather than waiting until Sema::CheckCXXDefaultArgExpr tries to
transform the default arguments (which fails because it can't get the
template arguments that are used), transform the default arguments
earlier when the lambda expression is transformed in
TransformLambdaExpr.
rdar://problem/
27535319
Differential Revision: https://reviews.llvm.org/D23096
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289990
91177308-0d34-0410-b5e6-
96231b3b80d8
Kelvin Li [Fri, 16 Dec 2016 20:50:46 +0000 (20:50 +0000)]
[OpenMP] support the 'is_device_ptr' clause with 'target parallel' pragma
This patch is to add support of the 'is_device_ptr' clause in the 'target parallel' pragma.
Differential Revision: https://reviews.llvm.org/D27821
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289989
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 16 Dec 2016 20:25:11 +0000 (20:25 +0000)]
Remove the temporary fix to the RUN line that was committed in r289924.
Also, dump the AST and run FileCheck to make sure the expected nodes are
created in the AST.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289986
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 16 Dec 2016 19:49:14 +0000 (19:49 +0000)]
Fix clang build
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289985
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 16 Dec 2016 19:39:18 +0000 (19:39 +0000)]
Revert "Update for LLVM global variable debug info API change."
This reverts commit r289921.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289984
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaxun Liu [Fri, 16 Dec 2016 19:22:08 +0000 (19:22 +0000)]
[OpenCL] Allow disabling types and declarations associated with extensions
Added a map to associate types and declarations with extensions.
Refactored existing diagnostic for disabled types associated with extensions and extended it to declarations for generic situation.
Fixed some bugs for types associated with extensions.
Allow users to use pragma to declare types and functions for supported extensions, e.g.
#pragma OPENCL EXTENSION the_new_extension_name : begin
// declare types and functions associated with the extension here
#pragma OPENCL EXTENSION the_new_extension_name : end
Differential Revision: https://reviews.llvm.org/D21698
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289979
91177308-0d34-0410-b5e6-
96231b3b80d8
Devin Coughlin [Fri, 16 Dec 2016 18:41:40 +0000 (18:41 +0000)]
[analyzer] Fix crash in MallocChecker.
Fix a crash in the MallocChecker when the extent size for the argument
to new[] is not known.
A patch by Abramo Bagnara and Dániel Krupp!
https://reviews.llvm.org/D27849
Differential Revision: https://reviews.llvm.org/D27849
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289970
91177308-0d34-0410-b5e6-
96231b3b80d8
Artem Dergachev [Fri, 16 Dec 2016 12:21:55 +0000 (12:21 +0000)]
[analyzer] Add another exception for Qt in MallocChecker
Treat pointers passed to QObject::connectImpl() as escaping.
rdar://problem/
29550440
Differential Revision: https://reviews.llvm.org/D27717
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289939
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Fri, 16 Dec 2016 05:03:44 +0000 (05:03 +0000)]
attempt to fix bots after r289914/r289919
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289924
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 16 Dec 2016 04:26:15 +0000 (04:26 +0000)]
Update for LLVM global variable debug info API change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289921
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 16 Dec 2016 04:18:53 +0000 (04:18 +0000)]
Remove "-disable-llvm-optzns -verify" from the RUN line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289919
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 16 Dec 2016 03:19:41 +0000 (03:19 +0000)]
[Sema] Fix handling of enumerators used as default arguments of lambda
expressions in a function or class template.
This patch makes the following changes:
- Create a DependentScopeDeclRefExpr for the default argument instead of
a CXXDependentScopeMemberExpr.
- Pass CombineWithOuterScope=true so that the outer scope in which the
enum is declared is searched for the instantiation of the enum.
This is the first part of https://reviews.llvm.org/D23096. Fixes PR28795
rdar://problem/
27535319
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289914
91177308-0d34-0410-b5e6-
96231b3b80d8
Antonio Maiorano [Fri, 16 Dec 2016 01:51:43 +0000 (01:51 +0000)]
clang-format-vsix: add command to format document
Bound to Ctrl+R, Ctrl+D by default. Also added section on how to debug the extension to the Readme.
Differential Revision: https://reviews.llvm.org/D27501
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289910
91177308-0d34-0410-b5e6-
96231b3b80d8
Antonio Maiorano [Fri, 16 Dec 2016 01:37:01 +0000 (01:37 +0000)]
clang-format-vsix: add a date stamp to the VSIX version number to ensure upgradability
Presently, the version number of the VSIX matches the LLVM version number. However, as this number doesn't change often, it means that as we release new versions of this VSIX, it will have the same version number, which means users must first uninstall the old version before installing the new one. With this change, we generate a 4th part to the version number that is a date stamp (year, month, day); for example: 4.0.0.161203.
Differential Revision: https://reviews.llvm.org/D27438
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289909
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 16 Dec 2016 01:01:40 +0000 (01:01 +0000)]
Revert "Update for LLVM global variable debug info API change."
This reverts commit 289901 while investigating bot breakage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289908
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 16 Dec 2016 00:58:48 +0000 (00:58 +0000)]
[c++1z] P0195R2: Allow multiple using-declarators in a single using-declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289905
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 16 Dec 2016 00:35:42 +0000 (00:35 +0000)]
Update for LLVM global variable debug info API change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289901
91177308-0d34-0410-b5e6-
96231b3b80d8
Kelvin Li [Fri, 16 Dec 2016 00:15:54 +0000 (00:15 +0000)]
Fix typo in error messages. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289897
91177308-0d34-0410-b5e6-
96231b3b80d8
Kuba Mracek [Thu, 15 Dec 2016 23:20:54 +0000 (23:20 +0000)]
[sanitizer] Passthrough CMAKE_OSX_DEPLOYMENT_TARGET and CMAKE_OSX_SYSROOT when building compiler-rt from clang/runtime/CMakeLists.txt
Differential Revision: https://reviews.llvm.org/D26558
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289890
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Thu, 15 Dec 2016 22:55:21 +0000 (22:55 +0000)]
[asan][docs] Fix the documentation to use clang++ for the C++ example
After Darwin has been updated not to link in stdc++ on Darwin this actually
started to break.
Differential Revision: https://reviews.llvm.org/D27598
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289887
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Thu, 15 Dec 2016 22:55:18 +0000 (22:55 +0000)]
[analyzer] Teach the analyzer that pointers can escape into __cxa_demangle
This fixes a reported false positive in the malloc checker.
Differential Revision: https://reviews.llvm.org/D27599
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289886
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Thu, 15 Dec 2016 22:55:15 +0000 (22:55 +0000)]
[analyzer] Refine the diagnostics in the nullability checker to differentiate between nil and null
This is a big deal for ObjC, where nullability annotations are extensively
used. I've also changed "Null" -> "null" and removed "is" as this is the
pattern that Sema is using.
Differential Revision: https://reviews.llvm.org/D27600
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289885
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Thu, 15 Dec 2016 22:55:11 +0000 (22:55 +0000)]
[analyzer] Refer to macro names in diagnostics for macros representing a literal
When a macro expending to a literal is used in a comparison, use the macro name
in the diagnostic rather than the literal. This improves readability of path
notes.
Added tests for various macro literals that could occur. Only BOOl, Int, and
NULL tests have changed behavior with this patch.
Differential Revision: https://reviews.llvm.org/D27726
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289884
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Thu, 15 Dec 2016 22:55:03 +0000 (22:55 +0000)]
[analyzer] Include type name in Retain Count Checker diagnostics
The more detailed diagnostic will make identifying which object the
diagnostics refer to easier.
Differential Revision: https://reviews.llvm.org/D27740
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289883
91177308-0d34-0410-b5e6-
96231b3b80d8
Devin Coughlin [Thu, 15 Dec 2016 21:27:06 +0000 (21:27 +0000)]
[analyzer] Add a new SVal to support pointer-to-member operations.
Add a new type of NonLoc SVal for C++ pointer-to-member operations. This SVal
supports both pointers to member functions and pointers to member data.
A patch by Kirill Romanenkov!
Differential Revision: https://reviews.llvm.org/D25475
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289873
91177308-0d34-0410-b5e6-
96231b3b80d8
David L. Jones [Thu, 15 Dec 2016 20:53:26 +0000 (20:53 +0000)]
Add a class ASTRecordReader which wraps an ASTReader, a RecordData, and ModuleFile.
Summary:
When reading an ASTRecord, each RecordData is logically contained within a
single ModuleFile, and global(er) state is contained by a single ASTReader. This
means that any operations that read from a RecordData and reference an ASTReader
or a ModuleFile, will always reference the same ASTReader or ModuleFile.
ASTRecordReader groups these together so that parameters don't need to be
duplicated ad infinitum. Most uses of the Idx variable seem to be redunant
aliases as well, but I'll leave that for now.
Reviewers: rsmith
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D27784
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289870
91177308-0d34-0410-b5e6-
96231b3b80d8
Michal Gorny [Thu, 15 Dec 2016 20:31:08 +0000 (20:31 +0000)]
[test] Extend llvm_shlib_dir fix to unittests
Extend the fix from rL286952 to unittests. The fix added clang built
library directories (via llvm_shlib_dir) to LD_LIBRARY_PATH.
The previous logic has used llvm_libs_dir only which points to installed
LLVM when doing stand-alone builds.
The patch also removes the redundant win32 code that is no longer
necessary now that shlibdir is used unconditionally.
Differential Revision: https://reviews.llvm.org/D27812
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289865
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 15 Dec 2016 18:54:00 +0000 (18:54 +0000)]
Fix printf specifier handling: invalid specifier should not be marked as "consuming data arguments"
Reviewers: rsmith, bruno, dexonsmith
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D27796
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289850
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Thu, 15 Dec 2016 18:44:57 +0000 (18:44 +0000)]
[CUDA] Add --ptxas-path= flag.
Summary:
This lets you build with one CUDA installation but use ptxas from
another install.
This is useful e.g. if you want to avoid bugs in an old ptxas without
actually upgrading wholesale to a newer CUDA version.
Reviewers: tra
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D27788
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289847
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Thu, 15 Dec 2016 18:14:27 +0000 (18:14 +0000)]
[Driver] Bump default x86 cpu to Penryn when targeting macosx10.12+.
10.12 dropped support for all pre-Penryn Macs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289839
91177308-0d34-0410-b5e6-
96231b3b80d8
Kelvin Li [Thu, 15 Dec 2016 17:55:32 +0000 (17:55 +0000)]
Fix typo in comment. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289836
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Thu, 15 Dec 2016 16:30:20 +0000 (16:30 +0000)]
CodeGen: ubsan is built static on windows, give handlers local storage
The UBSAN runtime is built static on Windows. This requires that we give local
storage always. This impacts Windows where the linker would otherwise have to
generate a thunk to access the symbol via the IAT. This should repair the
windows clang build bots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289829
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Thu, 15 Dec 2016 12:24:20 +0000 (12:24 +0000)]
Revert "[TESTS] Initial commit of tests, by Andrew Tischenko"
This reverts commit
5898c713bee5e96aae87c73e11f3f4a7d19c74ed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289812
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Thu, 15 Dec 2016 12:06:27 +0000 (12:06 +0000)]
[TESTS] Initial commit of tests, by Andrew Tischenko
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289809
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaxun Liu [Thu, 15 Dec 2016 08:09:08 +0000 (08:09 +0000)]
Re-commit r289252 and r289285, and fix PR31374
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289787
91177308-0d34-0410-b5e6-
96231b3b80d8
Prakhar Bahuguna [Thu, 15 Dec 2016 07:59:24 +0000 (07:59 +0000)]
[ARM] Implement execute-only support in CodeGen
Summary:
This implements execute-only support for ARM code generation, which
prevents the compiler from generating data accesses to code sections.
The following changes are involved:
* Add the CodeGen option "-arm-execute-only" to the ARM code generator.
* Add the clang flag "-mexecute-only" as well as the GCC-compatible
alias "-mpure-code" to enable this option.
* When enabled, literal pools are replaced with MOVW/MOVT instructions,
with VMOV used in addition for floating-point literals. As the MOVT
instruction is required, execute-only support is only available in
Thumb mode for targets supporting ARMv8-M baseline or Thumb2.
* Jump tables are placed in data sections when in execute-only mode.
* The execute-only text section is assigned section ID 0, and is
marked as unreadable with the SHF_ARM_PURECODE flag with symbol 'y'.
This also overrides selection of ELF sections for globals.
Reviewers: t.p.northover, rengolin
Subscribers: llvm-commits, aemerson
Differential Revision: https://reviews.llvm.org/D27450
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289786
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Thu, 15 Dec 2016 07:29:04 +0000 (07:29 +0000)]
CodeGen: force builtins to be local
Unfortunately _setjmp3 can be both import or local. The ASAN tests try to
emulate the flags which makes this harder to detect. Rely on the linker
creating or using thunks here instead. Should repair the ASAN windows bots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289783
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Thu, 15 Dec 2016 06:59:05 +0000 (06:59 +0000)]
CodeGen: fix runtime function dll storage
Properly attribute DLL storage to runtime functions. When generating the
runtime function, scan for an existing declaration which may provide an explicit
declaration (local storage) or a DLL import or export storage from the user.
Honour that if available. Otherwise, if building with a local visibility of the
public or standard namespaces (-flto-visibility-public-std), give the symbols
local storage (it indicates a /MT[d] link, so static runtime). Otherwise,
assume that the link is dynamic, and give the runtime function dllimport
storage.
This allows for implementations to get the correct storage as long as they are
properly declared, the user to override the import storage, and in case no
explicit storage is given, use of the import storage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289776
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 15 Dec 2016 04:58:51 +0000 (04:58 +0000)]
Revert "Fix printf specifier handling: invalid specifier should not be marked as "consuming data arguments""
This reverts commit r289762, wasn't ready to be pushed, it broke the printf tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289763
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 15 Dec 2016 04:51:22 +0000 (04:51 +0000)]
Fix printf specifier handling: invalid specifier should not be marked as "consuming data arguments"
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289762
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 15 Dec 2016 04:02:31 +0000 (04:02 +0000)]
Fix os_log formating with arbitrary precision and field width
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289761
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 15 Dec 2016 02:35:39 +0000 (02:35 +0000)]
[c++1z] Permit constant evaluation of a call through a function pointer whose
type differs from the type of the actual function due to having a different
exception specification.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289754
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 15 Dec 2016 02:28:18 +0000 (02:28 +0000)]
Move checks for creation of objects of abstract class type from the various
constructs that can do so into the initialization code. This fixes a number
of different cases in which we used to fail to check for abstract types.
Thanks to Tim Shen for inspiring the weird code that uncovered this!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289753
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 15 Dec 2016 02:19:17 +0000 (02:19 +0000)]
Include SmallSet.h in BackendUtil.cpp
BackendUtil.cpp uses llvm::SmallSet but did not include the header. It was
included indirectly, but this will change once the AssumptionCache is removed.
NFC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289752
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Thu, 15 Dec 2016 00:02:57 +0000 (00:02 +0000)]
Use PIC relocation mode by default for PowerPC64 ELF
Most of the PowerPC64 code generation already creates PIC access. This
changes to a full PIC default, similar to what GCC is doing.
Overall, a monolithic clang binary shrinks by 600KB (about 1%). This can
be a slight regression for TLS access and will use the TOC more
aggressively instead of synthesizing immediates. It is expected to be
performance neutral.
Differential Revision: https://reviews.llvm.org/D26564
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289744
91177308-0d34-0410-b5e6-
96231b3b80d8
Dehao Chen [Wed, 14 Dec 2016 21:41:04 +0000 (21:41 +0000)]
Create SampleProfileLoader pass in llvm instead of clang
Summary:
We used to create SampleProfileLoader pass in clang. This makes LTO/ThinLTO unable to add this pass in the linker plugin. This patch moves the SampleProfileLoader pass creation from
clang to llvm pass manager builder.
Reviewers: tejohnson, davidxl, dnovillo
Subscribers: mehdi_amini, cfe-commits
Differential Revision: https://reviews.llvm.org/D27744
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289715
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 14 Dec 2016 21:38:18 +0000 (21:38 +0000)]
Revert 289252 (and follow-up 289285), it caused PR31374
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289713
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 14 Dec 2016 21:34:19 +0000 (21:34 +0000)]
Update MSVC compat docs about debug info
https://reviews.llvm.org/D27769
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289712
91177308-0d34-0410-b5e6-
96231b3b80d8
Amjad Aboud [Wed, 14 Dec 2016 20:24:40 +0000 (20:24 +0000)]
[DebugInfo] Changed DIBuilder::createCompileUnit() to take DIFile instead of FileName and Directory.
This way it will be easier to expand DIFile (e.g., to contain checksum) without the need to modify the createCompileUnit() API.
Reviewers: cfe-commits, rnk
Differential Revision: https://reviews.llvm.org/D27763
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289701
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 14 Dec 2016 19:45:03 +0000 (19:45 +0000)]
Remove unused variable found by GCC warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289698
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 14 Dec 2016 19:21:30 +0000 (19:21 +0000)]
AArch64: add architecture version feature to Clang invocation.
Otherwise we don't get the correct predefines and so on in the front-end (or
the right features in the backend).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289692
91177308-0d34-0410-b5e6-
96231b3b80d8
David Gross [Wed, 14 Dec 2016 18:52:33 +0000 (18:52 +0000)]
[DebugInfo] Restore test case for long double constants.
Summary:
D27549 (partial fix for PR26619) emits a constant value in the debug
metadata for a floating-point static const that does not exceed 64
bits in size. Whether or not a long double exceeds 64 bits in size
depends on the target. Modify the test case so that it expects a
constant value for long double if and only if the long double is no
larger than 64 bits.
Reviewers: cfe-commits, probinson
Differential Revision: https://reviews.llvm.org/D27597
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289686
91177308-0d34-0410-b5e6-
96231b3b80d8
Devin Coughlin [Wed, 14 Dec 2016 18:46:01 +0000 (18:46 +0000)]
[Driver] Add tests for enabled static analyzer checkers.
The driver passes flags to cc1 that enable various checkers based on
the target triple. This commit adds tests for these flags on Darwin, Linux,
and Windows.
This is a test-only change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289685
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 14 Dec 2016 17:44:11 +0000 (17:44 +0000)]
Improve our handling of tag decls in function prototypes
r289225 broke AST invariants by reparenting enumerators into function
decl contexts. This improves things by only reparenting TagDecls while
also attempting to preserve the lexical declcontext chain. The
interesting example here is:
int f(struct S { enum E { a = 1 } b; } c);
The semantic contexts of E and S should be f, and the lexical context of
S should be f and the lexical context of E should be S. We didn't do
that with r289225, but now we should.
This change should also improve our behavior on this example:
void f() {
extern void ext(struct S { } o);
// S injected here
}
Before r289225 we would only remove 'S' from the surrounding tag
injection context if it was the TU, but now we properly reparent S from
f to ext.
Fixes PR31366
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289678
91177308-0d34-0410-b5e6-
96231b3b80d8
Dehao Chen [Wed, 14 Dec 2016 17:22:53 +0000 (17:22 +0000)]
revert r289670 which breaks bot.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289675
91177308-0d34-0410-b5e6-
96231b3b80d8
Dehao Chen [Wed, 14 Dec 2016 16:49:34 +0000 (16:49 +0000)]
Create SampleProfileLoader pass in llvm instead of clang
Summary:
We used to create SampleProfileLoader pass in clang. This makes LTO/ThinLTO unable to add this pass in the linker plugin. This patch moves the SampleProfileLoader pass creation from
clang to llvm pass manager builder.
Reviewers: tejohnson, davidxl, dnovillo
Subscribers: mehdi_amini, cfe-commits
Differential Revision: https://reviews.llvm.org/D27744
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289670
91177308-0d34-0410-b5e6-
96231b3b80d8
Petr Hosek [Wed, 14 Dec 2016 16:46:50 +0000 (16:46 +0000)]
[Driver] Allow setting the default linker during build
This change allows setting the default linker used by the Clang
driver when configuring the build.
Differential Revision: https://reviews.llvm.org/D25263
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289668
91177308-0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Wed, 14 Dec 2016 16:09:29 +0000 (16:09 +0000)]
Update the default of the Mozilla coding style
Summary:
I also proposed the change in Firefox .clang-format file:
https://bugzilla.mozilla.org/show_bug.cgi?id=
1322321
Reviewers: klimek
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D27557
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289660
91177308-0d34-0410-b5e6-
96231b3b80d8
Kelvin Li [Wed, 14 Dec 2016 15:39:58 +0000 (15:39 +0000)]
Fix assert message. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289657
91177308-0d34-0410-b5e6-
96231b3b80d8
Neil Hickey [Wed, 14 Dec 2016 13:18:48 +0000 (13:18 +0000)]
Fixing cast condition for removing casts from builtin FPClassification.
The function SemaBuiltinFPClassification removed superfluous float to double
casts, this was changed to also remove float to float casts but this isn't
valid in all cases, for example when doing an rvaluetolvalue cast. Added a
check to only remove if this was a conventional floating cast.
Added additional tests into SemaOpenCL/extensions to cover these cases
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289650
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephan Bergmann [Wed, 14 Dec 2016 11:57:17 +0000 (11:57 +0000)]
Replace APFloatBase static fltSemantics data members with getter functions
At least the plugin used by the LibreOffice build
(<https://wiki.documentfoundation.org/Development/Clang_plugins>) indirectly
uses those members (through inline functions in LLVM/Clang include files in turn
using them), but they are not exported by utils/extract_symbols.py on Windows,
and accessing data across DLL/EXE boundaries on Windows is generally
problematic.
Differential Revision: https://reviews.llvm.org/D26671
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289647
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 14 Dec 2016 03:22:16 +0000 (03:22 +0000)]
[c++1z] P0217R3: Allow by-value structured binding of arrays.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289630
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Wed, 14 Dec 2016 02:06:11 +0000 (02:06 +0000)]
[PS4] Undo dialect tweak for Objective-C.
In r267772, we had set the PS4's default dialect for both C and
Objective-C to gnu99. Make that change only for C; we don't really
support Objective-C/C++ so there's no point fiddling the dialect.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289625
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 14 Dec 2016 01:32:13 +0000 (01:32 +0000)]
When emitting a multidimensional array copy, only emit a single flattened
cleanup loop for exception handling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289623
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 14 Dec 2016 01:17:59 +0000 (01:17 +0000)]
LTO: Add support for multi-module bitcode files.
Differential Revision: https://reviews.llvm.org/D27313
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289621
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 14 Dec 2016 00:03:17 +0000 (00:03 +0000)]
Remove custom handling of array copies in lambda by-value array capture and
copy constructors of classes with array members, instead using
ArrayInitLoopExpr to represent the initialization loop.
This exposed a bug in the static analyzer where it was unable to differentiate
between zero-initialized and unknown array values, which has also been fixed
here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289618
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 13 Dec 2016 23:32:22 +0000 (23:32 +0000)]
[CodeGen][ObjC] Emit objc_unsafeClaimAutoreleasedReturnValue for
fragile runtime too.
Follow-up to r258962.
rdar://problem/
29269006
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289615
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Tue, 13 Dec 2016 23:31:57 +0000 (23:31 +0000)]
Add support for Samsung Exynos M3 (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289614
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Tue, 13 Dec 2016 20:50:44 +0000 (20:50 +0000)]
CodeGen: Start using inrange annotations on vtable getelementptr.
This annotation allows the optimizer to split vtable groups, as permitted by
a change to the Itanium ABI [1] that prevents compilers from adjusting virtual
table pointers between virtual tables.
[1] https://github.com/MentorEmbedded/cxx-abi/pull/7
Differential Revision: https://reviews.llvm.org/D24431
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289585
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Tue, 13 Dec 2016 20:40:39 +0000 (20:40 +0000)]
CodeGen: New vtable group representation: struct of vtable arrays.
In a future change, this representation will allow us to use the new inrange
annotation on getelementptr to allow the optimizer to split vtable groups.
Differential Revision: https://reviews.llvm.org/D22296
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289584
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 13 Dec 2016 19:48:32 +0000 (19:48 +0000)]
Align EvalInfo in ExprConstant to avoid PointerUnion assertions
32-bit MSVC doesn't provide more than 4 byte stack alignment by default.
This conflicts with PointerUnion's attempt to make assertions about
alignment. This fixes the problem by explicitly asking the compiler for
8 byte alignment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289575
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Tue, 13 Dec 2016 19:22:56 +0000 (19:22 +0000)]
[Sema] Prefer SmallVector over `new`ed memory blocks. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289571
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 13 Dec 2016 18:58:09 +0000 (18:58 +0000)]
__uuidof() and declspec(uuid("...")) should be allowed on enumeration types
Although not specifically mentioned in the documentation, MSVC accepts
__uuidof(…) and declspec(uuid("…")) attributes on enumeration types in
addition to structs/classes. This is meaningful, as such types *do* have
associated UUIDs in ActiveX typelibs, and such attributes are included
by default in the wrappers generated by their #import construct, so they
are not particularly unusual.
clang currently rejects the declspec with a –Wignored-attributes
warning, and errors on __uuidof() with “cannot call operator __uuidof on
a type with no GUID” (because it rejected the uuid attribute, and
therefore finds no value). This is causing problems for us while trying
to use clang-tidy on a codebase that makes heavy use of ActiveX.
I believe I have found the relevant places to add this functionality,
this patch adds this case to clang’s implementation of these MS
extensions. patch is against r285994 (or actually the git mirror
80464680ce).
Both include an update to test/Parser/MicrosoftExtensions.cpp to
exercise the new functionality.
This is my first time contributing to LLVM, so if I’ve missed anything
else needed to prepare this for review just let me know!
__uuidof: https://msdn.microsoft.com/en-us/library/zaah6a61.aspx
declspec(uuid("…")): https://msdn.microsoft.com/en-us/library/3b6wkewa.aspx
#import: https://msdn.microsoft.com/en-us/library/8etzzkb6.aspx
Reviewers: aaron.ballman, majnemer, rnk
Differential Revision: https://reviews.llvm.org/D26846
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289567
91177308-0d34-0410-b5e6-
96231b3b80d8