summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* [CodeGen] Update to use an ArrayRef of uint32_t instead of int in calls to ↵Craig Topper2016-06-121-10/+10
| | | | | | CreateShuffleVector to match llvm interface change. llvm-svn: 272492
* [X86][BMI] Improved bmi intrinsics checks Simon Pilgrim2016-06-111-49/+94
| | | | | | Ready for matching with llvm/test/CodeGen/X86/bmi-intrinsics-fast-isel.ll (to be added shortly) llvm-svn: 272490
* Visual Studio Visualizers for ActionResult, LocInfoType, and and TypeSourceInfoMike Spertus2016-06-111-0/+39
| | | | | | | | | | | Created a visualizer for ActionResult that displayed the validity and the pointer, but many of them initially displayed poorly. It turns out that the primary culprit is that LocInfoType is often passed in an action result, but it is not the same as other types. For example, LocInfoType is not in TypeNodes.def and clang::Type::TypeClass does not have a LocInfoType enum. After adding a special visualizer for LocInfoType, the display was more useful llvm-svn: 272487
* Fix cv-qualification of '*this' captures and nasty bug PR27507 Faisal Vali2016-06-114-30/+288
| | | | | | | | | | | | | The bug report by Gonzalo (https://llvm.org/bugs/show_bug.cgi?id=27507 -- which results in clang crashing when generic lambdas that capture 'this' are instantiated in contexts where the Functionscopeinfo stack is not in a reliable state - yet getCurrentThisType expects it to be) - unearthed some additional bugs in regards to maintaining proper cv qualification through 'this' when performing by value captures of '*this'. This patch attempts to correct those bugs and makes the following changes: o) when capturing 'this', we do not need to remember the type of 'this' within the LambdaScopeInfo's Capture - it is never really used for a this capture - so remove it. o) teach getCurrentThisType to walk the stack of lambdas (even in scenarios where we run out of LambdaScopeInfo's such as when instantiating call operators) looking for by copy captures of '*this' and resetting the type of 'this' based on the constness of that capturing lambda's call operator. This patch has been baking in review-hell for > 6 weeks - all the comments so far have been addressed and the bug (that it addresses in passing, and I regret not submitting as a separate patch initially) has been reported twice independently, so is frequent and important for us not to just sit on. I merged the cv qualification-fix and the PR-fix initially in one patch, since they resulted from my initial implementation of star-this and so were related. If someone really feels strongly, I can put in the time to revert this - separate the two out - and recommit. I won't claim it's immunized against all bugs, but I feel confident enough about the fix to land it for now. llvm-svn: 272480
* [AVX512] Use a regular expression instead of checking for a specific name in ↵Craig Topper2016-06-111-1/+1
| | | | | | a CHECK line in test. llvm-svn: 272470
* [AVX512] Implement masked and 512-bit pshufd intrinsics directly with ↵Craig Topper2016-06-116-36/+50
| | | | | | __builtin_shufflevector and __builtin_ia32_select. llvm-svn: 272467
* [X86] Add explicit typecasts to some intrinsics.Craig Topper2016-06-111-4/+6
| | | | llvm-svn: 272466
* [clang-format] pass Style by reference instead of value.Eric Liu2016-06-111-1/+1
| | | | llvm-svn: 272465
* Fix this test to handle NDEBUG builds which don't have a name for theChandler Carruth2016-06-111-4/+4
| | | | | | basic block. llvm-svn: 272456
* Revert "Strip Android version when looking up toolchain paths."Chandler Carruth2016-06-114-19/+1
| | | | | | | This reverts commit r272413. The tests here have been failing on several different build bots for over 10 hours. llvm-svn: 272454
* Revert "[ASTMatchers] New forEachOverriden matcher."Chandler Carruth2016-06-117-134/+9
| | | | | | | This reverts commit r272386. It doesn't compile with MSVC and those bots have been red the entire day as a consequence. llvm-svn: 272453
* [AVX512] Implement 512-bit and masked shufflelo and shufflehi intrinsics ↵Craig Topper2016-06-117-68/+149
| | | | | | directly with __builtin_shufflevector and __builtin_ia32_select. Also improve the formatting of the AVX2 version. llvm-svn: 272452
* [AVX512] Add _mm512_bsrli_epi128 and _mm512_bslli_epi128 intrinsics.Craig Topper2016-06-112-1/+149
| | | | llvm-svn: 272451
* Visual Studio visualizers associated with LookupResultsMike Spertus2016-06-111-0/+18
| | | | | | | | | | Visualizers for DeclAccessPair, UnresolvedSet, and LookupResult. For example, when combined with LLVM diff D21256 (currently in review), a Lookup set will show much more naturally in the Locals window something like Found: {public typename ...Ts} llvm-svn: 272448
* [Sema] Return an appropriate result from CheckSpecifiedExceptionTypeDavid Majnemer2016-06-112-5/+9
| | | | | | | | We shouldn't return true from CheckSpecifiedExceptionType if the record type is incomplete and -fms-extensions is engaged. Otherwise we will have an incomplete AST. llvm-svn: 272447
* Added missing close brace to OpaquePtr Visual Studio visualizerMike Spertus2016-06-101-1/+1
| | | | | | This syntax error resulted in garbage being appended to OpaquePtr visualizations llvm-svn: 272441
* Revise RenderScript attribute declarationPirama Arumuga Nainar2016-06-103-17/+12
| | | | | | | | | | | | | | | | Summary: Address post-patch comments to r272342. - Rename the 'kernel' attribute's name - Idiomatically restrict the attribute to the 'RenderScript' LangOpt. Reviewers: aaron.ballman, rsmith Subscribers: cfe-commits, srhines Differential Revision: http://reviews.llvm.org/D21240 llvm-svn: 272438
* [-fms-extensions] Don't crash on explicit class-scope specializations & ↵David Majnemer2016-06-102-1/+10
| | | | | | | | | | | | | | default arguments The code had a typo it was doing: Param->setUninstantiatedDefaultArg(Param->getUninstantiatedDefaultArg()); This is a no-op but may assert, we wanted to do: Param->setUninstantiatedDefaultArg(OldParam->getUninstantiatedDefaultArg()); This fixes PR28082. llvm-svn: 272425
* Driver: make it easier to select the SjLj EH modelSaleem Abdulrasool2016-06-104-3/+12
| | | | | | | | | | | GCC still permits enabling the SjLj EH model. This is something which can be done on various targets. Hoist the -fsjlj-exceptions option into the driver and pass it through. This allows one to opt into the alternative EH model while retaining the default to be the target's default. Resolves PR27749! llvm-svn: 272424
* Remove a few gendered pronouns.Nico Weber2016-06-105-8/+7
| | | | llvm-svn: 272415
* Strip Android version when looking up toolchain paths.Josh Gao2016-06-104-1/+19
| | | | | | | | | | | | | | | | Summary: Android target triples can include a version number in the abi field (e.g. 'aarch64-linux-android21'), used for checking for availability. However, the driver was searching for toolchain binaries using the passed in triple as a prefix. Reviewers: srhines, danalbert, t.p.northover Subscribers: t.p.northover, aemerson, tberghammer, danalbert, srhines, cfe-commits Differential Revision: http://reviews.llvm.org/D21163 llvm-svn: 272413
* [-fms-extensions] Permit incomplete types in dynamic exception specificationsDavid Majnemer2016-06-103-3/+12
| | | | | | | | | | Microsoft headers, comdef.h and comutil.h, assume that this is an OK thing to do. Downgrade the hard error to a warning if we are in -fms-extensions mode. This fixes PR28080. llvm-svn: 272412
* This patch fixes target linker emulation for ARM 32 big endian.Strahinja Petrovic2016-06-102-3/+3
| | | | llvm-svn: 272402
* Preallocate ExplodedNode hash tableBen Craig2016-06-102-0/+7
| | | | | | | | | | | | | | | | | | | | | | Rehashing the ExplodedNode table is very expensive. The hashing itself is expensive, and the general activity of iterating over the hash table is highly cache unfriendly. Instead, we guess at the eventual size by using the maximum number of steps allowed. This generally avoids a rehash. It is possible that we still need to rehash if the backlog of work that is added to the worklist significantly exceeds the number of work items that we process. Even if we do need to rehash in that scenario, this change is still a win, as we still have fewer rehashes that we would have prior to this change. For small work loads, this will increase the memory used. For large work loads, it will somewhat reduce the memory used. Speed is significantly increased. A large .C file took 3m53.812s to analyze prior to this change. Now it takes 3m38.976s, for a ~6% improvement. http://reviews.llvm.org/D20933 llvm-svn: 272394
* [ASTMatchers] New forEachOverriden matcher.Clement Courbet2016-06-107-9/+134
| | | | | | Matches methods overridden by the given method. llvm-svn: 272386
* test commit: remove trailing whitespace in commentsClement Courbet2016-06-101-3/+3
| | | | llvm-svn: 272378
* Check for null pointers before calling the Stmt ProfilerRichard Trieu2016-06-101-31/+63
| | | | | | | | | Some calls from OMPClauseProfiler were calling the Stmt Profiler with null pointers, but the profiler can only handle non-null pointers. Add an assert to the VisitStmt for valid pointers, and check all calls from OMPClauseProfiler to be non-null pointers. llvm-svn: 272368
* Fix recognition of shadowed template parameterSerge Pavlov2016-06-102-11/+24
| | | | | | | | | | | | | | | | | | | | | | | Crash reported in PR28023 is caused by the fact that non-type template parameters are found by tag name lookup. In the code provided in that PR: template<int V> struct A { struct B { template <int> friend struct V; }; }; the template parameter V is found when lookup for redeclarations of 'struct V' is made. Latter on the error about shadowing of 'V' is emitted but the semantic context of 'struct V' is already determined wrong: 'struct A' instead of translation unit. The fix moves the check for shadowing toward the beginning of the method and thus prevents from wrong context calculations. This change fixes PR28023. llvm-svn: 272366
* Reduce sizeof(CXXConstructorDecl) by 4-8 bytes.Richard Smith2016-06-101-6/+7
| | | | llvm-svn: 272361
* Remove CXXConstructExpr::getFoundDecl(); it turned out to not be useful.Richard Smith2016-06-108-38/+38
| | | | llvm-svn: 272357
* Add doxygen comments to mmintrin.h's intrinsics.Ekaterina Romanova2016-06-101-0/+1041
| | | | | | | | | | 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. llvm-svn: 272350
* RenderScript support in the FrontendPirama Arumuga Nainar2016-06-098-0/+56
| | | | | | | | | | | | | | | | | | | | | Summary: Create a new Frontend LangOpt to specify the renderscript language. It is enabled by the "-x renderscript" option from the driver. Add a "kernel" function attribute only for RenderScript (an "ignored attribute" warning is generated otherwise). Make the NativeHalfType and NativeHalfArgsAndReturns LangOpts be implied by the RenderScript LangOpt. Reviewers: rsmith Subscribers: cfe-commits, srhines Differential Revision: http://reviews.llvm.org/D21198 llvm-svn: 272342
* clang-format: [JS] recognized named functions in AnnotatingParser.Martin Probst2016-06-092-1/+6
| | | | | | | | | | | | | | | Summary: This also fixes union type formatting in function parameter types. Before: function x(path: number| string) {} After: function x(path: number|string) {} Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D21206 llvm-svn: 272330
* Redirect unused output in test to /dev/nullRichard Trieu2016-06-091-3/+3
| | | | | | | Discard unused output so when the test fails, it only prints information that is helpful about the failure. No functional change. llvm-svn: 272325
* [CMake] Cleaning up CMake version checks in ExternalProject callsChris Bieneman2016-06-092-25/+9
| | | | | | Now that we're on CMake 3.4.3 all the ExternalProject features we use are supported everywhere, so we don't need the version checks anymore. llvm-svn: 272324
* [CMake] Version is aways greater than 3Chris Bieneman2016-06-091-25/+22
| | | | | | We don't need any checks for this code anymore. Since CMake version is always greater than 3 we can always generate the exports file. llvm-svn: 272323
* Fix a crash in the AST dumper.Richard Trieu2016-06-092-2/+14
| | | | | | | Boxed expressions in a template context may have a null method decl. If so, don't try to access the selector. llvm-svn: 272318
* Add a RenderScript language typePirama Arumuga Nainar2016-06-095-2/+7
| | | | | | | | | | | | | | | | | Summary: Add RenderScript language type and associate it with ".rs" extensions. Test that the driver passes "-x renderscript" to the frontend for ".rs" files. (Also add '.rs' to the list of suffixes tested by lit). Reviewers: rsmith Subscribers: cfe-commits, srhines Differential Revision: http://reviews.llvm.org/D21199 llvm-svn: 272317
* [CMake] Cleaning up CMake feature gating on 2.8.12Chris Bieneman2016-06-094-18/+4
| | | | | | CMake 2.8.12 introduced interface libraries and some related policies. This removes the conditional block because we're now past 2.8.12. llvm-svn: 272312
* Revert "[Temporary] Add an ExprWithCleanups for each C++ ↵Tim Shen2016-06-0923-181/+63
| | | | | | | | | MaterializeTemporaryExpr." This reverts r272296, since there are clang-tidy failures that appear to be caused by this change. llvm-svn: 272310
* [CUDA] Implement __shfl* intrinsics in clang headers.Justin Lebar2016-06-093-6/+88
| | | | | | | | | | | | Summary: Clang changes to make use of the LLVM intrinsics added in D21160. Reviewers: tra Subscribers: jholewinski, cfe-commits Differential Revision: http://reviews.llvm.org/D21162 llvm-svn: 272299
* [Temporary] Add an ExprWithCleanups for each C++ MaterializeTemporaryExpr.Tim Shen2016-06-0923-63/+181
| | | | | | | | | | | These ExprWithCleanups are added for holding a RunCleanupsScope not for destructor calls; rather, they are for lifetime marks. This requires ExprWithCleanups to keep a bit to indicate whether it have cleanups with side effects (e.g. dtor calls). Differential Revision: http://reviews.llvm.org/D20498 llvm-svn: 272296
* Revert "[CMake] Fix an issue building out-of-tree introduced in r272200"Chris Bieneman2016-06-091-2/+0
| | | | | | | | This reverts r272275. This actually wasn't the right way to fix the problem. The correct solution is in r272279. Applying the fix to LLVM as done in r272279, means this fix will get picked up by all projects building out of tree using LLVM's CMake modules. As opposed to the fix I had in r272275, which would require each project to change. llvm-svn: 272280
* [CMake] Fix an issue building out-of-tree introduced in r272200Chris Bieneman2016-06-091-0/+2
| | | | | | The out-of-tree build needs to read LLVM_TOOLS_INSTALL_DIR out of TOOLS_BINARY_DIR because LLVM_TOOLS_INSTALL_DIR is used by AddLLVM.cmake llvm-svn: 272275
* Make sizeof and alignof a CXCursor_UnaryExprOlivier Goffart2016-06-093-5/+5
| | | | | | | | So we can match sizeof expressions more accurately than with UnexposedExpr Differential Revision: http://reviews.llvm.org/D18081 llvm-svn: 272274
* CIndex: add support for static_assertOlivier Goffart2016-06-094-1/+17
| | | | | | Differential Revision: http://reviews.llvm.org/D18080 llvm-svn: 272273
* Replace an ambiguous "it"Rafael Espindola2016-06-091-1/+1
| | | | | | Thanks to Sean for the suggestion. llvm-svn: 272260
* clang/test/CodeGenCXX/debug-info-method.cpp: Tweak for thiscall, for ↵NAKAMURA Takumi2016-06-091-1/+1
| | | | | | targeting Win32 x86. llvm-svn: 272253
* [Sema] Don't crash when a field w/ a mem-initializer clashes with a record nameDavid Majnemer2016-06-092-2/+11
| | | | | | | | | | | It is possible for a field and a class to have the same name. In such cases, performing lookup for the field might return a result set with more than one entry. An overzealous assertion fired, causing us to crash instead of using the non-class lookup result. This fixes PR28060. llvm-svn: 272247
* [X86] Handle AVX2 pslldqi and psrldqi intrinsics shufflevector creation ↵Craig Topper2016-06-095-100/+120
| | | | | | directly in the header file instead of in CGBuiltin.cpp. Simplify the sse2 equivalents as well. llvm-svn: 272246
OpenPOWER on IntegriCloud