]> granicus.if.org Git - clang/log
clang
8 years ago[index] Remove redundancy between symbol kind and language
Ben Langmuir [Fri, 25 Mar 2016 17:01:59 +0000 (17:01 +0000)]
[index] Remove redundancy between symbol kind and language

Condense the ObjCKIND and CXXKIND options into just KIND, since the
language was already specified on a per-symbol basis and this
information was redundant. This only changes the internal
representation; naturally the libclang interface remains the same.

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

8 years ago[ASTMatchers] Add own version of VariadicFunction.
Samuel Benzaquen [Fri, 25 Mar 2016 16:29:30 +0000 (16:29 +0000)]
[ASTMatchers] Add own version of VariadicFunction.

Summary:
llvm::VariadicFunction is only being used by ASTMatchers.
Having our own copy here allows us to remove the other one from llvm/ADT.
Also, we can extend the API to meet our needs without modifying the common
implementation.

Reviewers: alexfh

Subscribers: klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D18275

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

8 years ago[modules] Store a local offset to DeclContext lexical and visible contents. Saves...
Richard Smith [Fri, 25 Mar 2016 01:17:43 +0000 (01:17 +0000)]
[modules] Store a local offset to DeclContext lexical and visible contents. Saves a few bytes for each primary DeclContext.

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

8 years agoCGLoopInfo: Use the MD_loop metadata kind from r264371, NFC
Duncan P. N. Exon Smith [Fri, 25 Mar 2016 00:38:14 +0000 (00:38 +0000)]
CGLoopInfo: Use the MD_loop metadata kind from r264371, NFC

Besides a small compile-time speedup, there should be no real
functionality change here.

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

8 years agoDebug Info: Add a testcase for the bug introduced by r259975.
Adrian Prantl [Fri, 25 Mar 2016 00:20:35 +0000 (00:20 +0000)]
Debug Info: Add a testcase for the bug introduced by r259975.
In r259975 we rauw'ed the scope of enum declarations without taking into
account that DIBuilder strips out scope references that point to the
DICompileUnit to facilitate type uniquing.

This testcase guards against making the same mistake again.
<rdar://problem/25078246>

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

8 years agoFix nondeterminism in computation of builtin operator overload sets.
Richard Smith [Fri, 25 Mar 2016 00:08:53 +0000 (00:08 +0000)]
Fix nondeterminism in computation of builtin operator overload sets.

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

8 years ago[modules] Store offset to LOCAL_REDECLARATIONS record relative to the current
Richard Smith [Thu, 24 Mar 2016 23:41:14 +0000 (23:41 +0000)]
[modules] Store offset to LOCAL_REDECLARATIONS record relative to the current
record rather than relative to the start of the bitcode file. Saves a couple of
bytes per LOCAL_REDECLARATIONS record (also makes diffs of llvm-bcanalyzer
output more useful when tracking down nondeterminism...).

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

8 years agoAttach profile summary information to Module.
Easwaran Raman [Thu, 24 Mar 2016 21:32:25 +0000 (21:32 +0000)]
Attach profile summary information to Module.

Differential Revision: http://reviews.llvm.org/D18289

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

8 years agoRevert "Recommitted r263425 "Supporting all entities declared in lexical scope in...
Reid Kleckner [Thu, 24 Mar 2016 20:38:43 +0000 (20:38 +0000)]
Revert "Recommitted r263425 "Supporting all entities declared in lexical scope in LLVM debug info." After fixing PR26942 (the fix is included in this commit)."

This reverts commit r264281.

This change breaks building Chromium for iOS. We'll upload a reproducer
to the PR soon.

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

8 years agoChange ADL to produce lookup results in a deterministic order. This fixes some
Richard Smith [Thu, 24 Mar 2016 19:12:22 +0000 (19:12 +0000)]
Change ADL to produce lookup results in a deterministic order. This fixes some
rare issues with nondeterministic diagnostic order, and some very common issues
with nondeterministic module builds.

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

8 years agoFix a missing comma between two string literals.
Etienne Bergeron [Thu, 24 Mar 2016 18:29:24 +0000 (18:29 +0000)]
Fix a missing comma between two string literals.

Summary:
The two literals are currently appended.

I'm not sure what was broken by this. Please double check carefully.

Silly bug found by an on-going checker for clang-tidy.

Reviewers: alexfh, arsenm, rnk

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D18454

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

8 years agoDsiable FormatStyle::GetStyleOfFile test case for mingw.
Eric Liu [Thu, 24 Mar 2016 14:59:39 +0000 (14:59 +0000)]
Dsiable FormatStyle::GetStyleOfFile test case for mingw.

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

8 years agoRecommitted r263425 "Supporting all entities declared in lexical scope in LLVM debug...
Amjad Aboud [Thu, 24 Mar 2016 13:30:41 +0000 (13:30 +0000)]
Recommitted r263425 "Supporting all entities declared in lexical scope in LLVM debug info."
After fixing PR26942 (the fix is included in this commit).

Differential Revision: http://reviews.llvm.org/D18350

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

8 years agoAdded support for different VFSs in format::getStyle. Disable platform-related test...
Eric Liu [Thu, 24 Mar 2016 13:22:42 +0000 (13:22 +0000)]
Added support for different VFSs in format::getStyle. Disable platform-related test case for MS compilers to avoid breaking buildbot.

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

8 years agoRevert "Added support for different VFSs in format::getStyle."
Eric Liu [Thu, 24 Mar 2016 13:22:37 +0000 (13:22 +0000)]
Revert "Added support for different VFSs in format::getStyle."

This reverts commit r264253. It is breaking the buildbot http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/2203

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

8 years agoRevert "removed redundant comment in format::getStyle."
Eric Liu [Thu, 24 Mar 2016 13:22:28 +0000 (13:22 +0000)]
Revert "removed redundant comment in format::getStyle."

This reverts commit r264254.

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

8 years agoFix Sphinx errors with documentation build.
Aaron Ballman [Thu, 24 Mar 2016 12:34:44 +0000 (12:34 +0000)]
Fix Sphinx errors with documentation build.

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

8 years agoRevert "Added support for different VFSs in format::getStyle."
Eric Liu [Thu, 24 Mar 2016 11:25:28 +0000 (11:25 +0000)]
Revert "Added support for different VFSs in format::getStyle."

This reverts commit r264253. It is breaking the buildbot http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/2203

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

8 years agoRevert "removed redundant comment in format::getStyle."
Eric Liu [Thu, 24 Mar 2016 11:24:49 +0000 (11:24 +0000)]
Revert "removed redundant comment in format::getStyle."

This reverts commit r264254.

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

8 years agoremoved redundant comment in format::getStyle.
Eric Liu [Thu, 24 Mar 2016 10:50:26 +0000 (10:50 +0000)]
removed redundant comment in format::getStyle.

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

8 years agoAdded support for different VFSs in format::getStyle.
Eric Liu [Thu, 24 Mar 2016 10:50:17 +0000 (10:50 +0000)]
Added support for different VFSs in format::getStyle.

Summary:
Previously, format::getStyle assumes that the given file resides in
the real file system, which prevents the use of virtual file system in testing etc.
This patch adds a parameter in format::getStyle interface so that users can specify
the right file system. By default, the file system is the real file system.

Reviewers: djasper, klimek

Subscribers: cfe-commits, klimek

Differential Revision: http://reviews.llvm.org/D18399

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

8 years agoTest commit access to clang repo.
Eric Liu [Thu, 24 Mar 2016 10:21:00 +0000 (10:21 +0000)]
Test commit access to clang repo.

Summary: Test commit access to clang repo.

Reviewers: cfe-commits

Subscribers: klimek

Differential Revision: http://reviews.llvm.org/D18432

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

8 years ago[OpenCL] Add ocl and spir version for spir target
Xiuli Pan [Thu, 24 Mar 2016 03:57:17 +0000 (03:57 +0000)]
[OpenCL] Add ocl and spir version for spir target

Summary: Add opencl.spir.version and opencl.ocl.version metadata for CodeGen to identify OpenCL version.

Reviewers: yaxunl, Anastasia

Subscribers: cfe-commits, pekka.jaaskelainen

Differential Revision: http://reviews.llvm.org/D17596

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

8 years agoAdd release notes for the removal of the silent include of altivec.h.
Eric Christopher [Thu, 24 Mar 2016 01:28:25 +0000 (01:28 +0000)]
Add release notes for the removal of the silent include of altivec.h.

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

8 years agoThe time when -faltivec (or, on clang only, -maltivec) will magically
Eric Christopher [Thu, 24 Mar 2016 01:26:08 +0000 (01:26 +0000)]
The time when -faltivec (or, on clang only, -maltivec) will magically
include altivec.h has come and gone.

Rationale: This causes modules, rewrite-includes, etc to be sad and
people should just include altivec.h in their source.

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

8 years agoDisplay const/volatile/restrict qualifiers in Visual Studio visualizations
Mike Spertus [Thu, 24 Mar 2016 00:38:54 +0000 (00:38 +0000)]
Display const/volatile/restrict qualifiers in Visual Studio visualizations

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

8 years agoModules builds are necessarily compile actions, but they don't
Eric Christopher [Thu, 24 Mar 2016 00:34:02 +0000 (00:34 +0000)]
Modules builds are necessarily compile actions, but they don't
necessarily produce object files. Turn off split dwarf if we're not
producing a file that the driver believes is an object file.

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

8 years agoNFC: clarify comment on lock-free macros
JF Bastien [Thu, 24 Mar 2016 00:20:44 +0000 (00:20 +0000)]
NFC: clarify comment on lock-free macros

Used by both libstdc++ and libc++.

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

8 years agoFix a typo, Tiles -> Files, NFC
Vedant Kumar [Wed, 23 Mar 2016 23:51:36 +0000 (23:51 +0000)]
Fix a typo, Tiles -> Files, NFC

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

8 years agoclang-cl: Add a FIXME for bumping the default msc version.
Nico Weber [Wed, 23 Mar 2016 23:26:59 +0000 (23:26 +0000)]
clang-cl: Add a FIXME for bumping the default msc version.

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

8 years agoFix typo in test from r264210, sigh.
Nico Weber [Wed, 23 Mar 2016 23:01:38 +0000 (23:01 +0000)]
Fix typo in test from r264210, sigh.

(The test passes both with and without this change, but it's confusing without
it.)

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

8 years agoclang-cl: With -fmsc-version=1900, use MSVS2015 diag formatting.
Nico Weber [Wed, 23 Mar 2016 22:57:55 +0000 (22:57 +0000)]
clang-cl: With -fmsc-version=1900, use MSVS2015 diag formatting.

Remove tests that have neither a triple nor an explicit -fmsc-version flag,
since in the absence of an -fmsc-version flag, the implicit value of the flag
is 17 (MSVC2013) with MSVC triples but 0 (not set) for other triples, and
the default triple is platform dependent.

This relands r263974 with a test fix.

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

8 years ago[CUDA] Merge most of CodeGenCUDA/function-overload.cu into SemaCUDA/function-overload.cu.
Justin Lebar [Wed, 23 Mar 2016 22:42:30 +0000 (22:42 +0000)]
[CUDA] Merge most of CodeGenCUDA/function-overload.cu into SemaCUDA/function-overload.cu.

Summary:
Previously we were using the codegen test to ensure that we choose the
right overload.  But we can do this within sema, with a bit of
cleverness.

I left the constructor/destructor checks in CodeGen, because these
overloads (particularly on the destructors) are hard to check in Sema.

Reviewers: tra

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D18386

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

8 years ago[CUDA] Simplify SemaCUDA/function-overload.cu test.
Justin Lebar [Wed, 23 Mar 2016 22:42:28 +0000 (22:42 +0000)]
[CUDA] Simplify SemaCUDA/function-overload.cu test.

Summary:
Principally, don't hardcode the line numbers of various notes.  This
lets us make changes to the test without recomputing linenos everywhere.

Instead, just tell -verify that we may get 0 or more notes pointing to
the relevant function definitions.  Checking that we get exactly the
right note isn't so important (and anyway is checked elsewhere).

Reviewers: tra

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D18385

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

8 years ago[CUDA] Don't define __NVCC__.
Justin Lebar [Wed, 23 Mar 2016 22:42:27 +0000 (22:42 +0000)]
[CUDA] Don't define __NVCC__.

Summary:
We decided this makes life too difficult for code authors.  For example,
people may want to detect NVCC and disable variadic templates, which
NVCC does not support, but which we do.

Since people are going to have to change compiler flags *anyway* in
order to compile with clang, if they really want the old behavior, they
can pass -D__NVCC__.

Tested with tensorflow and thrust, no apparent problems.

Reviewers: tra

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D18417

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

8 years agoAdd missing __builtin_bitreverse8
Matt Arsenault [Wed, 23 Mar 2016 22:14:43 +0000 (22:14 +0000)]
Add missing __builtin_bitreverse8

Also add documentation for bitreverse builtins

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

8 years agoObjC: add getter/setter for class properties to global pool.
Manman Ren [Wed, 23 Mar 2016 21:39:31 +0000 (21:39 +0000)]
ObjC: add getter/setter for class properties to global pool.

rdar://problem/25323072

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

8 years agoMake SemaAccess smarter about determining when a dependent class might
Richard Smith [Wed, 23 Mar 2016 20:39:06 +0000 (20:39 +0000)]
Make SemaAccess smarter about determining when a dependent class might
instantiate to match a friend class declaration. It's still pretty dumb,
though.

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

8 years agoMake sure to perform dependent access checks when instantiating a
Richard Smith [Wed, 23 Mar 2016 20:07:07 +0000 (20:07 +0000)]
Make sure to perform dependent access checks when instantiating a
lambda-expression. We don't actually instantiate the closure type / operator()
in the template in order to produce the closure type / operator() in the
instantiation, so this isn't caught by the normal path.

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

8 years agoclang-cl: Fix remaining bugs in interaction of /Yc and /FI /showIncludes.
Nico Weber [Wed, 23 Mar 2016 18:46:57 +0000 (18:46 +0000)]
clang-cl: Fix remaining bugs in interaction of /Yc and /FI /showIncludes.

Instead of putting the /Yc header into ExtraDeps, give DependencyOutputOptions
a dedicated field for /Yc mode, and let HeaderIncludesCallback hang on to the
full DependencyOutputOptions object, not just ExtraDeps.

Reverts parts of r263352 that are now no longer needed.

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

8 years agoclang-cl: Add more tests for the interaction of /FI and /Yc /Yu.
Nico Weber [Wed, 23 Mar 2016 18:17:02 +0000 (18:17 +0000)]
clang-cl: Add more tests for the interaction of /FI and /Yc /Yu.

Most things even work; see the included FIXMEs for things that need polishing.

Also don't warn about unused flags for the `/Yuh2.h /FIh1.h /FIh2.h`.  The
common case is that the pch was built with `/Ych2.h /FIh1.h /FIh2.h`, so h1.h
is in the PCH, and we shouldn't warn about /FIh1.h not having an effect.
(If we wanted to get fancy, we could store the list of -include flags in the
pch and then check that it matches later on.)

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

8 years agoclang-cl: Include /FI headers in /showIncludes output.
Nico Weber [Wed, 23 Mar 2016 18:00:22 +0000 (18:00 +0000)]
clang-cl: Include /FI headers in /showIncludes output.

-H in gcc mode doesn't print -include headers, but they are included in
depfiles written by MMD and friends. Since /showIncludes is what's used instead
of depfiles, printing /FI there seems important (and matches cl.exe).

Instead of giving HeaderIncludeGen more options, just switch on ShowAllHeaders
in clang-cl mode and let clang::InitializePreprocessor() not put -include flags
in the <command line> block. This changes the behavior of -E slightly, and it
removes the <command line> flag from the output triggered by setting the
obscure CC_PRINT_HEADERS=1 env var to true while running clang. Both of these
seem ok to change.

http://reviews.llvm.org/D18401

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

8 years ago[NFC] Delete an unused function parameter from a static function
Faisal Vali [Wed, 23 Mar 2016 17:39:51 +0000 (17:39 +0000)]
[NFC] Delete an unused function parameter from a static function

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

8 years agoVisualize fields of records as they were declared in Visual Studio debugger
Mike Spertus [Wed, 23 Mar 2016 17:29:42 +0000 (17:29 +0000)]
Visualize fields of records as they were declared in Visual Studio debugger

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

8 years agoObjC: Handle boolean fixed type for enum.
Manman Ren [Wed, 23 Mar 2016 16:28:28 +0000 (16:28 +0000)]
ObjC: Handle boolean fixed type for enum.

Before this commit, we assert failure in ImplicitCastExpr
"unheralded conversion to bool". This commit fixes the assertion by using
the correct cast type when the fixed type is boolean.

This commit also fixes the behavior for Microsoft mode as well, since
Obj-C and Microsoft mode share the same code path.

rdar://24999533

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

8 years ago[analyzer] Fix typo s/initalize/initialize/
Chih-Hung Hsieh [Wed, 23 Mar 2016 16:14:12 +0000 (16:14 +0000)]
[analyzer] Fix typo s/initalize/initialize/

Differential Revision: http://reviews.llvm.org/D18363

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

8 years agoclang-cl: Don't warn about /Oy- being unused in 64-bit builds.
Nico Weber [Wed, 23 Mar 2016 15:37:41 +0000 (15:37 +0000)]
clang-cl: Don't warn about /Oy- being unused in 64-bit builds.

http://reviews.llvm.org/D18392

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

8 years agoUse an enum instead of hardcoded indices. NFC.
Alexander Kornienko [Wed, 23 Mar 2016 14:28:52 +0000 (14:28 +0000)]
Use an enum instead of hardcoded indices. NFC.

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

8 years agoCombine identical check-prefixes in Clang test/Preprocessor/arm-target-features.c
Artyom Skrobov [Wed, 23 Mar 2016 13:32:33 +0000 (13:32 +0000)]
Combine identical check-prefixes in Clang test/Preprocessor/arm-target-features.c

Reviewers: rengolin, t.p.northover

Subscribers: aemerson, cfe-commits, rengolin

Differential Revision: http://reviews.llvm.org/D18391

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

8 years ago[X86] Add "x87" in x86 target feature map.
Andrey Turetskiy [Wed, 23 Mar 2016 11:15:10 +0000 (11:15 +0000)]
[X86] Add "x87" in x86 target feature map.

Differential Revision: http://reviews.llvm.org/D13980

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

8 years ago[Sema] Allow implicit conversions of &overloaded_fn in C.
George Burgess IV [Wed, 23 Mar 2016 02:33:58 +0000 (02:33 +0000)]
[Sema] Allow implicit conversions of &overloaded_fn in C.

Also includes a minor ``enable_if`` docs update.

Currently, our address-of overload machinery will only allow implicit
conversions of overloaded functions to void* in C. For example:

```
void f(int) __attribute__((overloadable));
void f(double) __attribute__((overloadable, enable_if(0, "")));

void *fp = f; // OK. This is C and the target is void*.
void (*fp2)(void) = f; // Error. This is C, but the target isn't void*.
```

This patch makes the assignment of `fp2` select the `f(int)` overload,
rather than emitting an error (N.B. you'll still get a warning about the
`fp2` assignment if you use -Wincompatible-pointer-types).

Differential Revision: http://reviews.llvm.org/D13704

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

8 years ago[Apple Clang] Expose llvm-config from stage2 builds in stage1
Chris Bieneman [Wed, 23 Mar 2016 01:47:05 +0000 (01:47 +0000)]
[Apple Clang] Expose llvm-config from stage2 builds in stage1

This exposes the stage2-llvm-config target though the stage1 build configuration.

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

8 years ago[CUDA] Don't allow templated variadic functions.
Justin Lebar [Tue, 22 Mar 2016 22:06:19 +0000 (22:06 +0000)]
[CUDA] Don't allow templated variadic functions.

Reviewers: tra

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D18373

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

8 years agoUpdate cxx-features test to C++1z
JF Bastien [Tue, 22 Mar 2016 21:12:48 +0000 (21:12 +0000)]
Update cxx-features test to C++1z

Forked from the following patch:
  http://reviews.llvm.org/D17950

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

8 years agoD18325: Added mm_malloc module export.
John Thompson [Tue, 22 Mar 2016 20:57:51 +0000 (20:57 +0000)]
D18325: Added mm_malloc module export.

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

8 years agoStaticAnalyzer: Avoid an unintentional copy
Justin Bogner [Tue, 22 Mar 2016 17:50:05 +0000 (17:50 +0000)]
StaticAnalyzer: Avoid an unintentional copy

The range here isn't over references, so using `auto &` here incites a
copy. Switching to `auto *` would do, but we might as well list an
explicit type for clarity.

Found by -Wrange-loop-analysis.

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

8 years agoMake build bots happy
David Majnemer [Tue, 22 Mar 2016 17:10:07 +0000 (17:10 +0000)]
Make build bots happy

BasicBlock's lose their names for some builders, don't mention such
names.

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

8 years ago[MS ABI] Assign an inheritance model for the dest of a member pointer upcast
David Majnemer [Tue, 22 Mar 2016 16:44:39 +0000 (16:44 +0000)]
[MS ABI] Assign an inheritance model for the dest of a member pointer upcast

While we correctly assigned an inheritance model for the source of a
member pointer upcast, we did not do so for the destination.

This fixes PR27030.

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

8 years ago[Perf-training] Using os.devnull instead of a temp file
Chris Bieneman [Tue, 22 Mar 2016 16:33:23 +0000 (16:33 +0000)]
[Perf-training] Using os.devnull instead of a temp file

This is based on post-commit feedback from Vedant. Totally didn't know that existed and worked on Windows.

Thanks Vedant!

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

8 years ago[Perf-training] Cleanup based on feedback from Sean Silvas
Chris Bieneman [Tue, 22 Mar 2016 16:27:35 +0000 (16:27 +0000)]
[Perf-training] Cleanup based on feedback from Sean Silvas

Sean provided feedback based on r257934 on cfe-commits. This change addresses that feedback.

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

8 years agoclang-format: [JS] do not wrap ES6 imports/exports.
Daniel Jasper [Tue, 22 Mar 2016 14:32:20 +0000 (14:32 +0000)]
clang-format: [JS] do not wrap ES6 imports/exports.

"import ... from '...';" and "export ... from '...';" should be treated
the same as goog.require/provide/module/forwardDeclare calls.

Patch by Martin Probst.

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

8 years ago[ASTMatchers] New matcher hasReturnValue added
Alexander Kornienko [Tue, 22 Mar 2016 11:03:03 +0000 (11:03 +0000)]
[ASTMatchers] New matcher hasReturnValue added

Summary: A checker (will be uploaded after this patch) needs to check implicit casts. Existing generic matcher "has" ignores implicit casts and parenthesized expressions and no specific matcher for matching return value expression preexisted. The patch adds such a matcher (hasReturnValue).

Reviewers: klimek, sbenza

Subscribers: xazax.hun, klimek, cfe-commits

Patch by Ádám Balogh!

Differential Revision: http://reviews.llvm.org/D17986

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

8 years agoFix warning about extra semicolon. NFC.
Vasileios Kalintiris [Tue, 22 Mar 2016 10:41:20 +0000 (10:41 +0000)]
Fix warning about extra semicolon. NFC.

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

8 years ago[Objective-c] Do not set IsExact to true when the receiver is a class.
Akira Hatanaka [Tue, 22 Mar 2016 05:00:21 +0000 (05:00 +0000)]
[Objective-c] Do not set IsExact to true when the receiver is a class.

IsExact shouldn't be set to true in WeakObjectProfileTy::getBaseInfo
when the receiver is a class because having a class as the receiver
doesn't guarantee that the Base is exact.

This is a follow-up to r263818.

rdar://problem/25208167

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

8 years ago[Perf-training] Fixing an issue with multi-threading PGO generation
Chris Bieneman [Tue, 22 Mar 2016 02:55:40 +0000 (02:55 +0000)]
[Perf-training] Fixing an issue with multi-threading PGO generation

When LIT parallelizes the profraw file generation we need to generate unique temp filenames then clean them up after the driver executes.

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

8 years agoVisual Studio Native Visualizations for constructors and methods
Mike Spertus [Tue, 22 Mar 2016 02:29:22 +0000 (02:29 +0000)]
Visual Studio Native Visualizations for constructors and methods

With this change, the class

  struct A {
    A(int _i);
    ~A();
    int foo(double d);
    double bar(A *a) { return 1.3; }
  };

appears in the VS2015 Locals Window as

D              0x02dbb378 struct A
|- DeclKind    CXXRecord
|- Members
 |- [0]        implicit struct A
 |- [1]        Constructor {A(int _i)}
 |- [2]        Destructor {~A()}
 |- [3]        Method {int foo(double d)}
 |- [4]        Method {double bar(struct A *)}
|- [Raw View]  /* Other stuff */

Note that these changes only benefit VS2015 as
VS2013 does not have views and only displays the
struct name "A", but the change does no apparent
harm in VS2013, so is still a win.

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

8 years ago[OpenMP] Base support for target directive codegen on NVPTX device.
Arpith Chacko Jacob [Tue, 22 Mar 2016 01:48:56 +0000 (01:48 +0000)]
[OpenMP] Base support for target directive codegen on NVPTX device.

Summary:
This patch adds base support for codegen of the target directive on the NVPTX device.

Reviewers: ABataev

Differential Revision: http://reviews.llvm.org/D17877

Reworked test case after buildbot failure on windows.
Updated patch to integrate r263837 and test case nvptx_target_firstprivate_codegen.cpp.

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

8 years ago[CUDA] Implement atomicInc and atomicDec builtins
Justin Lebar [Tue, 22 Mar 2016 00:09:28 +0000 (00:09 +0000)]
[CUDA] Implement atomicInc and atomicDec builtins

These functions cannot be implemented as atomicrmw or cmpxchg
instructions, so they are implemented as a call to the NVVM intrinsics
@llvm.nvvm.atomic.load.inc.32.p0i32 and
@llvm.nvvm.atomic.load.dec.32.p0i32.

Patch by Jason Henline.

Reviewers: jlebar

Differential Revision: http://reviews.llvm.org/D18322

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

8 years ago[sema] [CUDA] Use std algorithms in EraseUnwantedCUDAMatchesImpl.
Justin Lebar [Tue, 22 Mar 2016 00:09:25 +0000 (00:09 +0000)]
[sema] [CUDA] Use std algorithms in EraseUnwantedCUDAMatchesImpl.

Summary: NFC

Reviewers: tra

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D18327

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

8 years agoRevert r263974, "clang-cl: With -fmsc-version=1900, use MSVS2015 diag formatting."
NAKAMURA Takumi [Mon, 21 Mar 2016 23:51:50 +0000 (23:51 +0000)]
Revert r263974, "clang-cl: With -fmsc-version=1900, use MSVS2015 diag formatting."

It seems the test wouldn't expect if default target is *-win32.

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

8 years ago[Perf-training] Adding support for tests to skip the clang driver
Chris Bieneman [Mon, 21 Mar 2016 22:37:14 +0000 (22:37 +0000)]
[Perf-training] Adding support for tests to skip the clang driver

This patch adds a new set of substitutions to the lit run lines for order files and PGO generation which run the clang driver to get the cc1 command, then execute the cc1 command directly. This allows the scripts to bypass profiling the clang driver over and over again.

The approach in this patch was discussed via IRC with Sean Silvas.

Special thanks to Daniel Dunbar whose out-of-tree code I liberally plagiarized.

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

8 years ago[modules] Store mangling numbers in a deterministic order so they don't cause the...
Richard Smith [Mon, 21 Mar 2016 22:33:02 +0000 (22:33 +0000)]
[modules] Store mangling numbers in a deterministic order so they don't cause the resulting .pcm files to be nondeterministic.

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

8 years ago[modules] Renumber DECL_UPDATES from 30 to 50, so it no longer collides with
Richard Smith [Mon, 21 Mar 2016 21:16:01 +0000 (21:16 +0000)]
[modules] Renumber DECL_UPDATES from 30 to 50, so it no longer collides with
TYPE_TEMPLATE_SPECIALIZATION. This was fine in practice because both record
kinds are only ever found by offset, but made the llvm-bcanalyzer -dump output
very confusing.

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

8 years agoRevert "Convert some ObjC msgSends to runtime calls."
Pete Cooper [Mon, 21 Mar 2016 20:50:03 +0000 (20:50 +0000)]
Revert "Convert some ObjC msgSends to runtime calls."

This reverts commit r263607.

This change caused more objc_retain/objc_release calls in the IR but those
are then incorrectly optimized by the ARC optimizer.  Work is going to have
to be done to ensure the ARC optimizer doesn't optimize user written RR, but
that should land before this change.

This change will also need to be updated to take account for any changes required
to ensure that user written calls to RR are distinct from those inserted by ARC.

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

8 years agoclang-cl: With -fmsc-version=1900, use MSVS2015 diag formatting.
Nico Weber [Mon, 21 Mar 2016 19:44:18 +0000 (19:44 +0000)]
clang-cl: With -fmsc-version=1900, use MSVS2015 diag formatting.

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

8 years ago[modules] Don't invent a module cache path unless implicit module builds are enabled.
Richard Smith [Mon, 21 Mar 2016 19:06:06 +0000 (19:06 +0000)]
[modules] Don't invent a module cache path unless implicit module builds are enabled.

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

8 years agoclang-format: [JS] no space in union and intersection types.
Daniel Jasper [Mon, 21 Mar 2016 17:57:31 +0000 (17:57 +0000)]
clang-format: [JS] no space in union and intersection types.

The operators | and & in types, as opposed to the bitwise operators,
should not have whitespace around them (e.g. `Foo<Bar|Baz>`).

Patch by Martin Probst. Thank you.

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

8 years agoAdd replacement = "xxx" to AvailabilityAttr.
Manman Ren [Mon, 21 Mar 2016 17:30:55 +0000 (17:30 +0000)]
Add replacement = "xxx" to AvailabilityAttr.

This commit adds a named argument to AvailabilityAttr, while r263652 adds an
optional string argument to __attribute__((deprecated)).

This was commited in r263687 and reverted in 263752 due to misaligned
access.

rdar://20588929

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

8 years ago[ARM] Clang tests for ARM Cortex-A32 support
Renato Golin [Mon, 21 Mar 2016 17:29:51 +0000 (17:29 +0000)]
[ARM] Clang tests for ARM Cortex-A32 support

Patch by Sam Parker.

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

8 years agoNFC: wrap Availability-related data in its own struct in AttributeList.
Manman Ren [Mon, 21 Mar 2016 17:26:40 +0000 (17:26 +0000)]
NFC: wrap Availability-related data in its own struct in AttributeList.

This makes it easy to add more data into Availability.

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

8 years agoclang-cl: Move /FC from "Unsupported" to "Ignored" list.
Nico Weber [Mon, 21 Mar 2016 17:19:31 +0000 (17:19 +0000)]
clang-cl: Move /FC from "Unsupported" to "Ignored" list.

/FC affects if diagnostics print with full paths and if __FILE__ expands with a
full path.  clang-cl does both of these two by default.

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

8 years agoclang-cl: support __cdecl-on-struct anachronism
Reid Kleckner [Mon, 21 Mar 2016 16:08:49 +0000 (16:08 +0000)]
clang-cl: support __cdecl-on-struct anachronism

Summary:
The Microsoft compiler emits

  warning C4229: anachronism used : modifiers on data are ignored

for

  struct {} __cdecl s;

but ICU's gendict can generate such (and does when building
LibreOffice), so accepting this in clang-cl too would be useful.

Reviewers: rnk

Patch by Stephan Bergmann

Differential Revision: http://reviews.llvm.org/D16628

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

8 years agoclang-format: Make include sorting's main include detection configurable.
Daniel Jasper [Mon, 21 Mar 2016 14:11:27 +0000 (14:11 +0000)]
clang-format: Make include sorting's main include detection configurable.

This patch adds a regular expression to configure suffixes of an
included file to check whether it is the "main" include of the current
file. Previously, clang-format has allowed arbitrary suffixes on the
formatted file, which is still the case when no IncludeMainRegex is
specified.

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

8 years agoRemove debug output. Sorry for the noise.
NAKAMURA Takumi [Mon, 21 Mar 2016 11:44:05 +0000 (11:44 +0000)]
Remove debug output. Sorry for the noise.

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

8 years agoclang/test/CodeGenCXX/cxx1z-lambda-star-this.cpp: Satisfy -Asserts.
NAKAMURA Takumi [Mon, 21 Mar 2016 11:40:15 +0000 (11:40 +0000)]
clang/test/CodeGenCXX/cxx1z-lambda-star-this.cpp: Satisfy -Asserts.

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

8 years agoclang/test/Frontend/plugin-annotate-functions.c requires the target examples/Annotate...
NAKAMURA Takumi [Mon, 21 Mar 2016 11:03:39 +0000 (11:03 +0000)]
clang/test/Frontend/plugin-annotate-functions.c requires the target examples/AnnotateFunctions.

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

8 years agoReorder data members to be consistent with member initializers, to silence warnings.
Faisal Vali [Mon, 21 Mar 2016 10:37:42 +0000 (10:37 +0000)]
Reorder data members to be consistent with member initializers, to silence warnings.

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

8 years ago[Cxx1z] Implement Lambda Capture of *this by Value as [=,*this] (P0018R3)
Faisal Vali [Mon, 21 Mar 2016 09:25:37 +0000 (09:25 +0000)]
[Cxx1z] Implement Lambda Capture of *this by Value as [=,*this] (P0018R3)

Implement lambda capture of *this by copy.
For e.g.:
struct A {

  int d = 10;
  auto foo() { return [*this] (auto a) mutable { d+=a; return d; }; }

};

auto L = A{}.foo(); // A{}'s lifetime is gone.

// Below is still ok, because *this was captured by value.
assert(L(10) == 20);
assert(L(100) == 120);

If the capture was implicit, or [this] (i.e. *this was captured by reference), this code would be otherwise undefined.

Implementation Strategy:
  - amend the parser to accept *this in the lambda introducer
  - add a new king of capture LCK_StarThis
  - teach Sema::CheckCXXThisCapture to handle by copy captures of the
    enclosing object (i.e. *this)
  - when CheckCXXThisCapture does capture by copy, the corresponding
    initializer expression for the closure's data member
    direct-initializes it thus making a copy of '*this'.
  - in codegen, when assigning to CXXThisValue, if *this was captured by
    copy, make sure it points to the corresponding field member, and
    not, unlike when captured by reference, what the field member points
    to.
  - mark feature as implemented in svn

Much gratitude to Richard Smith for his carefully illuminating reviews!

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

8 years agoclang-cl: Add a comment about /Oy- (see r245913).
Nico Weber [Mon, 21 Mar 2016 02:48:05 +0000 (02:48 +0000)]
clang-cl: Add a comment about /Oy- (see r245913).

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

8 years agoVisual Studio Visualizers for clang::FunctionDecl
Mike Spertus [Sun, 20 Mar 2016 20:15:23 +0000 (20:15 +0000)]
Visual Studio Visualizers for clang::FunctionDecl

Readably displays a FunctionDecl in the Visual Studio Locals Window something like:
  void g(int, double d, struct A && arr)

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

8 years ago[tsan] Allow -fsanitize=thread for iOS-style simulator targets
Devin Coughlin [Sun, 20 Mar 2016 18:24:33 +0000 (18:24 +0000)]
[tsan] Allow -fsanitize=thread for iOS-style simulator targets

Update the clang driver to allow -fsanitize=thread when targeting x86_64 iOS and tvOS
simulators. Also restrict TSan targeting OS X to only be supported on x86_64 and not i386.

Differential Revision: http://reviews.llvm.org/D18280

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

8 years ago[VFS] Fix test to use more restrict set of headers
Bruno Cardoso Lopes [Sun, 20 Mar 2016 18:08:32 +0000 (18:08 +0000)]
[VFS] Fix test to use more restrict set of headers

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

8 years agoAST: Fix some bogus indentation. NFC
Justin Bogner [Sun, 20 Mar 2016 16:58:03 +0000 (16:58 +0000)]
AST: Fix some bogus indentation. NFC

Noticed by Liu Xin. Thanks!

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

8 years agoFixed -Wdocumentation warning
Simon Pilgrim [Sun, 20 Mar 2016 16:25:23 +0000 (16:25 +0000)]
Fixed -Wdocumentation warning

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

8 years agoMark C++ features implemented in Clang 3.8 as done now that 3.8 has released.
Richard Smith [Sun, 20 Mar 2016 10:37:12 +0000 (10:37 +0000)]
Mark C++ features implemented in Clang 3.8 as done now that 3.8 has released.

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

8 years agoP0184R0: Allow types of 'begin' and 'end' expressions in range-based for loops to...
Richard Smith [Sun, 20 Mar 2016 10:33:40 +0000 (10:33 +0000)]
P0184R0: Allow types of 'begin' and 'end' expressions in range-based for loops to differ.

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

8 years agoReapply [2] [VFS] Add 'overlay-relative' field to YAML files
Bruno Cardoso Lopes [Sun, 20 Mar 2016 02:08:48 +0000 (02:08 +0000)]
Reapply [2] [VFS] Add 'overlay-relative' field to YAML files

This reapplies r261552 and r263748. Fixed testcase to reapply.

The VFS overlay mapping between virtual paths and real paths is done through
the 'external-contents' entries in YAML files, which contains hardcoded paths
to the real files.

When a module compilation crashes, headers are dumped into <name>.cache/vfs
directory and are mapped via the <name>.cache/vfs/vfs.yaml. The script
generated for reproduction uses -ivfsoverlay pointing to file to gather the
mapping between virtual paths and files inside <name>.cache/vfs. Currently, we
are only capable of reproducing such crashes in the same machine as they
happen, because of the hardcoded paths in 'external-contents'.

To be able to reproduce a crash in another machine, this patch introduces a new
option in the VFS yaml file called 'overlay-relative'. When it's equal to
'true' it means that the provided path to the YAML file through the
-ivfsoverlay option should also be used to prefix the final path for every
'external-contents'.

Example, given the invocation snippet "... -ivfsoverlay
<name>.cache/vfs/vfs.yaml" and the following entry in the yaml file:

"overlay-relative": "true",
"roots": [
...
  "type": "directory",
  "name": "/usr/include",
  "contents": [
    {
      "type": "file",
      "name": "stdio.h",
      "external-contents": "/usr/include/stdio.h"
    },
...

Here, a file manager request for virtual "/usr/include/stdio.h", that will map
into real path "/<absolute_path_to>/<name>.cache/vfs/usr/include/stdio.h.

This is a useful feature for debugging module crashes in machines other than
the one where the error happened.

Differential Revision: http://reviews.llvm.org/D17457

rdar://problem/24499339

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

8 years agoBetter visualization of clang::BuiltinType in VisualStudio
Mike Spertus [Sun, 20 Mar 2016 00:32:30 +0000 (00:32 +0000)]
Better visualization of clang::BuiltinType in VisualStudio

Whenever possible, use C++ names for visualizing builtin types. E.g., "long double" instead of "LongDouble"

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

8 years agoVisual Studio Visualizer for clang::FunctionProtoType
Mike Spertus [Sun, 20 Mar 2016 00:20:43 +0000 (00:20 +0000)]
Visual Studio Visualizer for clang::FunctionProtoType

Displays return type and parameters for the Function Protoype object in the Locals window.

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

8 years ago[Sema] Make type deduction work with some overloadable functions
George Burgess IV [Sat, 19 Mar 2016 21:51:45 +0000 (21:51 +0000)]
[Sema] Make type deduction work with some overloadable functions

Some functions can't have their address taken. If we encounter an
overload set where only one of the candidates can have its address
taken, we should automatically select that candidate's type in type
deduction.

Differential Revision: http://reviews.llvm.org/D15591

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