summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* For MS ABI, emit dllexport friend functions defined inline in classReid Kleckner2016-03-179-18/+32
| | | | | | | | | | | | Summary: ...as that is apparently what MSVC does Reviewers: rnk Patch by Stephan Bergmann Differential Revision: http://reviews.llvm.org/D15267 llvm-svn: 263738
* Remove defaulted move ops, the type is zero-cost copyable anyway, so there's ↵David Blaikie2016-03-171-2/+0
| | | | | | | | | no need for specific move ops (addresses MSVC build error, since MSVC 2013 can't generate default move ops) llvm-svn: 263732
* Fix implicit copy ctor and copy assignment operator warnings when ↵David Blaikie2016-03-172-2/+10
| | | | | | | | | | | | | -Wdeprecated passed. Fix implicit copy ctor and copy assignment operator warnings when -Wdeprecated passed. Patch by Don Hinton! Differential Revision: http://reviews.llvm.org/D18123 llvm-svn: 263730
* Use a simpler set of mock headers for the vfs+modules crash recovery tests.Benjamin Kramer2016-03-175-6/+17
| | | | | | | | | | The System/ mock is large and too complex for this test. It can cause the tests to fail in mysterious ways as it depends on the resource dir being present, which is not really supported for driver tests (using %clang instead of %clang_cc1). Copy the tree and trim out all the %unnecessary fat. llvm-svn: 263718
* clang-format: [JS] Make requoting of JavaScript string literals onlyDaniel Jasper2016-03-172-78/+100
| | | | | | change affected ranges. llvm-svn: 263713
* clang-format: [JS] Fix incorrect spacing around contextual keywords.Daniel Jasper2016-03-172-2/+9
| | | | | | | | | | Before: x.of (); After: x.of(); llvm-svn: 263710
* clang-format: Slightly weaken AlignAfterOpenBracket=AlwaysBreak.Daniel Jasper2016-03-172-6/+35
| | | | | | | | | | | | | | | | | | If a call takes a single argument, using AlwaysBreak can lead to lots of wasted lines and additional indentation without improving the readability in a significant way. Before: caaaaaaaaaaaall( caaaaaaaaaaaall( caaaaaaaaaaaall( caaaaaaaaaaaaaaaaaaaaaaall(aaaaaaaaaaaaaa, aaaaaaaaa)))); After: caaaaaaaaaaaall(caaaaaaaaaaaall(caaaaaaaaaaaall( caaaaaaaaaaaaaaaaaaaaaaall(aaaaaaaaaaaaaa, aaaaaaaaa)))); llvm-svn: 263709
* [OPENMP 4.5] Allow to use private data members in 'copyprivate' clause.Alexey Bataev2016-03-173-48/+283
| | | | | | | | OpenMP 4.5 allows privatization of non-static data members in non-static member functions. This patch adds support of private data members in 'copyprivate' clauses. llvm-svn: 263706
* [OPENMP 4.0] Use 'declare reduction' constructs in 'reduction' clauses.Alexey Bataev2016-03-1726-369/+1738
| | | | | | | | 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. llvm-svn: 263701
* Minor code cleanups. NFC.Junmo Park2016-03-172-4/+4
| | | | llvm-svn: 263694
* [VFS] Remove wrong header includeBruno Cardoso Lopes2016-03-171-1/+0
| | | | | | Follow up from r263686. Forgot to remove the wrong header file. llvm-svn: 263691
* [index] Make sure that declarations of builtin functions are indexed.Argyrios Kyrtzidis2016-03-172-2/+6
| | | | | | rdar://25154630 llvm-svn: 263689
* Add an optional named argument (replacement = "xxx") to AvailabilityAttr.Manman Ren2016-03-1711-18/+72
| | | | | | | | | | 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 llvm-svn: 263687
* Reapply [2]: [VFS] Add support for handling path traversalsBruno Cardoso Lopes2016-03-174-24/+269
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was applied twice r261551 and 263617 and later reverted because: (1) Windows bot failing on unittests. Change the current behavior to do not handle path traversals on windows. (2) Windows bot failed to include llvm/Config/config.h in order to use HAVE_REALPATH. Use LLVM_ON_UNIX instead, as done in lib/Basic/FileManager.cpp. Handle ".", ".." and "./" with trailing slashes while collecting files to be dumped into the vfs overlay directory. Include the support for symlinks into components. Given the path: /install-dir/bin/../lib/clang/3.8.0/include/altivec.h, if "bin" component is a symlink, it's not safe to use `path::remove_dots` here, and `realpath` is used to get the right answer. Since `realpath` is expensive, we only do it at collecting time (which only happens during the crash reproducer) and cache the base directory for fast lookups. Overall, this makes the input to the VFS YAML file to be canonicalized to never contain traversal components. Differential Revision: http://reviews.llvm.org/D17104 rdar://problem/24499339 llvm-svn: 263686
* [OPENMP] Support for codegen of private clause of target, host sideCarlo Bertolli2016-03-162-1/+269
| | | | | | | | This patch adds support for codegen of private clause of target and a regression test for host code generation, when the host is used as target device. I believe that code generation for nvptx backend would not require anything additional or different to what is done for the host. http://reviews.llvm.org/D18105 llvm-svn: 263654
* Add an optional string argument to DeprecatedAttr for Fix-It.Manman Ren2016-03-168-6/+116
| | | | | | | | We only add this to __attribute__((deprecated)). Differential Revision: http://reviews.llvm.org/D17865 llvm-svn: 263652
* Add attributes for preserve_mostcc/preserve_allcc calling conventions to the ↵Roman Levenstein2016-03-1615-3/+194
| | | | | | | | | | | | | | | C/C++ front-end 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 llvm-svn: 263647
* Fix destructor definition of invalid classesOlivier Goffart2016-03-162-9/+19
| | | | | | | | | | | | The declaration of the destructor of an invalid class was not properly marked as noexcept. As a result, the definition of the same destructor, which was properly implicitly marked as noexcept, would not match the definition. This would cause the definition CXXDestructorDecl to be matked as invalid and omited from the AST. Differential Revision: http://reviews.llvm.org/D17988 llvm-svn: 263639
* Add visualizers for more clang types. Create more C++-like visualizations ↵Mike Spertus2016-03-161-20/+85
| | | | | | | | | | | | | | | | | for existing Clang types Created visualizer for PointerType, LValueReferenceType, RValueReferenceType, and TemplateParmType. In addition, cleaned up the display of existing types to be more C++-like. For example, instead of SubstTemplateTypeParmType: {Identifier (("T"))} => Record (25), {Identifier (("A"))} it now displays more readably as SubstTemplateTypeParmType: {typename T <= struct A} The <expand> sections still can be used for all the gory details if necessary. llvm-svn: 263638
* Revert r263617, "Reapply: [VFS] Add support for handling path traversals"NAKAMURA Takumi2016-03-164-269/+24
| | | | | | It broke standalone clang build. llvm-svn: 263636
* Directly get the canonical Type instead of going around through a ↵Yaron Keren2016-03-161-1/+1
| | | | | | CanQualType temporary, NFC. llvm-svn: 263635
* [modules] Fix adding a templated friend functions to a namespace from ↵Vassil Vassilev2016-03-165-2/+66
| | | | | | | | | | | | | | another module. When clang adds argument dependent lookup candidates, it can perform template instantiation. For example, it can instantiate a templated friend function and register it in the enclosing namespace's lookup table. Fixes https://llvm.org/bugs/show_bug.cgi?id=24954 Reviewed by Richard Smith. llvm-svn: 263634
* Add more ARM Cortex-R8 regression tests to Clang.Pablo Barrio2016-03-164-10/+19
| | | | | | | | | | | | | | Summary: This patch adds Clang tests for Cortex-R8 related to FP capabilities and hardware integer divide. Reviewers: rengolin, bsmith Subscribers: aemerson, cfe-commits, rengolin Differential Revision: http://reviews.llvm.org/D18193 llvm-svn: 263632
* Avoid using LookupResult's implicit copy ctor and assignment operator to ↵Marina Yatsina2016-03-162-11/+24
| | | | | | | | | | | | | avoid warnings The purpose of this patch is to keep the same functionality without using LookupResult's implicit copy ctor and assignment operator, because they cause warnings when -Wdeprecated is passed. This patch is meant to help the following review: http://reviews.llvm.org/D18123. The functionality is covered by the tests in my original commit (255890) The test case in this patch was added to test a bug caught in the review of the first version of this fix. Differential Revision: http://reviews.llvm.org/D18175 llvm-svn: 263630
* Revert r263622, "clang/lib/Frontend/ModuleDependencyCollector.cpp: Use ↵NAKAMURA Takumi2016-03-161-1/+1
| | | | | | | | clang/Config/config.h instead of llvm's." I'll commit better fix(es) later. "llvm/Config/config.h" shouldn't be available here. llvm-svn: 263623
* clang/lib/Frontend/ModuleDependencyCollector.cpp: Use clang/Config/config.h ↵NAKAMURA Takumi2016-03-161-1/+1
| | | | | | instead of llvm's. llvm-svn: 263622
* Reapply: [VFS] Add support for handling path traversalsBruno Cardoso Lopes2016-03-164-24/+269
| | | | | | | | | | | | | | | | | | | | | | | | | | This is originally r261551, reverted because of windows bots failing on unittests. Change the current behavior to do not handle path traversals on windows. Handle ".", ".." and "./" with trailing slashes while collecting files to be dumped into the vfs overlay directory. Include the support for symlinks into components. Given the path: /install-dir/bin/../lib/clang/3.8.0/include/altivec.h, if "bin" component is a symlink, it's not safe to use `path::remove_dots` here, and `realpath` is used to get the right answer. Since `realpath` is expensive, we only do it at collecting time (which only happens during the crash reproducer) and cache the base directory for fast lookups. Overall, this makes the input to the VFS YAML file to be canonicalized to never contain traversal components. Differential Revision: http://reviews.llvm.org/D17104 rdar://problem/24499339 llvm-svn: 263617
* Convert some ObjC msgSends to runtime calls.Pete Cooper2016-03-1610-18/+336
| | | | | | | | | | | | | | 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 llvm-svn: 263607
* Myriad: define __myriad2 macro automaticallyDouglas Katzman2016-03-153-5/+35
| | | | llvm-svn: 263596
* Revert commit http://reviews.llvm.org/D17877 to fix tests on x86.Arpith Chacko Jacob2016-03-155-1053/+6
| | | | llvm-svn: 263589
* [OpenMP] Base support for target directive codegen on NVPTX device.Arpith Chacko Jacob2016-03-155-6/+1053
| | | | | | | | | | | 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 llvm-svn: 263587
* Move the fixit for -Wformat-security to a note.Bob Wilson2016-03-158-42/+29
| | | | | | | | 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. llvm-svn: 263584
* [cfi] Don't emit checks for disabled CFI kinds.Evgeniy Stepanov2016-03-153-9/+79
| | | | | | | | | | | | | | In the cross-DSO CFI mode clang emits __cfi_check_fail that handles errors triggered from other modules with targets in the current module. With this change, __cfi_check_fail will handle errors for CFI kinds that are not enabled in the current module as if they have the trapping behaviour (-fsanitize-trap=...). This fixes a bug where some combinations of -fsanitize* flags may result in a link failure due to a missing sanitizer runtime library for the diagnostic calls in __cfi_check_fail. llvm-svn: 263578
* Test commit - Remove some trailing whitespacePablo Barrio2016-03-151-1/+1
| | | | llvm-svn: 263574
* [CMake] Updating Apple build configurationsChris Bieneman2016-03-151-1/+1
| | | | | | This updates Apple build configurations to adapt to r263566 & r263570, which added a PACKAGE_VENDOR variable. llvm-svn: 263571
* [CMake] Defaulting CLANG_VENDOR to PACKAGE_VENDORChris Bieneman2016-03-151-1/+1
| | | | | | LLVM r263566 adds a generic PACKAGE_VENDOR configuration which can be used to specify the vendor for LLVM toolchain tools. This change defaults the CLANG_VENDOR to the PACKAGE_VENDOR so that you don't have to specify both when building a package. llvm-svn: 263570
* Fix a bot I broke.Chris Bieneman2016-03-151-1/+4
| | | | | | The builtin library isn't added by the driver unless it exists, so we shouldn't check for it. I've marked this as a FIXME, because we probably should have a way to test this. llvm-svn: 263568
* [Driver] [Darwin] Fix linking libclang_rt.profile_*sim.aChris Bieneman2016-03-152-28/+8
| | | | | | | | | | | | Summary: isTarget*() calls are order-dependent. This is because iOS Sim *is* iOS. This means checks for the simulator version of the platform must always be ahead of checks for the embedded platform. Reviewers: zaks.anna, bogner Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D17947 llvm-svn: 263567
* Myriad: Pass -mcpu to movi{Compile,Asm}Douglas Katzman2016-03-152-10/+13
| | | | | | Differential Revision: http://reviews.llvm.org/D18186 llvm-svn: 263556
* Reverted http://reviews.llvm.org/D17877 to fix tests.Arpith Chacko Jacob2016-03-155-1053/+6
| | | | llvm-svn: 263555
* [OpenMP] Base support for target directive codegen on NVPTX device.Arpith Chacko Jacob2016-03-155-6/+1053
| | | | | | | | | | | 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 llvm-svn: 263552
* Make it possible for AST plugins to enable themselves by defaultJohn Brawn2016-03-1510-34/+158
| | | | | | | | | | | | 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 llvm-svn: 263546
* Restrict the hack from r263429 to asan and msan.Benjamin Kramer2016-03-151-2/+4
| | | | | | | The other sanitizers don't have backend passes that rely on value names. Avoid paying the compile time cost of names there. llvm-svn: 263541
* [ThinLTO] Clang side of renaming of function index (NFC)Teresa Johnson2016-03-154-22/+22
| | | | | | | | | 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) llvm-svn: 263514
* clang/test/CodeGenCXX/virtual-function-attrs.cpp: Appease i686-mingw32 to ↵NAKAMURA Takumi2016-03-141-3/+3
| | | | | | expect x86_thiscallcc. llvm-svn: 263505
* Revert "[ThinLTO] Clang side of renaming of function index (NFC)"Teresa Johnson2016-03-144-22/+22
| | | | | | This reverts commit r263491. Missed a file on the LLVM side. llvm-svn: 263494
* [ThinLTO] Clang side of renaming of function index (NFC)Teresa Johnson2016-03-144-22/+22
| | | | | | | 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. llvm-svn: 263491
* [CMake] Updating Apple Clang CMake cachesChris Bieneman2016-03-142-9/+58
| | | | | | | | This is a big update that gets the public configurations more in line with the ones we're actually using internally to ship Clang in Xcode. From here forward I expect most of the changes in these files to be incremental as the changes get made internally. llvm-svn: 263483
* Relax test introduced in r263464 to accept ARM ABI output.Peter Collingbourne2016-03-141-1/+1
| | | | | | Should fix ARM bots. llvm-svn: 263477
* clang-format: [JS] Handle certain cases of ASI.Daniel Jasper2016-03-143-67/+193
| | | | | | | | | | | | | | Automatic Semicolon Insertion can only be properly handled by parsing source code. However conservatively catching just a few, common situations prevents breaking code during development, which greatly improves usability. JS code should still use semicolons, and ASI code should be flagged by a compiler or linter. Patch by Martin Probst. Thank you. llvm-svn: 263470
OpenPOWER on IntegriCloud