summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Make nozlibcompress.c pass and reenable it.Nico Weber2016-02-071-5/+1
| | | | llvm-svn: 260058
* clang-format: [JS] Support @see annotations in JSDoc comments in GoogleDaniel Jasper2016-02-071-1/+1
| | | | | | style. llvm-svn: 260057
* Disable failing nozlibcompress.cNico Weber2016-02-071-0/+4
| | | | | | | This test hasn't been running after it was added until r259976 made "REQUIRES: nozlib" work, and now that the test runs it fails. llvm-svn: 260056
* [Frontend] Make the memory management of FrontendAction pointers explicit by ↵Argyrios Kyrtzidis2016-02-079-65/+73
| | | | | | using unique_ptr. llvm-svn: 260048
* [libclang] Add missing CINDEX_LINKAGE from a function.Argyrios Kyrtzidis2016-02-071-2/+2
| | | | llvm-svn: 260047
* Make -fno-math-builtin a cc1 optionMatthew Simpson2016-02-072-2/+2
| | | | | | | | | This patch makes -fno-math-builtin a frontend only option instead of a driver option. The appropriate test case was committed in r186899 when the flag was introduced. This should fix PR26317. Contributed-by: Frank Herrmann <fgh@4gh.tv> llvm-svn: 260044
* [analyzer] Invalidate destination of std::copy() and std::copy_backward().Devin Coughlin2016-02-078-37/+241
| | | | | | | | | Now that the libcpp implementations of these methods has a branch that doesn't call memmove(), the analyzer needs to invalidate the destination for these methods explicitly. rdar://problem/23575656 llvm-svn: 260043
* Revert "Re-apply r259977 - [OpenMP] Reorganize code to allow specialized ↵Renato Golin2016-02-077-92/+3
| | | | | | | | code generation for different devices." This reverts commit r259985, as it still fails one buildbot. llvm-svn: 260036
* Use CodeGenModule::addReplacement() instead of directly accessing ↵Yaron Keren2016-02-071-1/+1
| | | | | | | | Replacements[]. This helps when trying to debug who inserted into Replacements. llvm-svn: 260028
* Fix test case problem(caused by clang-formatXinliang David Li2016-02-072-12/+4
| | | | llvm-svn: 260022
* [PGO] add profile/coverage test cases for defaulted ctor/ctorsXinliang David Li2016-02-072-0/+88
| | | | llvm-svn: 260021
* Fix typo in comment. NFCCraig Topper2016-02-071-1/+1
| | | | llvm-svn: 260020
* Driver: adjust linker invocation for GNUToolsSaleem Abdulrasool2016-02-072-7/+42
| | | | | | | | | | | | | | | Adjust the driver to invoke the linker more similar to gcc. -dynamic-linker is only passed if -static and -shared are not part of the compiler (driver) invocation. Replicate the passing of -export-rdynamic as per the GCC link spec: %{!static: %{rdynamic:-export-dynamic} %{!shared:-dynamic-linker ...}} This behaviour is consistent across all the targets that are supported, so no need to conditionalise it on the target. Resolves PR24245. llvm-svn: 260019
* Sema: handle typo correction on ARC'ed ivarSaleem Abdulrasool2016-02-072-0/+12
| | | | | | | | | | | The ivar ref would be transformed by the Typo Correction TreeTransform, but not be owned, resulting in the source location being invalid. This would eventually lead to an assertion in findCapturingExpr. Prevent this assertion from triggering. Resolves PR25113. llvm-svn: 260017
* Sema: handle typo correction with ARC'ed objc propertiesSaleem Abdulrasool2016-02-072-0/+28
| | | | | | | | | | | | | We would previously assert in findCapturingExpr when performing a typo correction resulting in an assignment of an ObjC property with a strong lifetype specifier due to the expression not being rooted in the file (invalid SLoc) during the retain cycle check on the typo-corrected expression. Handle the expression type appropriately during the TreeTransform to ensure that we have a source location associated with the expression. Fixes PR26486. llvm-svn: 260016
* Index: provide adjustment thunk information for C++ manglingsSaleem Abdulrasool2016-02-062-0/+69
| | | | | | | Add support for exposing the adjustment thunk for virtual methods as appropriate. llvm-svn: 260011
* Add a missing call to MDNode::deleteTemporary().Adrian Prantl2016-02-061-3/+4
| | | | | | | | Follow-up to r259975. Kudos to the ASAN bots! <rdar://problem/24493203> llvm-svn: 260002
* [analyzer] DeallocChecker: Don't warn on release of readonly assign property ↵Devin Coughlin2016-02-062-1/+7
| | | | | | | | | in dealloc. It is common for the ivars for read-only assign properties to always be stored retained, so don't warn for a release in dealloc for the ivar backing these properties. llvm-svn: 259998
* Re-apply r259977 - [OpenMP] Reorganize code to allow specialized code ↵Samuel Antao2016-02-067-3/+92
| | | | | | | | generation for different devices. This was reverted due to a failure in a buildbot, but it turned out the failure was unrelated. llvm-svn: 259985
* Revert r259977 - [OpenMP] Reorganize code to allow specialized code ↵Samuel Antao2016-02-067-92/+3
| | | | | | | | generation for different devices. It triggered some problem in the configuration related with zlib and exposed in the driver. llvm-svn: 259984
* [OpenMP] Reorganize code to allow specialized code generation for different ↵Samuel Antao2016-02-067-3/+92
| | | | | | | | | | | | | | | | | | | | | | | devices. Summary: Different devices may in some cases require different code generation schemes in order to implement OpenMP. This is required not only for performance reasons, but also because it may not be possible to have the current (default) implementation working for these devices. E.g. GPU's cannot implement the same scheme a target such as powerpc or x86b would use, in the sense that it does not have the ability to fork threads, instead all the threads are always executing and need to be managed by the implementation. This patch proposes a reorganization of the code in the OpenMP code generation to pave the way to have specialized implementation of OpenMP support. More than a "real" patch this is more a request for comments in order to understand if what is proposed is acceptable or if there are better/easier ways to do it. In this patch part of the common OpenMP codegen infrastructure is moved to a new file under a new namespace (CGOpenMPCommon) so it can be shared between the default implementation and the specialized one. When CGOpenMPRuntime is created, an attempt to select a specialized implementation is done. In the patch a specialization for nvptx targets is done which currently checks if the target is an OpenMP device and trap if it is not. Let me know comments suggestions you may have. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev Subscribers: Hahnfeld, cfe-commits, fraggamuffin, caomhin, jholewinski Differential Revision: http://reviews.llvm.org/D16784 llvm-svn: 259977
* [modules] Compress files embedded into a .pcm file, to reduce the disk usage ↵Richard Smith2016-02-066-38/+103
| | | | | | of -fembed-all-files mode. llvm-svn: 259976
* Fix a crash when emitting dbeug info for forward-declared scoped enums.Adrian Prantl2016-02-062-1/+28
| | | | | | | | | | It is possible for enums to be created as part of their own declcontext. We need to cache a placeholder to avoid the type being created twice before hitting the cache. <rdar://problem/24493203> llvm-svn: 259975
* [www] Update analyzer release notes to correct the checker-278 build date.Devin Coughlin2016-02-061-1/+1
| | | | | | This is not the future. llvm-svn: 259969
* [www] Update analyzer website for checker-278.Devin Coughlin2016-02-062-1/+16
| | | | llvm-svn: 259967
* [PGO] Test case updateXinliang David Li2016-02-052-4/+4
| | | | | | | | Temporarily relax check in test to avoid breakage for format change in LLVM side. Once that is done, the test case will be retightened. llvm-svn: 259955
* Eliminate an unnecessary enum, use the LLVM version. NFCPaul Robinson2016-02-054-25/+8
| | | | llvm-svn: 259950
* Exempt char array initializers from -Wconstant-converion.Richard Trieu2016-02-052-24/+41
| | | | | | | | Sometimes, char arrays are used as bit storage, with no difference made between signed and unsigned char. Thus, it is reasonable to use 0 to 255 instead of -128 to 127 and not trigger this warning. llvm-svn: 259947
* [CUDA] Bug 26497 : Remove wrappers for variants provided by CUDA headers.Artem Belevich2016-02-051-99/+59
| | | | | | | | ... and pull global-scope ones into std namespace with using-declaration. Differential Revision: http://reviews.llvm.org/D16932 llvm-svn: 259944
* Move DebugInfoKind enum from Driver to Basic. NFCPaul Robinson2016-02-053-5/+5
| | | | llvm-svn: 259935
* Add an ARC autoreleased-return-value caller marker on i386.John McCall2016-02-052-0/+48
| | | | | | rdar://24531556 llvm-svn: 259932
* [SystemZ] Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP macrosUlrich Weigand2016-02-052-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_[1248] macros on SystemZ. This fixes a miscompile of GCC C++11 standard library headers due to use of those macros in an ABI-changing manner. See e.g. /usr/include/c++/4.8.5/ext/concurrence.h: // Compile time constant that indicates prefered locking policy in // the current configuration. static const _Lock_policy __default_lock_policy = #ifdef __GTHREADS #if (defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2) \ && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)) _S_atomic; #else _S_mutex; #endif #else _S_single; #endif A different choice of __default_lock_policy causes different sizes of several of the C++11 data structures, which are then incompatible when inlined in clang-compiled code with what the (GCC-compiled) external library expects. This in turn leads to various crashes when using std::thread in code compiled with clang, as see e.g. via the ThreadPool unit tests. See PR 26473 for an example. llvm-svn: 259931
* Do not honor explicit alignment attribute on fields for PS4.Sunil Srivastava2016-02-055-3/+55
| | | | | | | | This change reverts r257462 for PS4 triple. Differential Revision: http://reviews.llvm.org/D16788 llvm-svn: 259916
* [Parser] Perform CachedTokens update dependent on token consumptionBruno Cardoso Lopes2016-02-052-2/+21
| | | | | | | | | | | | | | In the context where we break one tok::greatergreater into two tok::greater in order to correctly update the cached tokens; update the CachedTokens with two tok::greater only if ParseGreaterThanInTemplateList clients asks to consume the last token. Otherwise we only need to add one because the second is already added later on, as a not yet cached token. Differential Revision: http://reviews.llvm.org/D16906 rdar://problem/24488367 llvm-svn: 259910
* [modules] Separately track whether an identifier's preprocessor information andRichard Smith2016-02-055-3/+33
| | | | | | | | | | name lookup information have changed since deserialization. For a C++ modules build, we do not need to re-emit the identifier into the serialized identifier table if only the name lookup information has changed (and in all cases, we don't need to re-emit the macro information if only the name lookup information has changed). llvm-svn: 259901
* [ASTMatchers] Allow hasName() to look through inline namespacesSamuel Benzaquen2016-02-053-22/+180
| | | | | | | | | | | | | | | | | Summary: Allow hasName() to look through inline namespaces. This will fix the interaction between some clang-tidy checks and libc++. libc++ defines names in an inline namespace named std::<version_#>. When we try to match a name using hasName("std::xxx") it fails to match and the clang-tidy check does not work. Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D15506 llvm-svn: 259898
* clang-format: Fix corner case in template detection.Daniel Jasper2016-02-053-7/+20
| | | | | | | | | | Before: f(a.operator() < A > ()); After: f(a.operator()<A>()); llvm-svn: 259884
* [analyzer] Suppress localization diagnostics in debug classes and methods.Devin Coughlin2016-02-052-0/+54
| | | | | | | If the class or method name case-insensitively contains the term "debug", suppress warnings about string constants flowing to user-facing UI APIs. llvm-svn: 259875
* CodeGen: correct Windows ARM C++ assertionSaleem Abdulrasool2016-02-052-15/+13
| | | | | | | | | | | Because the Decl is explicitly passed as nullptr further up the call chain, it is possible to invoke isa on a nullptr, which will assert. Guard against the nullptr. Take the opportunity to reuse the helper method rather than re-implementing this logic. llvm-svn: 259874
* [CMake] One more try to make CMake clean up after itselfChris Bieneman2016-02-052-1/+5
| | | | | | Seriously... CMake... You're on my list... llvm-svn: 259873
* Revert "[CMake] Improve the clang order-file generation workflow"Chris Bieneman2016-02-053-19/+6
| | | | | | | | | | | | | This reverts commit r259862, and attempts to fix builder CMakeCaches. Will try this again some other time... Conflicts: CMakeLists.txt tools/driver/CMakeLists.txt llvm-svn: 259872
* [CMake] One more try to fix this.Chris Bieneman2016-02-051-0/+5
| | | | | | This change will catch any bots that generated the order file that GNU ld doesn't like and delete it before trying to generate one that I think GNU ld will deal with. llvm-svn: 259871
* [CMake] Speculative fix for linker error on LinuxChris Bieneman2016-02-051-2/+2
| | | | | | I can't reproduce this locally, but I think this may fix it. llvm-svn: 259870
* [modules] Factor out common code to mark identifier being "from AST", and add aRichard Smith2016-02-051-15/+15
| | | | | | | call in one more place to reduce the size of identifier tables in non-leaf modules. No behavior change. llvm-svn: 259866
* [CMake] Trying to fix a bot failure I introduced in r259862Chris Bieneman2016-02-051-1/+1
| | | | | | CMake caching behavior makes me sad. llvm-svn: 259864
* [CMake] Improve the clang order-file generation workflowChris Bieneman2016-02-053-4/+17
| | | | | | | | | | | | | | | | | | | | | | | Summary: With this change generating clang order files using dtrace uses the following workflow: cmake <whatever options you want> ninja generate-order-file ninja clang This patch works by setting a default path to the order file (which can be overridden by the user). If the order file doesn't exist during configuration CMake will create an empty one. CMake then ties up the dependencies between the clang link job and the order file, and generate-order-file overwrites CLANG_ORDER_FILE with the new order file. Reviewers: bogner Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16896 llvm-svn: 259862
* Don't synthesize an ImportDecl for a module named in -fmodule-implementation-ofBen Langmuir2016-02-053-2/+9
| | | | | | | | | | When building a PCH with modules enabled this import would assert in the ASTWriter and (if assertions were disabled) sometimes crash the compiler that loaded the resulting PCH when trying to lookup the submodule ID. rdar://problem/24137448 llvm-svn: 259859
* PR25271: When attaching default template arguments to redeclarations of aRichard Smith2016-02-042-0/+28
| | | | | | | | | template, keep looking for default arguments if we see a template parameter pack. There may be default arguments preceding a pack with no default argument. Patch by Jannis Harder! llvm-svn: 259836
* Install cmake files to lib/cmake/clangNiels Ole Salscheider2016-02-041-5/+5
| | | | | | | | This is the right location for platform-specific files. Also, search for LLVM's CMake files in this directory. llvm-svn: 259822
* Fix a crash when there is a typo in the return statement.Manman Ren2016-02-042-0/+16
| | | | | | | | | | | | | | If the typo happens after a successful deduction for an earlier return statement, we should check if the deduced type is null before using it. The typo correction happens after we try to deduce the return type and we ignore the deduction from the typo and continue to typo correction. rdar://24342247 llvm-svn: 259820
OpenPOWER on IntegriCloud