summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* [Coroutines] Less IR for noexcept await_resumeBrian Gesiak2018-06-232-14/+64
| | | | | | | | | | | | | | | | | | | | Summary: In his review of https://reviews.llvm.org/D45860, @GorNishanov suggested avoiding generating additional exception-handling IR in the case that the resume function was marked as 'noexcept', and exceptions could not occur. This implements that suggestion. Test Plan: `check-clang` Reviewers: GorNishanov, EricWF Reviewed By: GorNishanov Subscribers: cfe-commits, GorNishanov Differential Revision: https://reviews.llvm.org/D47673 llvm-svn: 335422
* [Sema] isValidCoroutineContext FIXME and citationsBrian Gesiak2018-06-232-2/+40
| | | | | | | | | | | | | | | | | | | Summary: Add citations to the Coroutines TS to the `isValidCoroutineContext` function, as well as a FIXME and test for [expr.await]p2, which states a co_await expression cannot be used in a default argument. Test Plan: check-clang Reviewers: GorNishanov, EricWF Reviewed By: GorNishanov Subscribers: rsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D48519 llvm-svn: 335420
* Attempt to fix latent tablegen dependency issueReid Kleckner2018-06-231-1/+10
| | | | llvm-svn: 335419
* [Fuchsia] Enable static libc++, libc++abi, libunwindPetr Hosek2018-06-233-6/+10
| | | | | | | | This is needed for building Fuchsia drivers. Differential Revision: https://reviews.llvm.org/D48208 llvm-svn: 335410
* [Sema] -Wformat-pedantic only for NSInteger/NSUInteger %zu/%zi on DarwinJF Bastien2018-06-227-40/+109
| | | | | | | | | | | | | | | | | | | | | | | Summary: Pick D42933 back up, and make NSInteger/NSUInteger with %zu/%zi specifiers on Darwin warn only in pedantic mode. The default -Wformat recently started warning for the following code because of the added support for analysis for the '%zi' specifier. NSInteger i = NSIntegerMax; NSLog(@"max NSInteger = %zi", i); The problem is that on armv7 %zi is 'long', and NSInteger is typedefed to 'int' in Foundation. We should avoid this warning as it's inconvenient to our users: it's target specific (happens only on armv7 and not arm64), and breaks their existing code. We should also silence the warning for the '%zu' specifier to ensure consistency. This is acceptable because Darwin guarantees that, despite the unfortunate choice of typedef, sizeof(size_t) == sizeof(NS[U]Integer), the warning is therefore noisy for pedantic reasons. Once this is in I'll update public documentation. Related discussion on cfe-dev: http://lists.llvm.org/pipermail/cfe-dev/2018-May/058050.html <rdar://36874921&40501559> Reviewers: ahatanak, vsapsai, alexshap, aaron.ballman, javed.absar, jfb, rjmccall Subscribers: kristof.beyls, aheejin, cfe-commits Differential Revision: https://reviews.llvm.org/D47290 llvm-svn: 335393
* Re-land "[LTO] Enable module summary emission by default for regular LTO"Tobias Edler von Koch2018-06-227-20/+53
| | | | | | | | | | | | Since we are now producing a summary also for regular LTO builds, we need to run the NameAnonGlobals pass in those cases as well (the summary cannot handle anonymous globals). See https://reviews.llvm.org/D34156 for details on the original change. This reverts commit 6c9ee4a4a438a8059aacc809b2dd57128fccd6b3. llvm-svn: 335385
* Reinstate quotes around the path to python that I accidentaly removed in r335330Benjamin Kramer2018-06-221-1/+1
| | | | | | This broke users with spaces in the path, like C:\Program Files\Python llvm-svn: 335382
* Restore pre-r335182 behavior for naming inherited constructors asRichard Smith2018-06-224-4/+31
| | | | | | | | | | | | | | members of dependent contexts. This permits cases where the names before and after the '::' in a dependent inherited constructor using-declaration do not match, but where we can nonetheless tell when parsing the template that a constructor is being named. Under (open) core language DR 2070, such cases will probably be ill-formed, but r335182 does not quite give that result and didn't intend to change this, so restore the old behavior for now. llvm-svn: 335381
* Fix BUILD_SHARED_LIBS=1 build of libclangHandleLLVMSam Clegg2018-06-221-1/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D48503 llvm-svn: 335380
* [OPENMP, NVPTX] Fix reduction of the big data types/structures.Alexey Bataev2018-06-223-77/+171
| | | | | | | | If the shuffle is required for the reduced structures/big data type, current code may cause compiler crash because of the loading of the aggregate values. Patch fixes this problem. llvm-svn: 335377
* Re-apply: Warning for framework headers using double quote includesBruno Cardoso Lopes2018-06-2215-1/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce -Wquoted-include-in-framework-header, which should fire a warning whenever a quote include appears in a framework header and suggest a fix-it. For instance, for header A.h added in the tests, this is how the warning looks like: ./A.framework/Headers/A.h:2:10: warning: double-quoted include "A0.h" in framework header, expected angle-bracketed instead [-Wquoted-include-in-framework-header] #include "A0.h" ^~~~~~ <A/A0.h> ./A.framework/Headers/A.h:3:10: warning: double-quoted include "B.h" in framework header, expected angle-bracketed instead [-Wquoted-include-in-framework-header] #include "B.h" ^~~~~ <B.h> This helps users to prevent frameworks from using local headers when in fact they should be targetting system level ones. The warning is off by default. Differential Revision: https://reviews.llvm.org/D47157 rdar://problem/37077034 llvm-svn: 335375
* Implemented proto to LLVM conversion and LLVM fuzz targetEmmett Neyman2018-06-2214-36/+430
| | | | | | Differential Revision: https://reviews.llvm.org/D48106 llvm-svn: 335374
* [NFC] Fix AttributeList allocated_size for ParsedType.Erich Keane2018-06-221-0/+2
| | | | | | | | | This if/elseif structure seems to be missing this case. Previously, this would report a size of 1 pointer too small. This didn't really change anything besides failing to reclaim a very small amount of memory. llvm-svn: 335372
* Add const qualifier on FieldChainInfoComparator::operator()Steven Wu2018-06-221-1/+1
| | | | | | | libcxx has user defined warning to check for non const call operator. Silence the warning by adding the const on operator(). llvm-svn: 335366
* [OpenCL] Fixed parsing of address spaces for C++.Anastasia Stulova2018-06-222-0/+9
| | | | | | | Added address space tokens to C++ parsing code to be able to parse declarations that start from an address space keyword. llvm-svn: 335362
* [Sema] Updated note for address spaces to print the type.Anastasia Stulova2018-06-223-9/+7
| | | | | | This allows to reuse the same diagnostic for OpenCL or CUDA. llvm-svn: 335358
* [Driver] Make scudo compatible with -fsanitize-minimal-runtimeKostya Kortchinsky2018-06-224-10/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is the clang side of the change, there is a compiler-rt counterpart. Scudo works with UBSan using `-fsanitize=scudo,integer` for example, and to do so it embeds UBSan runtime. This makes it not compatible with the UBSan minimal runtime, but this is something we want for production purposes. The idea is to have a Scudo minimal runtime on the compiler-rt side that will not embed UBSan. This is basically the runtime that is currently in use for Fuchsia, without coverage, stacktraces or symbolization. With this, Scudo becomes compatible with `-fsanitize-minimal-runtime`. If this approach is suitable, I'll add the tests as well, otherwise I am open to other options. Reviewers: eugenis Reviewed By: eugenis Subscribers: llvm-commits, cfe-commits Differential Revision: https://reviews.llvm.org/D48373 llvm-svn: 335352
* [X86] Lower _mm[256|512]_cmp[.]_mask intrinsics to native llvm IRGabor Buella2018-06-226-203/+395
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Lowering some vector comparision builtins to fcmp IR instructions. This ignores the signaling behaviour specified in the predicate argument of said builtins. Affected AVX512 builtins: __builtin_ia32_cmpps128_mask __builtin_ia32_cmpps256_mask __builtin_ia32_cmpps512_mask __builtin_ia32_cmppd128_mask __builtin_ia32_cmppd256_mask __builtin_ia32_cmppd512_mask Reviewers: craig.topper, uriel.k, RKSimon, andrew.w.kaylor, spatel, scanon, efriedma Reviewed By: craig.topper, spatel, efriedma Differential Revision: https://reviews.llvm.org/D45616 llvm-svn: 335339
* [clang-format] Add AlwaysBreakBeforeMultilineString testsJacek Olesiak2018-06-221-0/+9
| | | | | | | | | | | | | | Summary: Followup to D47393. Reviewers: stephanemoore Reviewed By: stephanemoore Subscribers: benhamilton, cfe-commits Differential Revision: https://reviews.llvm.org/D48432 llvm-svn: 335338
* [hmaptool] Turn %hmaptool into a proper substitutionBenjamin Kramer2018-06-225-5/+9
| | | | | | | This is still super ugly, but at least it doesn't require working directories to just line up perfectly for python to find the tool. llvm-svn: 335330
* [x86] Fix a tiny bug in my test case in r335309 by marking that we don'tChandler Carruth2018-06-211-1/+2
| | | | | | expect any diagnostics. llvm-svn: 335310
* [x86] Teach the builtin argument range check to allow invalid ranges inChandler Carruth2018-06-2120-300/+340
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dead code. This is important for C++ templates that essentially compute the valid input in a way that is constant and will cause all the invalid cases to be dead code that is deleted. Code in the wild actually does this and GCC also accepts these kinds of patterns so it is important to support it. To make this work, we provide a non-error path to diagnose these issues, and use a default-error warning instead. This keeps the relatively strict handling but prevents nastiness like SFINAE on these errors. It also allows us to safely use the system to diagnose this only when it occurs at runtime (in emitted code). Entertainingly, this required fixing the syntax in various other ways for the x86 test because we never bothered to diagnose that the returns were invalid. Since debugging these compile failures was super confusing, I've also improved the diagnostic to actually say what the value was. Most of the checks I've made ignore this to simplify maintenance, but I've checked it in a few places to make sure the diagnsotic is working. Depends on D48462. Without that, we might actually crash some part of the compiler after bypassing the error here. Thanks to Richard, Ben Kramer, and especially Craig Topper for all the help here. Differential Revision: https://reviews.llvm.org/D48464 llvm-svn: 335309
* [X86] Update handling in CGBuiltin to be tolerant of out of range immediates.Craig Topper2018-06-215-32/+48
| | | | | | | | D48464 contains changes that will loosen some of the range checks in SemaChecking to a DefaultError warning that can be disabled. This patch adds explicit masking to avoid using the upper bits of immediates to gracefully handle the warning being disabled. llvm-svn: 335308
* Ignore blacklist when generating __cfi_check_fail.Evgeniy Stepanov2018-06-212-0/+11
| | | | | | | | | | | | Summary: Fixes PR37898. Reviewers: pcc, vlad.tsyrklevich Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D48454 llvm-svn: 335305
* Test commit, made a minor change to a commentEmmett Neyman2018-06-211-1/+1
| | | | llvm-svn: 335299
* Re-apply: Add python tool to dump and construct header mapsBruno Cardoso Lopes2018-06-2115-20/+345
| | | | | | | | | | | | | | | | | | | | | | | | | Header maps are binary files used by Xcode, which are used to map header names or paths to other locations. Clang has support for those since its inception, but there's not a lot of header map testing around. Since it's a binary format, testing becomes pretty much brittle and its hard to even know what's inside if you don't have the appropriate tools. Add a python based tool that allows creating and dumping header maps based on a json description of those. While here, rewrite tests to use the tool and remove the binary files from the tree. This tool was initially written by Daniel Dunbar. Thanks to Stella Stamenova for helping make this work on Windows. Differential Revision: https://reviews.llvm.org/D46485 rdar://problem/39994722 llvm-svn: 335295
* Revert "[LTO] Enable module summary emission by default for regular LTO"Tobias Edler von Koch2018-06-216-49/+18
| | | | | | | | | | | This is breaking a couple of buildbots. We need to run the NameAnonGlobal pass for regular LTO now as well (since we're producing a summary). I'll post a separate patch for review to make this happen and then re-commit. This reverts commit c0759b7b1f4a81ff9021b952aa38a222d5fa4dfd. llvm-svn: 335291
* AMDGPU: Remove amdgpu-debugger-reserve-regs featureKonstantin Zhuravlyov2018-06-212-2/+1
| | | | llvm-svn: 335287
* [OPENMP, NVPTX] Fix globalization of the variables passed to orphanedAlexey Bataev2018-06-213-49/+70
| | | | | | | | | | parallel region. If the current construct requires sharing of the local variable in the inner parallel region, this variable must be globalized to avoid runtime crash. llvm-svn: 335285
* [LTO] Enable module summary emission by default for regular LTOTobias Edler von Koch2018-06-216-18/+49
| | | | | | | | | | | | | | | | | | | Summary: With D33921, we gained the ability to have module summaries in regular LTO modules without triggering ThinLTO compilation. Module summaries in regular LTO allow garbage collection (dead stripping) before LTO compilation and thus open up additional optimization opportunities. This patch enables summary emission in regular LTO for all targets except ld64-based ones (which use the legacy LTO API). Reviewers: pcc, tejohnson, mehdi_amini Subscribers: inglorion, eraman, cfe-commits Differential Revision: https://reviews.llvm.org/D34156 llvm-svn: 335284
* [bindings] Fix most Python binding unittests on WindowsJonathan Coe2018-06-213-22/+21
| | | | | | | | | | | | | | | | | | Summary: This fixes all but one of the test cases for Windows. TestCDB will take more work to debug, as CompilationDatabase seems not to work correctly. Reviewers: bkramer, wanders, jbcoe Reviewed By: bkramer, jbcoe Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D47864 Patch written by ethanhs (Ethan) llvm-svn: 335282
* [X86] Correct the inline assembly implementations of __movsb/w/d/q and ↵Craig Topper2018-06-212-7/+97
| | | | | | | | | | | | __stosw/d/q to mark registers/memory as modified The inline assembly for these didn't mark that edi, esi, ecx are modified by movs/stos instruction. It also didn't mark that memory is modified. This issue was reported to llvm-dev last year http://lists.llvm.org/pipermail/cfe-dev/2017-November/055863.html but no bug was ever filed. Differential Revision: https://reviews.llvm.org/D48448 llvm-svn: 335270
* [Intrinsics] Add/move some builtin declarations in intrin.h to get ↵Craig Topper2018-06-211-4/+7
| | | | | | | | | | ms-intrinsics.c to not issue warnings ud2 and int2c were missing declarations entirely. And the bitscans were only under x86_64, but they seem to be in BuiltinsARM.def as well and are tested by ms_intrinsics.c Differential Revision: https://reviews.llvm.org/D48187 llvm-svn: 335259
* [DebugInfo] Inline for without DebugLocationAnastasis Grammenos2018-06-212-0/+19
| | | | | | | | | | | | | Summary: This test is a strip down version of a function inside the amalgamated sqlite source. When converted to IR clang produces a phi instruction without debug location. This patch fixes the above issue. Differential Revision: https://reviews.llvm.org/D47720 llvm-svn: 335255
* [X86] Rewrite the add/mul/or/and reduction intrinsics to make better use of ↵Craig Topper2018-06-212-478/+406
| | | | | | | | | | | | other intrinsics and remove undef shuffle indices. Similar to what was done to max/min recently. These already reduced the vector width to 256 and 128 bit as we go unlike the original max/min code. Differential Revision: https://reviews.llvm.org/D48346 llvm-svn: 335253
* [liblang] Remove DOS line endings in libclang.exportsRainer Orth2018-06-211-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Undefined first referenced symbol in file clang_getCompletionFixIt /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getTokenLocation /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getToken /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getTemplateCursorKind /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getTUResourceUsageName /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getCompletionChunkKind /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getCompletionChunkText /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getSpellingLocation /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getCompletionParent /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getCompletionChunkCompletionString /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getCompletionPriority /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getCompletionNumFixIts /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getTokenExtent /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getCompletionNumAnnotations /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getTokenKind /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports ld: fatal: symbol referencing errors collect2: error: ld returned 1 exit status make[2]: *** [tools/clang/tools/libclang/CMakeFiles/libclang.dir/build.make:651: lib/libclang.so.7] Error 1 It turns out that this is caused by https://reviews.llvm.org/D46862: it added a couple of CRs (^M) to some lines. Solaris ld takes them to be part of the symbol names, which of course are missing from the input objects. GNU ld handles this just fine. Fixed by removing the CRs. Bootstrapped on i386-pc-solaris2.11. I guess this is obvious. Differential Revision: https://reviews.llvm.org/D48423 llvm-svn: 335234
* Fix line endings in recently updated test fileIvan Donchevskii2018-06-211-59/+59
| | | | llvm-svn: 335220
* [Sema] Fix overloaded static functions for templatesIvan Donchevskii2018-06-212-50/+98
| | | | | | | | Apply almost the same fix as https://reviews.llvm.org/D36390 but for templates. Differential Revision: https://reviews.llvm.org/D43453 llvm-svn: 335211
* [X86] Remove masking from the 512-bit floating point max/min builtins. Use ↵Craig Topper2018-06-214-156/+121
| | | | | | select in IR instead. llvm-svn: 335200
* Revert "Add python tool to dump and construct header maps"Bruno Cardoso Lopes2018-06-2114-344/+19
| | | | | | | | | | | This reverts commit fcfa2dd517ec1a6045a81e8247e346d630a22618. Broke bots: http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/11315 http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/10411/steps/test-check-all/logs/stdio llvm-svn: 335196
* Revert "Warning for framework headers using double quote includes"Bruno Cardoso Lopes2018-06-2115-173/+1
| | | | | | | | | | | This reverts commit 9b5ff2db7e31c4bb11a7d468260b068b41c7c285. Broke bots: http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/11315 http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/10411/steps/test-check-all/logs/stdio llvm-svn: 335195
* Revert "Fix hmaptool cmake file to work on Windows"Bruno Cardoso Lopes2018-06-211-4/+4
| | | | | | | | | | This reverts commit 63711c3cd337a0d22617579a904af07481139611, due to breaking bots: http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/11315 http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/10411/steps/test-check-all/logs/stdio llvm-svn: 335194
* ASan docs: no_sanitize("address") works on globals.Evgeniy Stepanov2018-06-212-15/+20
| | | | | | | | | | | | Summary: Mention that no_sanitize attribute can be used with globals. Reviewers: alekseyshl Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D48390 llvm-svn: 335193
* When a dependent alignas is applied to a non-dependent typedef,Richard Smith2018-06-202-11/+18
| | | | | | | prioritize the error for the bad subject over the error for the dependent / non-dependent mismatch. llvm-svn: 335191
* Fix hmaptool cmake file to work on WindowsBruno Cardoso Lopes2018-06-201-4/+4
| | | | | | | | Unbreak a few windows buildbots: http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/11315 http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/10411/steps/test-check-all/logs/stdio llvm-svn: 335190
* Use cast instead of dyn_cast_or_null.Akira Hatanaka2018-06-201-1/+1
| | | | | | | | This addresses John's post-commit review feedback. https://reviews.llvm.org/rC335021#inline-2038 llvm-svn: 335189
* Warning for framework headers using double quote includesBruno Cardoso Lopes2018-06-2015-1/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce -Wquoted-include-in-framework-header, which should fire a warning whenever a quote include appears in a framework header and suggest a fix-it. For instance, for header A.h added in the tests, this is how the warning looks like: ./A.framework/Headers/A.h:2:10: warning: double-quoted include "A0.h" in framework header, expected angle-bracketed instead [-Wquoted-include-in-framework-header] #include "A0.h" ^~~~~~ <A/A0.h> ./A.framework/Headers/A.h:3:10: warning: double-quoted include "B.h" in framework header, expected angle-bracketed instead [-Wquoted-include-in-framework-header] #include "B.h" ^~~~~ <B.h> This helps users to prevent frameworks from using local headers when in fact they should be targetting system level ones. The warning is off by default. Differential Revision: https://reviews.llvm.org/D47157 rdar://problem/37077034 llvm-svn: 335184
* Related to PR37768: improve diagnostics for class name shadowing.Richard Smith2018-06-208-38/+143
| | | | | | | | | | | | Diagnose the name of the class being shadowed by using declarations, and improve the diagnostics for the case where the name of the class is shadowed by a non-static data member in a class with constructors. In the latter case, we now always give the "member with the same name as its class" diagnostic regardless of the relative order of the member and the constructor, rather than giving an inscrutible diagnostic if the constructor appears second. llvm-svn: 335182
* Add python tool to dump and construct header mapsBruno Cardoso Lopes2018-06-2014-19/+344
| | | | | | | | | | | | | | | | | | | | | | | Header maps are binary files used by Xcode, which are used to map header names or paths to other locations. Clang has support for those since its inception, but there's not a lot of header map testing around. Since it's a binary format, testing becomes pretty much brittle and its hard to even know what's inside if you don't have the appropriate tools. Add a python based tool that allows creating and dumping header maps based on a json description of those. While here, rewrite tests to use the tool and remove the binary files from the tree. This tool was initially written by Daniel Dunbar. Differential Revision: https://reviews.llvm.org/D46485 rdar://problem/39994722 llvm-svn: 335177
* [MS] Make sure __GetExceptionInfo works on types with no linkageReid Kleckner2018-06-202-0/+12
| | | | | | Fixes PR36327 llvm-svn: 335175
OpenPOWER on IntegriCloud