summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* [X86][SSE] Update MOVNTDQA non-temporal loads to generic implementation (clang)Simon Pilgrim2017-04-147-9/+6
| | | | | | | | | | MOVNTDQA non-temporal aligned vector loads can be correctly represented using generic builtin loads, allowing us to remove the existing x86 intrinsics. LLVM companion patch: D31767. Differential Revision: https://reviews.llvm.org/D31766 llvm-svn: 300326
* PR32280: Do not crash on nested initializers.Vassil Vassilev2017-04-142-8/+27
| | | | | | Patch by Yuka Takahashi (D31591)! llvm-svn: 300313
* [AMDGPU][GFX9] Set +fp32-denormals for >=gfx900 unless -cl-denorms-are-zero ↵Konstantin Zhuravlyov2017-04-142-3/+19
| | | | | | | | is set Differential Revision: https://reviews.llvm.org/D31482 llvm-svn: 300306
* Fix use after free errorXinliang David Li2017-04-141-1/+1
| | | | llvm-svn: 300304
* clang/test/CoverageMapping/unused_names.c: Relax an expression for targeting ↵NAKAMURA Takumi2017-04-141-1/+1
| | | | | | PECOFF. llvm-svn: 300303
* Remove unused function /nfcXinliang David Li2017-04-141-4/+0
| | | | llvm-svn: 300301
* [docs] UBSan: Mention that print_stacktrace=1 is unsupported on DarwinVedant Kumar2017-04-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Printing out stack traces along with UBSan diagnostics is unsupported on Darwin. That's because it isn't possible to use the fast unwinder or the slow unwinder. Apparently, it's inappropriate to use the fast unwinder for UBSan issues. I'm not exactly sure why (see the comment in ubsan_diag.cc). Forcing use of the fast unwinder produces decent results, AFAICT. Darwin also does not appear to have a slow unwinder suitable for use with the sanitizers. Apparently that's because of PR20800 [1][2]. But that bug has been fixed. I'm not sure if there is anything preventing use of the slow unwinder now. Currently, passing UBSAN_OPTIONS=print_stacktrace=1 does nothing on Darwin. This isn't good, but it might be a while before we can fix the situation, so we should at least document it. [1] https://github.com/google/sanitizers/issues/137 "We can't use the slow unwinder on OSX now, because Clang produces incorrect unwind info for the ASan runtime functions on OSX (http://llvm.org/PR20800)." [2] https://bugs.llvm.org/show_bug.cgi?id=20800 Bug 20800 - Invalid compact unwind info generated for a function without frame pointers on OSX llvm-svn: 300295
* Revert r300287.Kuba Mracek2017-04-143-6/+9
| | | | llvm-svn: 300290
* [ObjC] Fix lifetime markers of loop variable in EmitObjCForCollectionStmtKuba Mracek2017-04-143-9/+6
| | | | | | | | CodeGenFunction::EmitObjCForCollectionStmt currently emits lifetime markers for the loop variable in an inconsistent way: lifetime.start is emitted before the loop is entered, but lifetime.end is emitted inside the loop. AddressSanitizer uses these markers to track out-of-scope accesses to local variables, and we get false positives in Obj-C foreach loops (in the 2nd iteration of the loop). The markers of the loop variable need to be either both inside the loop (so that we poison and unpoison the variable in each iteration), or both outside. This patch implements the "both inside" approach. Differential Revision: https://reviews.llvm.org/D32029 llvm-svn: 300287
* Fix PR31934: forming refs to functions with enable_if attrs.George Burgess IV2017-04-132-0/+40
| | | | llvm-svn: 300283
* [Profile] PE binary coverage bug fixXinliang David Li2017-04-131-1/+1
| | | | | | | | PR/32584 Differential Revision: https://reviews.llvm.org/D32023 llvm-svn: 300279
* [IR] Make getParamAttributes take argument numbers, not ArgNo+1Reid Kleckner2017-04-131-1/+1
| | | | | | | | | | | | Add hasParamAttribute() and use it instead of hasAttribute(ArgNo+1, Kind) everywhere. The fact that the AttributeList index for an argument is ArgNo+1 should be a hidden implementation detail. NFC llvm-svn: 300272
* [docs] Regenerate diagnostics reference.Richard Smith2017-04-131-2/+119
| | | | llvm-svn: 300271
* [docs] Fix a couple of typos in command line flag help text and regenerate ↵Richard Smith2017-04-132-15/+61
| | | | | | documentation. llvm-svn: 300270
* Add test for anonymous struct containing an implicitly private data member.Richard Smith2017-04-131-0/+3
| | | | | | Patch by Jacob Young! llvm-svn: 300266
* Diagnose attempt to take address of bitfield members in anonymous structs.Richard Smith2017-04-133-2/+10
| | | | | | | | Patch by Jacob Young! Differential Revision: https://reviews.llvm.org/D27263 llvm-svn: 300264
* PR32185: Revert r291512 and add a testcase for PR32185.Richard Smith2017-04-136-49/+83
| | | | | | | | | | | | | | | This reverts an attempt to check that types match when matching a dependently-typed non-type template parameter. (This comes up when matching the parameters of a template template parameter against the parameters of a template template argument.) The matching rules here are murky at best. Our behavior after this revert is definitely wrong for certain C++17 features (for 'auto' template parameter types within the parameter list of a template template argument in particular), but our behavior before this revert is wrong for some pre-existing testcases, so reverting to our prior behavior seems like our best option. llvm-svn: 300262
* [CMake] Support building Fuchsia toolchain on DarwinPetr Hosek2017-04-132-0/+10
| | | | | | | | | This is already supported on Linux but on Darwin it requires some extra flags. Differential Revision: https://reviews.llvm.org/D30958 llvm-svn: 300257
* clang-format-vs licence.txt: drop svn:executableHans Wennborg2017-04-131-0/+0
| | | | | | Not sure how it ended up with that property in the first place. llvm-svn: 300245
* Follow-up to r300225: update ClangFormat.csproj tooHans Wennborg2017-04-131-1/+1
| | | | llvm-svn: 300231
* Follow-up to r300225: update ClangFormat.sln to VS2017Hans Wennborg2017-04-131-2/+2
| | | | | | This got lost in the previous patch somehow. llvm-svn: 300226
* Warning-free clang-format plugin install for VS 15.0Hans Wennborg2017-04-133-81/+24
| | | | | | | | | | | | | | | | | | | | With the new release of VS, it's required that all plugins migrate to the new VSIX manifest format. The new format is backwards compatible with all versions newer that Visual Studio 2012, so this migration effectively drops support for older versions of the IDE. It's also required that these new extensions are built with Visual Studio 2017, so unfortunately it was necessary to migrate the project and solution. Also removed COM references to EnvDTE and Microsoft.VisualStudio.TextManager.Interop from the csproj, as they seem to both be unnecessary and would trigger build warnings because of changes to GAC. Patch by Hugo Puhlmann! Differential Revision: https://reviews.llvm.org/D31740 llvm-svn: 300225
* clang-format-vs: Use a separate license.txt copyHans Wennborg2017-04-133-7/+40
| | | | | | | The regular file used to display very poorly in the VSIX installer due to long lines, wrapping etc. llvm-svn: 300223
* Use the clang-cl recognized spelling of --target=Reid Kleckner2017-04-131-3/+3
| | | | | | This fixes a warning. The test was passing without this change. llvm-svn: 300214
* Re-land "[clang-cl] Make all sanitizer flags available in clang-cl"Reid Kleckner2017-04-132-24/+41
| | | | | | | | | | Adding RUN lines with %clang_cl was causing these tests to fail on Mac because absolute paths there tend to start with "/User/", which is recognized as the "/U" flag. Re-lands r300122 llvm-svn: 300209
* [analyzer] Enforce super-region classes for various memory regions.Artem Dergachev2017-04-138-93/+124
| | | | | | | | | | | | We now check the type of the super-region pointer for most SubRegion classes in compile time; some checks are run-time though. This is an API-breaking change (we now require explicit casts to specific region sub-classes), but in practice very few checkers are affected. Differential Revision: https://reviews.llvm.org/D26838 llvm-svn: 300189
* [analyzer] Add numerous assertions to SVal, SymExpr, and MemRegion classes.Artem Dergachev2017-04-136-119/+230
| | | | | | | | | | | | | | Clean up vtable anchors (remove anchors for regions that have regular out-of-line virtual methods, add anchors for regions that don't have those). Fix private/public methods (all constructors should now be private for leaf classes, protected for abstract classes). No functional change intended, only extra sanity checks and cleanups. Differential Revision: https://reviews.llvm.org/D26837 llvm-svn: 300187
* Revert "[clang-cl] Make all sanitizer flags available in clang-cl"Akira Hatanaka2017-04-132-41/+24
| | | | | | | | | | This reverts commit 47979b20b475664013d19382fc6875b5b9f3ed9d. This was causing a couple of bots to fail. http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/30152 llvm-svn: 300181
* [analyzer] Simplify values in binary operations a bit more aggressively.Artem Dergachev2017-04-133-5/+96
| | | | | | | | | | | | | | | | | SValBuilder tries to constant-fold symbols in the left-hand side of the symbolic expression whenever it fails to evaluate the expression directly. However, it only constant-folds them when they are atomic expressions, not when they are complicated expressions themselves. This patch adds recursive constant-folding to the left-hand side subexpression (there's a lack of symmetry because we're trying to have symbols on the left and constants on the right). As an example, we'd now be able to handle operations similar to "$x + 1 < $y", when $x is constrained to a constant. rdar://problem/31354676 Differential Revision: https://reviews.llvm.org/D31886 llvm-svn: 300178
* [IR] Take func, ret, and arg attrs separately in AttributeList::getReid Kleckner2017-04-131-12/+8
| | | | | | | | | | | | | This seems like a much more natural API, based on Derek Schuff's comments on r300015. It further hides the implementation detail of AttributeList that function attributes come last and appear at index ~0U, which is easy for the user to screw up. git diff says it saves code as well: 97 insertions(+), 137 deletions(-) This also makes it easier to change the implementation, which I want to do next. llvm-svn: 300153
* Fix broken test. We can't assume that 2MB of args is enough to require a ↵Richard Smith2017-04-131-3/+4
| | | | | | | | | response file. This test has apparently been broken for years, but we never noticed before because it's a long test and long tests approximately never get run. llvm-svn: 300151
* ExternalASTMerger.cpp: Silence another warning. [-Wunused-lambda-capture]NAKAMURA Takumi2017-04-131-0/+1
| | | | llvm-svn: 300145
* Update to match LLVM r300135.Richard Smith2017-04-122-3/+2
| | | | | | Remove "REQUIRES: long_tests" from test/Driver/response-file.c since it is now about 10x faster. (We can add that back if it's still too slow for some buildbot.) llvm-svn: 300136
* [clang-cl] Make all sanitizer flags available in clang-clReid Kleckner2017-04-122-24/+41
| | | | | | | | | | | | | | | Summary: Use a tablegen let {} block so that new sanitizer flags are available by default in all driver modes. This should cut down on time wasted with bugs like http://crbug.com/710928. Reviewers: vitalybuka, hans Subscribers: kcc, llvm-commits Differential Revision: https://reviews.llvm.org/D31988 llvm-svn: 300122
* [Sema] Add __is_aggregate type-traitEric Fiselier2017-04-129-7/+138
| | | | | | | | | | | | | | | | Summary: [LWG 2911](http://cplusplus.github.io/LWG/lwg-defects.html#2911) adds `std::is_aggregate` to the library, which requires a new builtin trait. This patch implements `__is_aggregate`. Reviewers: rsmith, majnemer, aaron.ballman Reviewed By: aaron.ballman Subscribers: STL_MSFT, cfe-commits Differential Revision: https://reviews.llvm.org/D31513 llvm-svn: 300116
* [analyzer] Add a check for IvarRegion in getExtraInvalidatedValuesAlexander Shaposhnikov2017-04-122-5/+23
| | | | | | | | | | | | This diff adds a defensive check in getExtraInvalidatedValues for the case when there are no regions for the ivar associated with a property. Corresponding test case added. Test plan: make check-clang make check-clang-analysis llvm-svn: 300114
* [modules] Delay calling DeclMustBeEmitted until it's safe.Vassil Vassilev2017-04-123-31/+47
| | | | | | | | | | | | | This patch implements the suggestion in D29753 that calling DeclMustBeEmitted in the middle of deserialization should be avoided and that the actual check should be deferred until it's safe to do so. This patch fixes a crash when accessing the invalid redecl chains while trying to evaluate the value of a const VarDecl that contains a function call. Patch by Raphael Isemann (D30793)! llvm-svn: 300110
* [Driver] Add compiler option to generate a reproducerBruno Cardoso Lopes2017-04-127-13/+52
| | | | | | | | | | | | | | | | | | | | | One way to currently test the reproducers is to setup "FORCE_CLANG_DIAGNOSTICS_CRASH=1" before invoking clang. This simulates a crash and produces the same contents needed by the reproducers. The reproducers are specially useful when triaging Modules issues, not only on crashes, but also for reproducing misleading warnings, errors, etc. Add a '-gen-reproducer' driver option to clang (or any similar name) and give users a flag option. Note that clang already has a -fno-crash-diagnostics, which disables the crash reproducers. I've decided not to propose "-fcrash-diagnostics" since it doesn't convey the ideia of reproduction despite a crash. rdar://problem/24114619 Differential Revision: https://reviews.llvm.org/D27604 llvm-svn: 300109
* [Modules] Enable local submodule visibility for ObjC/CBruno Cardoso Lopes2017-04-122-6/+8
| | | | | | | | | | Remove the restriction where this is only valid with C++ rdar://problem/29055656 Differential Revision: https://reviews.llvm.org/D31781 llvm-svn: 300108
* Modular Codegen: Include testing for inline asm as well as some commentary ↵David Blaikie2017-04-122-0/+16
| | | | | | on the implementaiton choice. llvm-svn: 300106
* Fix up test to handle the now split -fmodules-codegen and ↵David Blaikie2017-04-121-2/+2
| | | | | | -fmodules-debuginfo flags llvm-svn: 300105
* Modular Codegen: Separate flags for function and debug info supportDavid Blaikie2017-04-1211-14/+53
| | | | | | | | | | This allows using and testing these two features separately. (noteably, debug info is, so far as I know, always a win (basically). But function modular codegen is currently a loss for highly optimized code - where most of the linkonce_odr definitions are optimized away, so providing weak_odr definitions is only overhead) llvm-svn: 300104
* Revert r300001 "Revert r298824 & r298816, recommit r298742 & r298754"Hans Wennborg2017-04-124-385/+111
| | | | | | It caused PR32640. llvm-svn: 300074
* Moving a C++ test out of Sema and into SemaCXX; NFC.Aaron Ballman2017-04-121-0/+0
| | | | llvm-svn: 300071
* [x86] fix AVX FP cmp intrinsic documentation (PR28110)Sanjay Patel2017-04-121-70/+196
| | | | | | | | | | | | | | | | This copies the text used in the #define statements to the code comments. The conflicting text comes from AMD manuals, but those are wrong. Sadly, that FP cmp text has not been updated even after some docs were updated for Zen: http://support.amd.com/en-us/search/tech-docs ( AMD64 Architecture Programmer's Manual Volume 4 ) See PR28110 for more discussion: https://bugs.llvm.org/show_bug.cgi?id=28110 Differential Revision: https://reviews.llvm.org/D31428 llvm-svn: 300068
* Add support for __builtin_available to __has_builtinAlex Lorenz2017-04-122-0/+6
| | | | | | rdar://31576715 llvm-svn: 300049
* Rangify for loop, NFC.Yaron Keren2017-04-121-3/+1
| | | | llvm-svn: 300043
* Remove Sema::addOverloadedOperatorToUnresolvedSet declaration. Its ↵Yaron Keren2017-04-121-3/+0
| | | | | | definition was removed in r206436. llvm-svn: 300036
* Update Clang for an API change to LLVM's switch case iterator (it is nowChandler Carruth2017-04-121-1/+1
| | | | | | | an actual iterator and so we need to look through it to the case handle). llvm-svn: 300035
* [Modules] Remove darwin specific code to check for SystemVersion.plistBruno Cardoso Lopes2017-04-122-54/+0
| | | | | | | | | | This isn't need anymore and modules options -fbuild-session-file and -fmodules-validate-once-per-build-session already provide a sane mechanism to validate the system headers. rdar://problem/19767523 llvm-svn: 300027
OpenPOWER on IntegriCloud