summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Support mingw-w64 toolchain on openSUSE and likely other LinuxesYaron Keren2015-07-141-1/+28
| | | | | | Thanks to Ismail Donmez for testing and to Joerg Sonnenbergerþ for his comments. llvm-svn: 242150
* [x86] add 2 bit to ObjCOrBuiltinID and new intrinsicsAsaf Badouh2015-07-144-2/+1692
| | | | | | | | | | add 2 bit to ObjCOrBuiltinID (changed from 11bits to 13bits), see discussion in Add new intrinsics support that already covered by the BE. All the intrinsics are covered by tests Differential Revision: http://reviews.llvm.org/D10893 llvm-svn: 242144
* [Analyzer] Move FindSuperCallVisitor into an anonymous namespace.Benjamin Kramer2015-07-141-2/+0
| | | | | | No functionality change. llvm-svn: 242140
* clang-format: Fix formatting of multiple lambdas in initializers.Daniel Jasper2015-07-142-2/+13
| | | | | | | | | | | | | | | | | | | | Before: SomeFunction({[&] { // comment }, [&] { // comment }}); After: SomeFunction({[&] { // comment }, [&] { // comment }}); llvm-svn: 242138
* [OPENMP] Drop type qualifiers from private variables.Alexey Bataev2015-07-1417-63/+66
| | | | | | If the variable is marked as private in OpenMP construct, the reference to this variable should not keep type qualifiers for the original variable. Private copy is not volatile or constant, so we can use unqualified type for private copy. llvm-svn: 242133
* Classes inside lambdas are local not nested.Serge Pavlov2015-07-143-10/+72
| | | | | | | | | | | | | If a lambda used as default argument in a method declaration contained a local class, that class was incorrectly recognized as nested class. In this case compiler tried to postpone parsing of this class until the enclosing class is finished, which caused crashes in some cases. This change fixes PR13987. Differential Revision: http://reviews.llvm.org/D11006 llvm-svn: 242132
* Tweak clang/test/PCH/chain-openmp-threadprivate.cpp to satisfy i686-win32.NAKAMURA Takumi2015-07-141-1/+1
| | | | llvm-svn: 242131
* Fix for clang memcpyizer bugs 23911 and 23924 (patch by Denis Zobnin)Alexey Bataev2015-07-143-13/+116
| | | | | | | The fix is to remove duplicate copy-initialization of the only memcpy-able struct member and to correct the address of aggregately initialized members in destructors' calls during stack unwinding (in order to obtain address of struct member by using GEP instead of 'bitcast'). Differential Revision: http://reviews.llvm.org/D10990 llvm-svn: 242127
* Fix test for Visual C++ link.exe.Yaron Keren2015-07-141-2/+2
| | | | llvm-svn: 242125
* Fix test for Visual C++.Yaron Keren2015-07-141-5/+7
| | | | llvm-svn: 242124
* Add support for -fuse-ld= in the mingw toolchain driver.Yaron Keren2015-07-141-2/+10
| | | | | | | | | | | | We will still default to ld until such a time lld become a stable release. lld supports arm NT under the machine name "thumb2pe". http://reviews.llvm.org/D11088 Patch by Martell Malone Reviewed by Reid Kleckner llvm-svn: 242121
* Mark clang/test/PCH/chain-openmp-threadprivate.cpp as REQUIRES:tls.NAKAMURA Takumi2015-07-141-0/+3
| | | | llvm-svn: 242116
* clang/test/lit.cfg: Introduce the feature "tls", for targeting cygwin.NAKAMURA Takumi2015-07-141-0/+4
| | | | | | Thread local storage is not implemented for targeting cygwin. llvm-svn: 242115
* Add file missed from r242105.Richard Smith2015-07-141-0/+3
| | | | llvm-svn: 242109
* [modules] When diagnosing errors in module map files found by 'extern ↵Richard Smith2015-07-144-5/+15
| | | | | | module' declarations, show how we got to that module map file. llvm-svn: 242105
* Remove a completely redundant initialization of llvm::TimePassesIsEnabled,Adrian Prantl2015-07-141-2/+0
| | | | | | | | which is actually the variable backing up the llvm -time-passes command line argument. llvm::TimePassesIsEnabled is actually being initialized in CodeGenAction. llvm-svn: 242099
* Basic code generation for MSan use-after-dtor.Evgeniy Stepanov2015-07-142-0/+40
| | | | | | | | | Under the -fsanitize-memory-use-after-dtor (disabled by default) insert an MSan runtime library call at the end of every destructor. Patch by Naomi Musgrave. llvm-svn: 242097
* Extend -ftime-report to give more information about time spent reading ↵Richard Smith2015-07-144-6/+45
| | | | | | module files. llvm-svn: 242094
* [OpenMP] Add REQUIRES pragma to threadprivate regression tests.Samuel Antao2015-07-142-1/+2
| | | | llvm-svn: 242090
* [Intrin.h] Use __ATOMIC_SEQ_CST instead of '5'David Majnemer2015-07-131-31/+37
| | | | | | No functionality change is intended. llvm-svn: 242087
* [Intrin.h] Make the variable names more consistentDavid Majnemer2015-07-131-34/+32
| | | | | | No functionality change intended. llvm-svn: 242086
* [cuda] Driver changes to compile and stitch together host and device-side ↵Artem Belevich2015-07-1317-28/+516
| | | | | | | | | | | | | | | | | | | | | | | | | | CUDA code. NOTE: reverts r242077 to reinstate r242058, r242065, 242067 and includes fix for OS X test failures. - Changed driver pipeline to compile host and device side of CUDA files and incorporate results of device-side compilation into host object file. - Added a test for cuda pipeline creation in clang driver. New clang options: --cuda-host-only - Do host-side compilation only. --cuda-device-only - Do device-side compilation only. --cuda-gpu-arch=<ARCH> - specify GPU architecture for device-side compilation. E.g. sm_35, sm_30. Default is sm_20. May be used more than once in which case one device-compilation will be done per unique specified GPU architecture. Differential Revision: http://reviews.llvm.org/D9509 llvm-svn: 242085
* [OpenMP] Add TLS-based implementation for threadprivate directive.Samuel Antao2015-07-1315-46/+350
| | | | llvm-svn: 242080
* This reverts commit r242058, r242065, r242067.Rafael Espindola2015-07-1317-512/+28
| | | | | | | | | | The tests were failing on OS X. Revert "[cuda] Driver changes to compile and stitch together host and device-side CUDA code." Revert "Fixed regex to properly match '64' in the test case." Revert "clang/test/Driver/cuda-options.cu REQUIRES clang-driver, at least." llvm-svn: 242077
* clang/test/Driver/cuda-options.cu REQUIRES clang-driver, at least.NAKAMURA Takumi2015-07-131-0/+1
| | | | llvm-svn: 242067
* Fixed regex to properly match '64' in the test case.Artem Belevich2015-07-131-2/+2
| | | | llvm-svn: 242065
* Move class into an anonymous namespace. NFC.Benjamin Kramer2015-07-131-0/+2
| | | | llvm-svn: 242064
* [cuda] Driver changes to compile and stitch together host and device-side ↵Artem Belevich2015-07-1317-28/+511
| | | | | | | | | | | | | | | | | | | | | | | CUDA code. - Changed driver pipeline to compile host and device side of CUDA files and incorporate results of device-side compilation into host object file. - Added a test for cuda pipeline creation in clang driver. New clang options: --cuda-host-only - Do host-side compilation only. --cuda-device-only - Do device-side compilation only. --cuda-gpu-arch=<ARCH> - specify GPU architecture for device-side compilation. E.g. sm_35, sm_30. Default is sm_20. May be used more than once in which case one device-compilation will be done per unique specified GPU architecture. Differential Revision: http://reviews.llvm.org/D9509 llvm-svn: 242058
* [Modules] Allow missing header before a missing requirementBen Langmuir2015-07-133-7/+26
| | | | | | | | | | | And make the module unavailable without breaking any parent modules. If there's a missing requirement after we've already seen a missing header, still update the IsMissingRequiement bit correctly. Also, diagnose missing requirements before missing headers, since the existence of the header is moot if there are missing requirements. llvm-svn: 242055
* clang-cl: For files setting output names, mention which flags they belong to.Nico Weber2015-07-131-3/+3
| | | | | | | | It always takes me a while to figure out how to say "preprocess to file foo.txt" with clang-cl. With this, it might be easier. http://reviews.llvm.org/D10890 llvm-svn: 242051
* Update documentation for unroll pragmas on loops with runtime trip counts.Mark Heffernan2015-07-131-5/+5
| | | | | | | | This change updates the documentation for the loop unrolling pragma behavior change in r242047. Specifically, with that change "#pragma unroll" will not unroll loops with a runtime trip count. llvm-svn: 242048
* clang-format: Print token type name instead of number in -debug outputBirunthan Mohanathas2015-07-133-60/+84
| | | | | | Differential Revision: http://reviews.llvm.org/D11125 llvm-svn: 242039
* Support alternate attribute spelling __enable_if__Ulrich Weigand2015-07-132-1/+17
| | | | | | | | | | | | | | | | | | | | Attribute names usually support an alternate spelling that uses double underscores before and after the attribute name, like e.g. attribute ((__aligned__)) for attribute ((aligned)). This is necessary to allow use of attributes in system headers without polluting the name space. However, for attribute ((enable_if)) that alternate spelling does not work correctly. This is because of code in Parser::ParseGNUAttributeArgs (ParseDecl.cpp) that specifically checks for the "enable_if" spelling without allowing the alternate spelling. Similar code in ParseDecl.cpp uses the normalizeAttrName helper to allow both spellings. This patch adds use of that helper for the "enable_if" check as well, which fixes attribute ((__enable_if__)). Differential Revision: http://reviews.llvm.org/D11142 llvm-svn: 242029
* Update commentUlrich Weigand2015-07-131-5/+1
| | | | | | | As noticed by David Majnemer, update an out-of-date comment in CGClass.cpp after the r241916 commit. llvm-svn: 242021
* Set the linkage before setting the visibility.Rafael Espindola2015-07-133-11/+30
| | | | | | | | | Otherwise the visibility setting code would not know that a given function was available_externally. Fixes PR24097. llvm-svn: 242012
* Intrin.h: Don't invade the program's namespaceDavid Majnemer2015-07-131-34/+34
| | | | | | | The program is permitted to have stuff like '#define x' in it so avoid using identifiers not reserved for the implementation. llvm-svn: 242010
* Intrin.h: Clean up our atomic intrinsicsDavid Majnemer2015-07-131-43/+31
| | | | | | | | | | | | | | Three things: - The atomic intrinsics mandate memory barriers, let's start emitting some. - We don't need to manually create RMW operations, we can just do __atomic_fetch_foo instead of performing __atomic_foo_fetch and undoing foo. - Don't use inline assembly, we don't need it for these intrinsics. This fixes PR24101. llvm-svn: 242009
* Fix clang/unittests/ASTMatchers/Dynamic/Makefile. clangDynamicASTMatchers ↵NAKAMURA Takumi2015-07-131-1/+3
| | | | | | should be linked in advance of clangAST and clangASTMatchers. llvm-svn: 242005
* Minor simplification, no functionality change.Richard Smith2015-07-122-17/+3
| | | | llvm-svn: 242001
* [modules] Improve performance when there is a local declaration of an entityRichard Smith2015-07-126-149/+207
| | | | | | | | before the first imported declaration. We don't need to track all formerly-canonical declarations of an entity; it's sufficient to track those ones for which no other formerly-canonical declaration was imported into the same module. We call those ones "key declarations", and use them as our starting points for collecting redeclarations and performing namespace lookups. llvm-svn: 241999
* [Sema] If lvalue to rvalue reference cast is valid don't emit diagnostic.Davide Italiano2015-07-122-2/+12
| | | | | | | | | | | | | In the test, y1 is not reference compatible to y2 and we currently assume the cast is ill-formed so we emit a diagnostic. Instead, in order to honour the standard, if y1 it's not reference-compatible to y2 then it can't be converted using a static_cast, and a reinterpret_cast should be tried instead. Richard Smith provided the correct interpretation of the standard and explanation about the subtle difference between "can't be cast" and "the cast is ill-formed". The former applies in this case. PR: 23802 llvm-svn: 241998
* Tweak libclang's users, c-arcmt-test, c-index-test and libclangTests to ↵NAKAMURA Takumi2015-07-123-0/+12
| | | | | | satisfy LDFLAGS=-static. llvm-svn: 241992
* Reformat Makefile.NAKAMURA Takumi2015-07-123-3/+18
| | | | llvm-svn: 241991
* clang-format: Add Mozilla brace breaking styleBirunthan Mohanathas2015-07-126-1/+59
| | | | | | Differential Revision: http://reviews.llvm.org/D10883 llvm-svn: 241986
* clang-format: Extend vim integration so that a line range can be passed in.Daniel Jasper2015-07-111-2/+16
| | | | llvm-svn: 241976
* Sema: Allow null names to be passed in to isAcceptableTagRedeclarationJustin Bogner2015-07-105-12/+12
| | | | | | | | | | | | | It's possible for TagRedeclarations to involve decls without a name, ie, anonymous enums. We hit some undefined behaviour if we bind these null names to the reference here. We never dereference the name, so it's harmless if it's null - make it a pointer to allow that. Fixes the Modules/submodules-merge-defs.cpp test under ubsan. llvm-svn: 241963
* [modules] When checking the include guard for a header, check whether it'sRichard Smith2015-07-108-8/+41
| | | | | | | | | | visible in the module we're considering entering. Previously we assumed that if we knew the include guard for a modular header, we'd already parsed it, but that need not be the case if a header is present in the current module and one of its dependencies; the result of getting this wrong was that the current module's submodule for the header would end up empty. llvm-svn: 241953
* Disable C++ EH by default for clang-cl and MSVC environmentsReid Kleckner2015-07-103-22/+31
| | | | | | | | | We don't need any more bug reports from users telling us that MSVC-style C++ exceptions are broken. Developers and adventurous users can still test the existing functionality by passing along -fexceptions to either clang or clang-cl. llvm-svn: 241952
* [analyzer] When forced to fake a block type, do it correctly.Jordan Rose2015-07-102-3/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | BlockDecl has a poor AST representation because it doesn't carry its type with it. Instead, the containing BlockExpr has the full type. This almost never matters for the analyzer, but if the block decl contains static local variables we need to synthesize a region to put them in, and this region will necessarily not have the right type. Even /that/ doesn't matter, unless (1) the block calls the function or method containing the block, and (2) the value of the block expr is used in some interesting way. In this case, we actually end up needing the type of the block region, and it will be set to our synthesized type. It turns out we've been doing a terrible job faking that type -- it wasn't a block pointer type at all. This commit fixes that to at least guarantee a block pointer type, using the signature written by the user if there is one. This is not really a correct answer because the block region's type will /still/ be wrong, but further efforts to make this right in the analyzer would probably be silly. We should just change the AST. rdar://problem/21698099 llvm-svn: 241944
* [MS ABI] Don't generates code for unreferenced inline definitions of library ↵David Majnemer2015-07-102-2/+6
| | | | | | | | | | | builtins We should only consider declarations which were written, implicit declarations shouldn't be considered. This fixes PR24084. llvm-svn: 241941
OpenPOWER on IntegriCloud