summaryrefslogtreecommitdiffstats
path: root/docs/ReleaseNotes.rst
Commit message (Collapse)AuthorAgeFilesLines
* ReleaseNotes: tidy upHans Wennborg2019-02-271-102/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354977 91177308-0d34-0410-b5e6-96231b3b80d8
* ReleaseNotes: ARM64 SEH, pointed out by David MajorHans Wennborg2019-02-261-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354855 91177308-0d34-0410-b5e6-96231b3b80d8
* Release notes for OpenCLAnastasia Stulova2019-02-251-4/+54
| | | | | | | | Differential Revision: https://reviews.llvm.org/D58504 git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354799 91177308-0d34-0410-b5e6-96231b3b80d8
* ReleaseNotes: drop mention of -ftrivial-auto-var-init=zeroHans Wennborg2019-02-251-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354794 91177308-0d34-0410-b5e6-96231b3b80d8
* ReleaseNotes: -ftrivial-auto-var-initHans Wennborg2019-02-221-0/+31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354660 91177308-0d34-0410-b5e6-96231b3b80d8
* ReleaseNotes: speculative load hardening; text by KristofHans Wennborg2019-02-211-1/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354583 91177308-0d34-0410-b5e6-96231b3b80d8
* ReleaseNotes: mention the new rotation builtins, text by SanjayHans Wennborg2019-02-201-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354450 91177308-0d34-0410-b5e6-96231b3b80d8
* ReleaseNotes: remove in-progress warning, and minor tweaksHans Wennborg2019-02-191-16/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354326 91177308-0d34-0410-b5e6-96231b3b80d8
* [docs][mips] Clang 8.0 Release notesSimon Atanasyan2019-01-301-0/+8
| | | | | | | | | | MIPS specific part of Clang 8.0 Release notes. Feel free to add more notes if I miss something. Differential Revision: http://reviews.llvm.org/D57458 git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@352675 91177308-0d34-0410-b5e6-96231b3b80d8
* [docs] Add release notes for notable things I've contributed since last releaseMartin Storsjo2019-01-221-0/+12
| | | | | | | Differential Revision: https://reviews.llvm.org/D57004 git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@351872 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r351580:Hans Wennborg2019-01-221-5/+17
| | | | | | | | | | | | | | ------------------------------------------------------------------------ r351580 | kli | 2019-01-18 20:57:37 +0100 (Fri, 18 Jan 2019) | 4 lines [OPENMP][DOCS] Release notes/OpenMP support updates, NFC. Differential Revision: https://reviews.llvm.org/D56733 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@351839 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang][UBSan] Sanitization for alignment assumptions.Roman Lebedev2019-01-151-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: UB isn't nice. It's cool and powerful, but not nice. Having a way to detect it is nice though. [[ https://wg21.link/p1007r3 | P1007R3: std::assume_aligned ]] / http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1007r2.pdf says: ``` We propose to add this functionality via a library function instead of a core language attribute. ... If the pointer passed in is not aligned to at least N bytes, calling assume_aligned results in undefined behaviour. ``` This differential teaches clang to sanitize all the various variants of this assume-aligned attribute. Requires D54588 for LLVM IRBuilder changes. The compiler-rt part is D54590. This is a second commit, the original one was r351105, which was mass-reverted in r351159 because 2 compiler-rt tests were failing. Reviewers: ABataev, craig.topper, vsk, rsmith, rnk, #sanitizers, erichkeane, filcab, rjmccall Reviewed By: rjmccall Subscribers: chandlerc, ldionne, EricWF, mclow.lists, cfe-commits, bkramer Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54589 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351177 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert alignment assumptions changesVlad Tsyrklevich2019-01-151-43/+0
| | | | | | | Revert r351104-6, r351109, r351110, r351119, r351134, and r351153. These changes fail on the sanitizer bots. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351159 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang][UBSan] Sanitization for alignment assumptions.Roman Lebedev2019-01-141-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: UB isn't nice. It's cool and powerful, but not nice. Having a way to detect it is nice though. [[ https://wg21.link/p1007r3 | P1007R3: std::assume_aligned ]] / http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1007r2.pdf says: ``` We propose to add this functionality via a library function instead of a core language attribute. ... If the pointer passed in is not aligned to at least N bytes, calling assume_aligned results in undefined behaviour. ``` This differential teaches clang to sanitize all the various variants of this assume-aligned attribute. Requires D54588 for LLVM IRBuilder changes. The compiler-rt part is D54590. Reviewers: ABataev, craig.topper, vsk, rsmith, rnk, #sanitizers, erichkeane, filcab, rjmccall Reviewed By: rjmccall Subscribers: chandlerc, ldionne, EricWF, mclow.lists, cfe-commits, bkramer Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54589 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351105 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP][DOCS]Release notes/OpenMP support updates, NFC.Alexey Bataev2019-01-091-0/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350757 91177308-0d34-0410-b5e6-96231b3b80d8
* Mention changes to libc++ include dir lookup in release notes.Ilya Biryukov2018-12-051-0/+7
| | | | | | | | | | | | | | Summary: The change itself landed as r348365, see the comment for more details. Reviewers: arphaman, EricWF Reviewed By: arphaman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55322 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348394 91177308-0d34-0410-b5e6-96231b3b80d8
* PTH-- Remove feature entirely-Erich Keane2018-12-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When debugging a boost build with a modified version of Clang, I discovered that the PTH implementation stores TokenKind in 8 bits. However, we currently have 368 TokenKinds. The result is that the value gets truncated and the wrong token gets picked up when including PTH files. It seems that this will go wrong every time someone uses a token that uses the 9th bit. Upon asking on IRC, it was brought up that this was a highly experimental features that was considered a failure. I discovered via googling that BoostBuild (mostly Boost.Math) is the only user of this feature, using the CC1 flag directly. I believe that this can be transferred over to normal PCH with minimal effort: https://github.com/boostorg/build/issues/367 Based on advice on IRC and research showing that this is a nearly completely unused feature, this patch removes it entirely. Note: I considered leaving the build-flags in place and making them emit an error/warning, however since I've basically identified and warned the only user, it seemed better to just remove them. Differential Revision: https://reviews.llvm.org/D54547 Change-Id: If32744275ef1f585357bd6c1c813d96973c4d8d9 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348266 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang][Parse] Diagnose useless null statements / empty init-statementsRoman Lebedev2018-11-201-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: clang has `-Wextra-semi` (D43162), which is not dictated by the currently selected standard. While that is great, there is at least one more source of need-less semis - 'null statements'. Sometimes, they are needed: ``` for(int x = 0; continueToDoWork(x); x++) ; // Ugly code, but the semi is needed here. ``` But sometimes they are just there for no reason: ``` switch(X) { case 0: return -2345; case 5: return 0; default: return 42; }; // <- oops ;;;;;;;;;;; <- OOOOPS, still not diagnosed. Clearly this is junk. ``` Additionally: ``` if(; // <- empty init-statement true) ; switch (; // empty init-statement x) { ... } for (; // <- empty init-statement int y : S()) ; } As usual, things may or may not go sideways in the presence of macros. While evaluating this diag on my codebase of interest, it was unsurprisingly discovered that Google Test macros are *very* prone to this. And it seems many issues are deep within the GTest itself, not in the snippets passed from the codebase that uses GTest. So after some thought, i decided not do issue a diagnostic if the semi is within *any* macro, be it either from the normal header, or system header. Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=39111 | PR39111 ]] Reviewers: rsmith, aaron.ballman, efriedma Reviewed By: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D52695 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@347339 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang][CodeGen] Implicit Conversion Sanitizer: discover the world of ↵Roman Lebedev2018-11-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CompoundAssign operators Summary: As reported by @regehr (thanks!) on twitter (https://twitter.com/johnregehr/status/1057681496255815686), we (me) has completely forgot about the binary assignment operator. In AST, it isn't represented as separate `ImplicitCastExpr`'s, but as a single `CompoundAssignOperator`, that does all the casts internally. Which means, out of these two, only the first one is diagnosed: ``` auto foo() { unsigned char c = 255; c = c + 1; return c; } auto bar() { unsigned char c = 255; c += 1; return c; } ``` https://godbolt.org/z/JNyVc4 This patch does handle the `CompoundAssignOperator`: ``` int main() { unsigned char c = 255; c += 1; return c; } ``` ``` $ ./bin/clang -g -fsanitize=integer /tmp/test.c && ./a.out /tmp/test.c:3:5: runtime error: implicit conversion from type 'int' of value 256 (32-bit, signed) to type 'unsigned char' changed the value to 0 (8-bit, unsigned) #0 0x2392b8 in main /tmp/test.c:3:5 #1 0x7fec4a612b16 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x22b16) #2 0x214029 in _start (/build/llvm-build-GCC-release/a.out+0x214029) ``` However, the pre/post increment/decrement is still not handled. Reviewers: rsmith, regehr, vsk, rjmccall, #sanitizers Reviewed By: rjmccall Subscribers: mclow.lists, cfe-commits, regehr Tags: #clang, #sanitizers Differential Revision: https://reviews.llvm.org/D53949 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@347258 91177308-0d34-0410-b5e6-96231b3b80d8
* [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to ↵Calixte Denizet2018-11-171-0/+6
| | | | | | | | | | | | | | | | | | filter the files to instrument with gcov (after revert https://reviews.llvm.org/rL346659) Summary: the previous patch (https://reviews.llvm.org/rC346642) has been reverted because of test failure under windows. So this patch fix the test cfe/trunk/test/CodeGen/code-coverage-filter.c. Reviewers: marco-c Reviewed By: marco-c Subscribers: cfe-commits, sylvestre.ledru Differential Revision: https://reviews.llvm.org/D54600 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@347144 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert rL346644, rL346642: the added test ↵Calixte Denizet2018-11-121-6/+0
| | | | | | test/CodeGen/code-coverage-filter.c is failing under windows git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346659 91177308-0d34-0410-b5e6-96231b3b80d8
* [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to ↵Calixte Denizet2018-11-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | filter the files to instrument with gcov Summary: These options are taking regex separated by colons to filter files. - if both are empty then all files are instrumented - if -fprofile-filter-files is empty then all the filenames matching any of the regex from exclude are not instrumented - if -fprofile-exclude-files is empty then all the filenames matching any of the regex from filter are instrumented - if both aren't empty then all the filenames which match any of the regex in filter and which don't match all the regex in filter are instrumented - this patch is a follow-up of https://reviews.llvm.org/D52033 Reviewers: marco-c, vsk Reviewed By: marco-c, vsk Subscribers: cfe-commits, sylvestre.ledru Differential Revision: https://reviews.llvm.org/D52034 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346642 91177308-0d34-0410-b5e6-96231b3b80d8
* Release notes: Mention clang-cl's /Zc:dllexportInlines- flagHans Wennborg2018-11-121-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346640 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang] try-fix broken documentation builderJonas Toth2018-10-311-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345737 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang][ubsan] Implicit Conversion Sanitizer - integer sign change - clang partRoman Lebedev2018-10-301-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the second half of Implicit Integer Conversion Sanitizer. It completes the first half, and finally makes the sanitizer fully functional! Only the bitfield handling is missing. Summary: C and C++ are interesting languages. They are statically typed, but weakly. The implicit conversions are allowed. This is nice, allows to write code while balancing between getting drowned in everything being convertible, and nothing being convertible. As usual, this comes with a price: ``` void consume(unsigned int val); void test(int val) { consume(val); // The 'val' is `signed int`, but `consume()` takes `unsigned int`. // If val is negative, then consume() will be operating on a large // unsigned value, and you may or may not have a bug. // But yes, sometimes this is intentional. // Making the conversion explicit silences the sanitizer. consume((unsigned int)val); } ``` Yes, there is a `-Wsign-conversion`` diagnostic group, but first, it is kinda noisy, since it warns on everything (unlike sanitizers, warning on an actual issues), and second, likely there are cases where it does **not** warn. The actual detection is pretty easy. We just need to check each of the values whether it is negative, and equality-compare the results of those comparisons. The unsigned value is obviously non-negative. Zero is non-negative too. https://godbolt.org/g/w93oj2 We do not have to emit the check *always*, there are obvious situations where we can avoid emitting it, since it would **always** get optimized-out. But i do think the tautological IR (`icmp ult %x, 0`, which is always false) should be emitted, and the middle-end should cleanup it. This sanitizer is in the `-fsanitize=implicit-conversion` group, and is a logical continuation of D48958 `-fsanitize=implicit-integer-truncation`. As for the ordering, i'we opted to emit the check **after** `-fsanitize=implicit-integer-truncation`. At least on these simple 16 test cases, this results in 1 of the 12 emitted checks being optimized away, as compared to 0 checks being optimized away if the order is reversed. This is a clang part. The compiler-rt part is D50251. Finishes fixing [[ https://bugs.llvm.org/show_bug.cgi?id=21530 | PR21530 ]], [[ https://bugs.llvm.org/show_bug.cgi?id=37552 | PR37552 ]], [[ https://bugs.llvm.org/show_bug.cgi?id=35409 | PR35409 ]]. Finishes partially fixing [[ https://bugs.llvm.org/show_bug.cgi?id=9821 | PR9821 ]]. Finishes fixing https://github.com/google/sanitizers/issues/940. Only the bitfield handling is missing. Reviewers: vsk, rsmith, rjmccall, #sanitizers, erichkeane Reviewed By: rsmith Subscribers: chandlerc, filcab, cfe-commits, regehr Tags: #sanitizers, #clang Differential Revision: https://reviews.llvm.org/D50250 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345660 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Revert "Support for groups of attributes in #pragma clang attribute""Erik Pilkington2018-10-291-2/+2
| | | | | | | This reverts commit r345487, which reverted r345486. I think the crashes were caused by an OOM on the builder, trying again to confirm... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345517 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Support for groups of attributes in #pragma clang attribute"Erik Pilkington2018-10-291-2/+2
| | | | | | | | | This reverts commit r345486. Looks like it causes some old versions of GCC to crash, I'll see if I can work around it and recommit... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345487 91177308-0d34-0410-b5e6-96231b3b80d8
* Support for groups of attributes in #pragma clang attributeErik Pilkington2018-10-291-2/+2
| | | | | | | | | | | | | | | | | | This commit enables pushing an empty #pragma clang attribute push, then adding multiple attributes to it, then popping them all with #pragma clang attribute pop, just like #pragma clang diagnostic. We still support the current way of adding these, #pragma clang attribute push(__attribute__((...))), by treating it like a combined push/attribute. This is needed to create macros like: DO_SOMETHING_BEGIN(attr1, attr2, attr3) // ... DO_SOMETHING_END rdar://45496947 Differential revision: https://reviews.llvm.org/D53621 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345486 91177308-0d34-0410-b5e6-96231b3b80d8
* PR26547: alignof should return ABI alignment, not preferred alignmentRichard Smith2018-10-261-0/+20
| | | | | | | | | | | | Summary: - Add `UETT_PreferredAlignOf` to account for the difference between `__alignof` and `alignof` - `AlignOfType` now returns ABI alignment instead of preferred alignment iff clang-abi-compat > 7, and one uses _Alignof or alignof Patch by Nicole Mazzuca! Differential Revision: https://reviews.llvm.org/D53207 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345419 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a flag to remap manglings when reading profile data information.Richard Smith2018-10-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | This can be used to preserve profiling information across codebase changes that have widespread impact on mangled names, but across which most profiling data should still be usable. For example, when switching from libstdc++ to libc++, or from the old libstdc++ ABI to the new ABI, or even from a 32-bit to a 64-bit build. The user can provide a remapping file specifying parts of mangled names that should be treated as equivalent (eg, std::__1 should be treated as equivalent to std::__cxx11), and profile data will be treated as applying to a particular function if its name is equivalent to the name of a function in the profile data under the provided equivalences. See the documentation change for a description of how this is configured. Remapping is supported for both sample-based profiling and instruction profiling. We do not support remapping indirect branch target information, but all other profile data should be remapped appropriately. Support is only added for the new pass manager. If someone wants to also add support for this for the old pass manager, doing so should be straightforward. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@344199 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-cl, PCH] Support for /Yc and /Yu without filename and #pragma hdrstopMike Rice2018-09-111-0/+5
| | | | | | | | | | | | | | | With clang-cl, when the user specifies /Yc or /Yu without a filename the compiler uses a #pragma hdrstop in the main source file to determine the end of the PCH. If a header is specified with /Yc or /Yu #pragma hdrstop has no effect. The optional #pragma hdrstop filename argument is not yet supported. Differential Revision: https://reviews.llvm.org/D51391 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@341963 91177308-0d34-0410-b5e6-96231b3b80d8
* ReleaseNotes: update links to use httpsHans Wennborg2018-09-101-9/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@341786 91177308-0d34-0410-b5e6-96231b3b80d8
* Update docs version and clear release notes after 8.0.0 version bumpHans Wennborg2018-08-011-149/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338557 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang][ubsan] Implicit Conversion Sanitizer - integer truncation - clang partRoman Lebedev2018-07-301-2/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: C and C++ are interesting languages. They are statically typed, but weakly. The implicit conversions are allowed. This is nice, allows to write code while balancing between getting drowned in everything being convertible, and nothing being convertible. As usual, this comes with a price: ``` unsigned char store = 0; bool consume(unsigned int val); void test(unsigned long val) { if (consume(val)) { // the 'val' is `unsigned long`, but `consume()` takes `unsigned int`. // If their bit widths are different on this platform, the implicit // truncation happens. And if that `unsigned long` had a value bigger // than UINT_MAX, then you may or may not have a bug. // Similarly, integer addition happens on `int`s, so `store` will // be promoted to an `int`, the sum calculated (0+768=768), // and the result demoted to `unsigned char`, and stored to `store`. // In this case, the `store` will still be 0. Again, not always intended. store = store + 768; // before addition, 'store' was promoted to int. } // But yes, sometimes this is intentional. // You can either make the conversion explicit (void)consume((unsigned int)val); // or mask the value so no bits will be *implicitly* lost. (void)consume((~((unsigned int)0)) & val); } ``` Yes, there is a `-Wconversion`` diagnostic group, but first, it is kinda noisy, since it warns on everything (unlike sanitizers, warning on an actual issues), and second, there are cases where it does **not** warn. So a Sanitizer is needed. I don't have any motivational numbers, but i know i had this kind of problem 10-20 times, and it was never easy to track down. The logic to detect whether an truncation has happened is pretty simple if you think about it - https://godbolt.org/g/NEzXbb - basically, just extend (using the new, not original!, signedness) the 'truncated' value back to it's original width, and equality-compare it with the original value. The most non-trivial thing here is the logic to detect whether this `ImplicitCastExpr` AST node is **actually** an implicit conversion, //or// part of an explicit cast. Because the explicit casts are modeled as an outer `ExplicitCastExpr` with some `ImplicitCastExpr`'s as **direct** children. https://godbolt.org/g/eE1GkJ Nowadays, we can just use the new `part_of_explicit_cast` flag, which is set on all the implicitly-added `ImplicitCastExpr`'s of an `ExplicitCastExpr`. So if that flag is **not** set, then it is an actual implicit conversion. As you may have noted, this isn't just named `-fsanitize=implicit-integer-truncation`. There are potentially some more implicit conversions to be warned about. Namely, implicit conversions that result in sign change; implicit conversion between different floating point types, or between fp and an integer, when again, that conversion is lossy. One thing i know isn't handled is bitfields. This is a clang part. The compiler-rt part is D48959. Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=21530 | PR21530 ]], [[ https://bugs.llvm.org/show_bug.cgi?id=37552 | PR37552 ]], [[ https://bugs.llvm.org/show_bug.cgi?id=35409 | PR35409 ]]. Partially fixes [[ https://bugs.llvm.org/show_bug.cgi?id=9821 | PR9821 ]]. Fixes https://github.com/google/sanitizers/issues/940. (other than sign-changing implicit conversions) Reviewers: rjmccall, rsmith, samsonov, pcc, vsk, eugenis, efriedma, kcc, erichkeane Reviewed By: rsmith, vsk, erichkeane Subscribers: erichkeane, klimek, #sanitizers, aaron.ballman, RKSimon, dtzWill, filcab, danielaustin, ygribov, dvyukov, milianw, mclow.lists, cfe-commits, regehr Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D48958 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338288 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP, DOCS] Fixed typo, NFC.Alexey Bataev2018-07-261-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338055 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] What's new for OpenMP in clang.Alexey Bataev2018-07-261-1/+15
| | | | | | Updated ReleaseNotes + Status of the OpenMP support in clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338049 91177308-0d34-0410-b5e6-96231b3b80d8
* fix typoNico Weber2018-07-201-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337620 91177308-0d34-0410-b5e6-96231b3b80d8
* Mention clang-cl improvements from r335466 and r336379 in ReleaseNotes.rstNico Weber2018-07-181-1/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337381 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-land r337333, "Teach Clang to emit address-significance tables.",Peter Collingbourne2018-07-181-0/+8
| | | | | | | | | | | | | | | | | | | | | which was reverted in r337336. The problem that required a revert was fixed in r337338. Also added a missing "REQUIRES: x86-registered-target" to one of the tests. Original commit message: > Teach Clang to emit address-significance tables. > > By default, we emit an address-significance table on all ELF > targets when the integrated assembler is enabled. The emission of an > address-significance table can be controlled with the -faddrsig and > -fno-addrsig flags. > > Differential Revision: https://reviews.llvm.org/D48155 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337339 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r337333, "Teach Clang to emit address-significance tables."Peter Collingbourne2018-07-171-8/+0
| | | | | | | | | Causing multiple failures on sanitizer bots due to TLS symbol errors, e.g. /usr/bin/ld: __msan_origin_tls: TLS definition in /home/buildbots/ppc64be-clang-test/clang-ppc64be/stage1/lib/clang/7.0.0/lib/linux/libclang_rt.msan-powerpc64.a(msan.cc.o) section .tbss.__msan_origin_tls mismatches non-TLS reference in /tmp/lit_tmp_0a71tA/mallinfo-3ca75e.o git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337336 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach Clang to emit address-significance tables.Peter Collingbourne2018-07-171-0/+8
| | | | | | | | | | | By default, we emit an address-significance table on all ELF targets when the integrated assembler is enabled. The emission of an address-significance table can be controlled with the -faddrsig and -fno-addrsig flags. Differential Revision: https://reviews.llvm.org/D48155 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337333 91177308-0d34-0410-b5e6-96231b3b80d8
* The :option: syntax was generating Sphinx build warnings; switched to double ↵Aaron Ballman2018-06-281-3/+2
| | | | | | backticks to silence the warning; NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@335843 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -fforce-emit-vtablesPiotr Padlewski2018-06-131-0/+6
| | | | | | | | | | | | | | | | | | | | Summary: In many cases we can't devirtualize because definition of vtable is not present. Most of the time it is caused by inline virtual function not beeing emitted. Forcing emitting of vtable adds a reference of these inline virtual functions. Note that GCC was always doing it. Reviewers: rjmccall, rsmith, amharc, kuhar Subscribers: llvm-commits, cfe-commits Differential Revision: https://reviews.llvm.org/D47108 Co-authored-by: Krzysztof Pszeniczny <krzysztof.pszeniczny@gmail.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@334600 91177308-0d34-0410-b5e6-96231b3b80d8
* [diagtool] Add diagtool to install target.Jonas Devlieghere2018-05-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | Although not very well known, diagtool is an incredibly convenient utility for dealing with diagnostics. Particularly useful are the "tree" and "show-enabled" commands: - The former prints the hierarchy of diagnostic (warning) flags and which of them are enabled by default. - The latter can be used to replace an invocation to clang and will print which diagnostics are disabled, warnings or errors. For instance: `diagtool show-enabled -Wall -Werror /tmp/test.c` will print that -Wunused-variable (warn_unused_variable) will be treated as an error. This patch adds them to the install target so it gets shipped with the LLVM release. It also adds a very basic man page and mentions this change in the release notes. Differential revision: https://reviews.llvm.org/D46694 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332448 91177308-0d34-0410-b5e6-96231b3b80d8
* [Documentation] Fix Release Notes format issues.Eugene Zelenko2018-05-151-7/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332405 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-format] Add raw string formatting to release notesKrasimir Georgiev2018-05-081-0/+4
| | | | | | | | | | | | Reviewers: hans Reviewed By: hans Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D46572 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331750 91177308-0d34-0410-b5e6-96231b3b80d8
* Non-zero-length bit-fields make a class non-empty.Richard Smith2018-05-071-0/+9
| | | | | | | | | | | | | | | | | | | | This implements the rule intended by the standard (see LWG 2358) and the rule intended by the Itanium C++ ABI (see https://github.com/itanium-cxx-abi/cxx-abi/pull/51), and makes Clang match the behavior of GCC, ICC, and MSVC. A pedantic reading of both the standard and the ABI indicate that Clang is currently technically correct, but that's not worth much when it's clear that the wording is wrong in both those places. This is an ABI break for classes that derive from a class that is empty other than one or more unnamed non-zero-length bit-fields. Such cases are expected to be rare, but -fclang-abi-compat=6 restores the old behavior just in case. Differential Revision: https://reviews.llvm.org/D45174 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331620 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver, CodeGen] rename options to disable an FP cast optimizationSanjay Patel2018-04-301-8/+7
| | | | | | | | | | | | | | | As suggested in the post-commit thread for rL331056, we should match these clang options with the established vocabulary of the corresponding sanitizer option. Also, the use of 'strict' is well-known for these kinds of knobs, and we can improve the descriptive text in the docs. So this intends to match the logic of D46135 but only change the words. Matching LLVM commit to match this spelling of the attribute to follow shortly. Differential Revision: https://reviews.llvm.org/D46236 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331209 91177308-0d34-0410-b5e6-96231b3b80d8
* PR37275 packed attribute should not apply to base classesRichard Smith2018-04-291-0/+6
| | | | | | | | | | | | | | Clang incorrectly applied the packed attribute to base classes. Per GCC's documentation and as can be observed from its behavior, packed only applies to members, not base classes. This change is conditioned behind -fclang-abi-compat so that an ABI break can be avoided by users if desired. Differential Revision: https://reviews.llvm.org/D46218 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331136 91177308-0d34-0410-b5e6-96231b3b80d8
* [docs] more dashesSanjay Patel2018-04-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331057 91177308-0d34-0410-b5e6-96231b3b80d8