summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [OPENMP] Fix for PR31137: Wrong DSA for members in struct.Alexey Bataev2016-11-282-18/+21
| | | | | | | | | If member expression is used in the task region and the base expression is a DeclRefExp and the variable used in this ref expression is private, it should be marked as implicitly firstprivate inside this region. Patch fixes this issue. llvm-svn: 288039
* [Sema] Set range end of constructors and destructors in template instantiationsMalcolm Parsons2016-11-282-0/+22
| | | | | | | | | | | | | | | | | | Summary: clang-tidy checks frequently use source ranges of functions. The source range of constructors and destructors in template instantiations is currently a single token. The factory method for constructors and destructors does not allow the end source location to be specified. Set end location manually after creating instantiation. Reviewers: aaron.ballman, rsmith, arphaman Subscribers: arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D26849 llvm-svn: 288025
* Adjust type-trait evaluation to properly handle Using(Shadow)DeclsHal Finkel2016-11-272-4/+22
| | | | | | | | | | | | | | | | Since r274049, for an inheriting constructor declaration, the name of the using declaration (and using shadow declaration comes from the using declaration) is the name of a derived class, not the base class (line 8225-8232 of lib/Sema/SemaDeclCXX.cpp in https://reviews.llvm.org/rL274049). Because of this, name-based lookup performed inside Sema::LookupConstructors returns not only CXXConstructorDecls but also Using(Shadow)Decls, which results assertion failure reported in PR29087. Patch by Taewook Oh, thanks! Differential Revision: https://reviews.llvm.org/D23765 llvm-svn: 287999
* [DOXYGEN] Updated instruction names corresponding to avxintrin.h intrinsics.Ekaterina Romanova2016-11-261-166/+188
| | | | | | | | | Documentation for some of the avxintrin.h's intrinsics errorneously said that non VEX-prefixed instructions could be generated. This was fixed. I tried several different solutions to achieve pretty printing of unordered lists (nested and non-nested) in param sections in doxygen. llvm-svn: 287990
* Typo.Joerg Sonnenberger2016-11-251-1/+1
| | | | llvm-svn: 287947
* Do not do raw name replacement when FromDecl is a class forward-declaration.Eric Liu2016-11-252-5/+52
| | | | | | | | | | | | | | | Summary: If the `FromDecl` is a class forward declaration, the reference is still considered as referring to the original definition given the nature of forward-declarations, so we can't do a raw name replacement in this case. Reviewers: bkramer Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D27132 llvm-svn: 287929
* Document the arguments form of commands.Joerg Sonnenberger2016-11-251-0/+2
| | | | llvm-svn: 287926
* Consider nested namespaces in the canonical namespace as canonical as well.Eric Liu2016-11-252-31/+57
| | | | | | | | | | | | | | | | | | | | Summary: For example, this case was missed when looking for different but canonical namespaces. UseContext in this case should be considered as in the canonical namespace. ``` namespace a { namespace b { <FromContext> } } namespace a { namespace b { namespace c { <UseContext> } } } ``` Added some commenting. Reviewers: bkramer Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D27125 llvm-svn: 287924
* [CodeGen] Pass objects that are expensive to copy by const ref.Benjamin Kramer2016-11-244-16/+18
| | | | | | | No functionality change. Found by clang-tidy's performance-unnecessary-value-param. llvm-svn: 287894
* [Format] Avoid copying std::sets and simplify code a bit.Benjamin Kramer2016-11-241-3/+3
| | | | | | No functional change. llvm-svn: 287892
* [Sema] Pass APSInts by const ref, avoiding copies.Benjamin Kramer2016-11-241-3/+3
| | | | | | | No functionality change intended. Fix by clang-tidy's performance-unnecessary-value-param check. llvm-svn: 287890
* [PPC] support for arithmetic builtins in the FEEhsan Amiri2016-11-245-9/+380
| | | | | | | | | | | | | | | | | | | | (commit again after fixing the buildbot failures) This adds various overloads of the following builtins to altivec.h: vec_neg vec_nabs vec_adde vec_addec vec_sube vec_subec vec_subc Note that for vec_sub builtins on 32 bit integers, the semantics is similar to what ISA describes for instructions like vsubecuq that work on quadwords: the first operand is added to the one's complement of the second operand. (As opposed to two's complement which I expected). llvm-svn: 287872
* [ASTDumper] Add some more character escapes for convenience.Benjamin Kramer2016-11-242-4/+7
| | | | llvm-svn: 287859
* Remove comments (NFC)Kelvin Li2016-11-241-1509/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D27006 llvm-svn: 287852
* Make these tests work more reliably with Release builds.Douglas Yung2016-11-242-761/+761
| | | | | | Differential Revision: https://reviews.llvm.org/D26827 llvm-svn: 287851
* Spelling.Joerg Sonnenberger2016-11-241-1/+1
| | | | llvm-svn: 287847
* [PPC] revert r287795Ehsan Amiri2016-11-235-386/+9
| | | | | | A test that passed locally is failing on one of the build bots. llvm-svn: 287796
* [PPC] support for arithmetic builtins in the FEEhsan Amiri2016-11-235-9/+386
| | | | | | | | | | | | | | | | | | | | (commit again after fixing the buildbot failures) This adds various overloads of the following builtins to altivec.h: vec_neg vec_nabs vec_adde vec_addec vec_sube vec_subec vec_subc Note that for vec_sub builtins on 32 bit integers, the semantics is similar to what ISA describes for instructions like vsubecuq that work on quadwords: the first operand is added to the one's complement of the second operand. (As opposed to two's complement which I expected). llvm-svn: 287795
* Add dllexport default ctor closure PCH regression test for PR31121Reid Kleckner2016-11-231-0/+26
| | | | | | Follow up to r287774 llvm-svn: 287793
* [Sema][Atomics] Treat expected pointer in compare exchange atomics as _NonnullAlex Lorenz2016-11-232-7/+15
| | | | | | | | | | | This commit teaches clang that is has to emit a warning when NULL is passed as the 'expected' pointer parameter into an atomic compare exchange call. rdar://18926650 Differential Revision: https://reviews.llvm.org/D26978 llvm-svn: 287776
* [PPC] Reverting r287772Ehsan Amiri2016-11-235-385/+9
| | | | | | Due to buildbot failure, I revert. Will recommit after investigation. llvm-svn: 287775
* Remove C++ default arg side table for MS ABI ctor closuresReid Kleckner2016-11-2311-77/+79
| | | | | | | | | | | | | | | | | | | Summary: We don't need a side table in ASTContext to hold CXXDefaultArgExprs. The important part of building the CXXDefaultArgExprs was to ODR use the default argument expressions, not to make AST nodes. Refactor the code to only check the default argument, and remove the side table in ASTContext which wasn't being serialized. Fixes PR31121 Reviewers: thakis, rsmith, majnemer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D27007 llvm-svn: 287774
* [PPC] support for arithmetic builtins in the FEEhsan Amiri2016-11-235-9/+385
| | | | | | | | | | | | | | | | | | | This adds various overloads of the following builtins to altivec.h: vec_neg vec_nabs vec_adde vec_addec vec_sube vec_subec vec_subc Note that for vec_sub builtins on 32 bit integers, the semantics is similar to what ISA describes for instructions like vsubecuq that work on quadwords: the first operand is added to the one's complement of the second operand. (As opposed to two's complement which I expected). llvm-svn: 287772
* [CodeCompletion] Fix incorrect Objective-C block parameter formattingAlex Lorenz2016-11-232-4/+27
| | | | | | | | | | This commit fixes an incorrectly formatted Objective-C block parameter placeholder in a code completion result. The incorrect parameter had a redundant leading parenthesis. rdar://25224416 llvm-svn: 287771
* [ASTImporter] Added ability to import AtomicType nodesGabor Horvath2016-11-232-0/+24
| | | | | | | | Patch by: Kareem Khazem Differential Revision: https://reviews.llvm.org/D26328 llvm-svn: 287763
* [X86][AVX512VL] Add missing _mm256_maskz_alignr_epi64 shufflevector checkSimon Pilgrim2016-11-231-0/+1
| | | | | | Missed in rL287733 llvm-svn: 287755
* [CodeGen] Simplify code. No functionality change intended.Benjamin Kramer2016-11-231-8/+1
| | | | llvm-svn: 287754
* [X86] Replace valignd/q builtins with appropriate __builtin_shufflevector.Craig Topper2016-11-236-102/+119
| | | | llvm-svn: 287733
* Make diagnostic for use of default member initializer before enclosing class isRichard Smith2016-11-227-43/+49
| | | | | | | complete a little more general; it is produced in other cases than the one that it previously talked about. llvm-svn: 287713
* Remove variable only used in an assertion.John McCall2016-11-221-5/+0
| | | | llvm-svn: 287691
* Add test for D21736.Marcin Koscielnicki2016-11-222-7/+13
| | | | | | Differential Revision: http://reviews.llvm.org/D21741 llvm-svn: 287689
* [CodeGen] Insert TargetLibraryInfoWrapperPass before anything else.Marcin Koscielnicki2016-11-221-2/+9
| | | | | | | | | | | | Currently, TargetLibraryInfoWrapperPass is inserted by PMBuilder. However, some passes are inserted manually before the PMBuilder ones - if any of them happens to use TargetLibraryInfoWrapperPass, it'll get a default-constructed one, with an unknown target triple. This happens to InstrProfiling in D21736, breaking it. Differential Revision: http://reviews.llvm.org/D21737 llvm-svn: 287688
* darwin: Unconditionally pass -lto_library, remove -Wliblto warning.Nico Weber2016-11-223-20/+12
| | | | | | | | | | | | | | | | | | | | | https://reviews.llvm.org/D25932 made it so that clang always checks if libLTO.dylib is present on disk, even if -flto is not being used. The motivation for that change was that if a dependency happens to contain bitcode, ld64 will try to load libLTO without -flto explicitly being enabled. However, the change had the undesirable side effect of warning if libLTO.dylib doesn't exist even if it isn't needed. Change things so that -lto_library is always passes, independent of if it exists or not. ld64 only looks at this flag if it uses LTO. If the dylib exists, all is well. If it doesn't, and LTO is not being used, all is well too. If ld64 does end up using LTO and the dylib does not exist, ld64 will print something like ld: could not process llvm bitcode object file, because foo/libLTO.dylib could not be loaded file 'test.o' for architecture x86_64 https://reviews.llvm.org/D26984 llvm-svn: 287685
* Make llvm::Error generated from replacement interfaces more specific.Eric Liu2016-11-223-39/+166
| | | | | | | | | | | | | | | | | Summary: The new error information contains the type of error (e.g. overlap or bad file path) and the replacement(s) that is causing the error. This enables us to resolve some errors. For example, for insertion at the same location conflict, we need to know the existing replacement which conflicts with the new replacement in order to calculate the new position to be insert before/after the existing replacement (for merging). Reviewers: klimek, bkramer Subscribers: djasper, cfe-commits Differential Revision: https://reviews.llvm.org/D26853 llvm-svn: 287639
* Missing initializer.Axel Naumann2016-11-221-0/+1
| | | | llvm-svn: 287633
* Rename option to -lto-pass-remarks-outputAdam Nemet2016-11-222-4/+4
| | | | | | | The new option -pass-remarks-output broke LLVM_LINK_LLVM_DYLIB because of the duplicate option name with opt. llvm-svn: 287628
* [analyzer] Fix a crash on accessing a field within a literal-initialized union.Artem Dergachev2016-11-222-1/+15
| | | | | | | | | | | Because in case of unions we currently default-bind compound values in the store, this quick fix avoids the crash for this case. Patch by Ilya Palachev and independently by Alexander Shaposhnikov! Differential Revision: https://reviews.llvm.org/D26442 llvm-svn: 287618
* Fix -Asserts build, and add some more test cases.Peter Collingbourne2016-11-221-18/+31
| | | | llvm-svn: 287602
* Sema, CodeGen: Ensure that an implicit copy ctor is available more often ↵Peter Collingbourne2016-11-223-9/+88
| | | | | | | | | | | | | | | | under the Microsoft C++ ABI. This is needed because whether the constructor is deleted can control whether we pass structs by value directly. To fix this properly we probably want a more direct way for CodeGen to ask whether the constructor was deleted. Fixes PR31049. Differential Revision: https://reviews.llvm.org/D26822 llvm-svn: 287600
* Indicate in AST dump whether special member functions are defaulted and trivial.Richard Smith2016-11-212-3/+10
| | | | llvm-svn: 287599
* [ObjC] Prevent infinite loops when iterating over redeclarationAlex Lorenz2016-11-212-0/+27
| | | | | | | | | | | | | | | | of a method that was declared in an invalid interface This commit fixes an infinite loop that occurs when clang tries to iterate over redeclaration of a method that was declared in an invalid @interface. The existing validity checks don't catch this as that @interface is a duplicate of a previously declared valid @interface declaration, so we have to verify that the found redeclaration is in a valid declaration context. rdar://29220965 Differential Revision: https://reviews.llvm.org/D26664 llvm-svn: 287530
* [Frontend] Add a predefined macro that describes the Objective-C bool typeAlex Lorenz2016-11-212-0/+16
| | | | | | | | | | | | | This commit adds a new predefined macro named __OBJC_BOOL_IS_BOOL that describes the Objective-C boolean type: its value is zero if the Objective-C boolean uses the signed character type, otherwise its value is one as the Objective-C boolean uses the builtin boolean type. rdar://21170440 Differential Revision: https://reviews.llvm.org/D26234 llvm-svn: 287529
* [XRay] Support AArch64 in ClangDean Michael Berris2016-11-213-9/+15
| | | | | | | | | | | | | | | | | | This patch adds XRay support in Clang for AArch64 target. This patch is one of a series: LLVM: https://reviews.llvm.org/D26412 compiler-rt: https://reviews.llvm.org/D26413 Author: rSerge Reviewers: rengolin, dberris Subscribers: aemerson, cfe-commits, iid_iunknown Differential Revision: https://reviews.llvm.org/D26415 llvm-svn: 287518
* Add doxygen comments to immintrin.h's intrinsics.Ekaterina Romanova2016-11-201-0/+35
| | | | | | | | | | The doxygen comments are automatically generated based on Sony's intrinsics docu ment. I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream. This patch was internally reviewed by Charles Li. llvm-svn: 287483
* [CMake] Fixing clang standalone buildChris Bieneman2016-11-192-2/+10
| | | | | | I broke this in r287406 and r287407. llvm-svn: 287463
* Remove alignment from ctors/dtors lists in an attempt to placate LTO.John McCall2016-11-191-3/+9
| | | | llvm-svn: 287458
* Change setDiagnosticsOutputFile to take a unique_ptr from a raw pointer (NFC)Mehdi Amini2016-11-191-1/+2
| | | | | | | | | | | | | | Summary: This makes it explicit that ownership is taken. Also replace all `new` with make_unique<> at call sites. Reviewers: anemet Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D26884 llvm-svn: 287449
* Introduce a helper class for building complex constant initializers. NFC.John McCall2016-11-197-508/+770
| | | | | | | I've adopted this in most of the places it makes sense, but v-tables and CGObjCMac will need a second pass. llvm-svn: 287437
* Doxygen comments for avxintrin.h.Ekaterina Romanova2016-11-191-0/+923
| | | | | | | | | | | | | | Added doxygen comments to avxintrin.h's intrinsics. As of now, all the intrinsics in this file that were documented by Sony's intrinsics guide should have corresponding doxygen comments. Note: The doxygen comments are automatically generated based on Sony's intrinsic s document. I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream. Reviewed by Wolfgang Pieb. llvm-svn: 287436
* Sema: As of MSVC 2015, a user-declared move operation causes the deletion of ↵Peter Collingbourne2016-11-192-4/+25
| | | | | | | | both copy operations. Differential Revision: https://reviews.llvm.org/D26868 llvm-svn: 287411
OpenPOWER on IntegriCloud