- Mar 21, 2016
-
-
Manman Ren authored
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
-
Manman Ren authored
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
-
Nico Weber authored
/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
-
Daniel Jasper authored
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
-
Faisal Vali authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263922 91177308-0d34-0410-b5e6-96231b3b80d8
-
Faisal Vali authored
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
-
Nico Weber authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263920 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 20, 2016
-
-
Simon Pilgrim authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263908 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263895 91177308-0d34-0410-b5e6-96231b3b80d8
-
Bruno Cardoso Lopes authored
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
-
- Mar 19, 2016
-
-
George Burgess IV authored
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 in cast expressions. Differential Revision: http://reviews.llvm.org/D17701 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263887 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 18, 2016
-
-
Carlo Bertolli authored
This patch implements the following aspects: It extends sema to check that a variable is not reference in both a map clause and firstprivate or private. This is needed to ensure correct functioning at codegen level, apart from being useful for the user. It implements firstprivate for target in codegen. The implementation applies to both host and nvptx devices. It adds regression tests for codegen of firstprivate, host and device side when using the host as device, and nvptx side. Please note that the regression test for nvptx codegen is missing VLAs. This is because VLAs currently require saving and restoring the stack which appears not to be a supported operation by nvptx backend. It adds a check in sema regression tests for target map, firstprivate, and private clauses. http://reviews.llvm.org/D18203 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263837 91177308-0d34-0410-b5e6-96231b3b80d8
-
Steven Watanabe authored
clang -cc1 -ast-print put the struct definition in the wrong place, like this: struct {} typedef S; The reason that this happens is that the printing code first prints the struct definition, and then tells the next declaration to leave out the type. This behavior is correct for simple variable declarations, but fails for typedefs (or extern, mutable, etc). The patch address this problem by skipping the struct declaration when we first see it, and then telling the first subsequent declaration that it needs to print out the full struct definition. Differential Revision: http://reviews.llvm.org/D17285 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263836 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263816 91177308-0d34-0410-b5e6-96231b3b80d8
-
Pirama Arumuga Nainar authored
Summary: r246764 handled __fp16 arguments and returns for AAPCS, but skipped this handling for OpenCL. Simlar to OpenCL, RenderScript also handles __fp16 type natively. This patch adds the -fnative-half-arguments-and-returns command line flag to allow such languages to skip this coercion of __fp16. Reviewers: srhines, olista01 Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18138 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263795 91177308-0d34-0410-b5e6-96231b3b80d8
-
Benjamin Kramer authored
We lost copy semantics in r263730, because it only worked for a few very specific cases. Move semantics don't have this issue. Sadly the implementation is a bit messy but I don't know how to clean it up without losing support for msvc 2013 :/ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263785 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 17, 2016
-
-
Manman Ren authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263752 91177308-0d34-0410-b5e6-96231b3b80d8
-
Bruno Cardoso Lopes authored
Tests failing on http://bb.pgr.jp/builders/cmake-clang-x86_64-linux/builds/46102 This reverts commit a1683cd6c9e07359c09f86e98a4db6b4e1bc51fc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263750 91177308-0d34-0410-b5e6-96231b3b80d8
-
Bruno Cardoso Lopes authored
This reapplies r261552. 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@263748 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Blaikie authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263747 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
This reverts commit r263738. This appears to cause a failure in CXX/temp/temp.decls/temp.friend/p1.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263740 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
Summary: ...as that is apparently what MSVC does Reviewers: rnk Patch by Stephan Bergmann Differential Revision: http://reviews.llvm.org/D15267 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263738 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Blaikie authored
Remove defaulted move ops, the type is zero-cost copyable anyway, so there's no need for specific move ops (addresses MSVC build error, since MSVC 2013 can't generate default move ops) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263732 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Blaikie authored
Fix implicit copy ctor and copy assignment operator warnings when -Wdeprecated passed. Patch by Don Hinton! Differential Revision: http://reviews.llvm.org/D18123 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263730 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexey Bataev authored
OpenMP 4.0 allows to define custom reduction operations using '#pragma omp declare reduction' construct. Patch allows to use this custom defined reduction operations in 'reduction' clauses. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263701 91177308-0d34-0410-b5e6-96231b3b80d8
-
Junmo Park authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263694 91177308-0d34-0410-b5e6-96231b3b80d8
-
Manman Ren authored
This commit adds a named argument to AvailabilityAttr, while r263652 adds an optional string argument to __attribute__((deprecated)). This enables the compiler to provide Fix-Its for deprecated declarations. rdar://20588929 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263687 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 16, 2016
-
-
Manman Ren authored
We only add this to __attribute__((deprecated)). Differential Revision: http://reviews.llvm.org/D17865 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263652 91177308-0d34-0410-b5e6-96231b3b80d8
-
Roman Levenstein authored
Till now, preserve_mostcc/preserve_allcc calling convention attributes were only available at the LLVM IR level. This patch adds attributes for preserve_mostcc/preserve_allcc calling conventions to the C/C++ front-end. The code was mostly written by Juergen Ributzka. I just added support for the AArch64 target and tests. Differential Revision: http://reviews.llvm.org/D18025 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263647 91177308-0d34-0410-b5e6-96231b3b80d8
-
Pete Cooper authored
It is faster to directly call the ObjC runtime for methods such as retain/release instead of sending a message to those functions. This patch adds support for converting messages to retain/release/alloc/autorelease to their equivalent runtime calls. Tests included for the positive case of applying this transformation, negative tests that we ensure we only convert "alloc" to objc_alloc, not "alloc2", and also a driver test to ensure we enable this only for supported runtime versions. Reviewed by John McCall. Differential Revision: http://reviews.llvm.org/D14737 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263607 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 15, 2016
-
-
Bob Wilson authored
r263299 added a fixit for the -Wformat-security warning, but that runs into complications with our guideline that error recovery should be done as-if the fixit had been applied. Putting the fixit on a note avoids that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263584 91177308-0d34-0410-b5e6-96231b3b80d8
-
John Brawn authored
Currently when an AST plugin is loaded it must then be enabled by passing -plugin pluginname or -add-plugin pluginname to the -cc1 command line. This patch adds a method to PluginASTAction which allows it to declare that the action happens before, instead of, or after the main AST action, plus the relevant changes to make the plugin action happen at that time automatically. Differential Revision: http://reviews.llvm.org/D17959 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263546 91177308-0d34-0410-b5e6-96231b3b80d8
-
Teresa Johnson authored
This is the companion to an LLVM patch that renamed the function index data structures and files to use the more general module summary index. (Recommit after fixing LLVM side to add back missed file) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263514 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 14, 2016
-
-
Teresa Johnson authored
This reverts commit r263491. Missed a file on the LLVM side. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263494 91177308-0d34-0410-b5e6-96231b3b80d8
-
Teresa Johnson authored
This is the companion to an LLVM patch that renamed the function index data structures and files to use the more general module summary index. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263491 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
implementation units of modules rather than interface units. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263449 91177308-0d34-0410-b5e6-96231b3b80d8
-
Samuel Antao authored
Summary: The current offloading implementation is using -omptargets and -omp-host-ir-file-path options in the frontend. This causes the user a lot of trouble due to to the conflicts with the -o option. E.g. if the user misspells omptargets he will end up with a file with a weird name. This patches replaces these two options with -fomptargets and -fomp-host-ir-file-path to avoid these issues, and it is also more consistent with the other options like -fopenmp. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev Subscribers: cfe-commits, caomhin, fraggamuffin Differential Revision: http://reviews.llvm.org/D18112 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263442 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 13, 2016
-
-
Mehdi Amini authored
Summary: This flag is enabled by default in the driver when NDEBUG is set. It is forwarded on the LLVMContext to discard all value names (but GlobalValue) for performance purpose. This an improved version of D18024 Reviewers: echristo, chandlerc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18127 From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263394 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nico Weber authored
To make this work, delay printing of ExtraDeps in HeaderIncludesCallback a bit, so that it happens after CompilerInstance::InitializeSourceManager() has run. General /FI arguments are still missing from /showIncludes output, this still needs to be fixed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263352 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 11, 2016
-
-
John McCall authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263194 91177308-0d34-0410-b5e6-96231b3b80d8
-