- Apr 18, 2017
-
-
Alex Lorenz authored
The new '#pragma clang attribute' directive can be used to apply attributes to multiple declarations. An attribute must satisfy the following conditions to be supported by the pragma: - It must have a subject list that's defined in the TableGen file. - It must be documented. - It must not be late parsed. - It must have a GNU/C++11 spelling. Differential Revision: https://reviews.llvm.org/D30009 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300539 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 14, 2017
-
-
Vedant Kumar authored
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300295 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300271 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300270 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 13, 2017
-
-
Eric Fiselier authored
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300116 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 12, 2017
-
-
Bruno Cardoso Lopes authored
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300109 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 11, 2017
-
-
Sylvestre Ledru authored
Reviewers: djasper Reviewed By: djasper Subscribers: Eugene.Zelenko, klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D31408 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299919 91177308-0d34-0410-b5e6-96231b3b80d8
-
Peter Collingbourne authored
docs: Use the term "whole-program devirtualization" instead of "virtual function call optimization". The former term is probably more familiar to users. Also add references to the command line flags used to enable the features described in the doc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299902 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 05, 2017
-
-
Nico Weber authored
clang-format <<END auto c1 = u8'a'; auto c2 = u'a'; END Before: auto c1 = u8 'a'; auto c2 = u'a'; Now: auto c1 = u8'a'; auto c2 = u'a'; Patch from Denis Gladkikh <llvm@denis.gladkikh.email>! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299574 91177308-0d34-0410-b5e6-96231b3b80d8
-
Adam Nemet authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299488 91177308-0d34-0410-b5e6-96231b3b80d8
-
Adam Nemet authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299481 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 04, 2017
-
-
Adam Nemet authored
This adds the new pragma and the first variant, contract(on/off/fast). The pragma has the same block scope rules as STDC FP_CONTRACT, i.e. it can be placed at the beginning of a compound statement or at file scope. Similarly to STDC FP_CONTRACT there is no need to use attributes. First an annotate token is inserted with the parsed details of the pragma. Then the annotate token is parsed in the proper contexts and the Sema is updated with the corresponding FPOptions using the shared ActOn function with STDC FP_CONTRACT. After this the FPOptions from the Sema is propagated into the AST expression nodes. There is no change here. I was going to add a 'default' option besides 'on/off/fast' similar to STDC FP_CONTRACT but then decided against it. I think that we'd have to make option uppercase then to avoid using 'default' the keyword. Also because of the scoped activation of pragma I am not sure there is really a need a for this. Differential Revision: https://reviews.llvm.org/D31276 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299470 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 28, 2017
-
-
Eric Liu authored
Reviewers: hokein, aaron.ballman Reviewed By: aaron.ballman Subscribers: aaron.ballman, cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D28671 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298912 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 22, 2017
-
-
Stephan Bergmann authored
Reviewers: rsmith, rizsotto.mailinglist Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D31133 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298490 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 21, 2017
-
-
Eric Christopher authored
The alias was only ever used on darwin and had some issues there, and isn't used in practice much. Also fixes a problem with -mno-altivec not turning off -maltivec. Also add a diagnostic for faltivec/fno-altivec that directs users to use maltivec options and include the altivec.h file explicitly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298449 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 20, 2017
-
-
Vedant Kumar authored
PR32346 suggests that UBSan's docs about the -fsanitize, -fno-sanitize-recover, and -fsanitize-trap options are not explicit enough. Try to improve the wording. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298310 91177308-0d34-0410-b5e6-96231b3b80d8
-
Kostya Serebryany authored
Summary: Proposal: Backward-edge CFI for return statements (RCFI) Reviewers: pcc, eugenis, krasin Reviewed By: eugenis Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31112 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298303 91177308-0d34-0410-b5e6-96231b3b80d8
-
Jonathan Roelofs authored
... mostly having to do with code blocks which the syntax highlighter chokes on git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298275 91177308-0d34-0410-b5e6-96231b3b80d8
-
Sylvestre Ledru authored
Reviewers: djasper Reviewed By: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D30990 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298245 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 17, 2017
-
-
Bruno Cardoso Lopes authored
Expand a bit on private modules with some guidance on how to write them in the context of frameworks. rdar://problem/24758771 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298012 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 15, 2017
-
-
Aaron Ballman authored
Add AST matchers for ObjCProtocolDecl, ObjCCategoryDecl, ObjCMethodDecl, ObjCIvarDecl, and ObjCPropertyDecl. Patch by Dave Lee. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297882 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 14, 2017
-
-
Krasimir Georgiev authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297730 91177308-0d34-0410-b5e6-96231b3b80d8
-
Sylvestre Ledru authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297721 91177308-0d34-0410-b5e6-96231b3b80d8
-
Vedant Kumar authored
Teach UBSan to detect when a value with the _Nonnull type annotation assumes a null value. Call expressions, initializers, assignments, and return statements are all checked. Because _Nonnull does not affect IRGen, the new checks are disabled by default. The new driver flags are: -fsanitize=nullability-arg (_Nonnull violation in call) -fsanitize=nullability-assign (_Nonnull violation in assignment) -fsanitize=nullability-return (_Nonnull violation in return stmt) -fsanitize=nullability (all of the above) This patch builds on top of UBSan's existing support for detecting violations of the nonnull attributes ('nonnull' and 'returns_nonnull'), and relies on the compiler-rt support for those checks. Eventually we will need to update the diagnostic messages in compiler-rt (there are FIXME's for this, which will be addressed in a follow-up). One point of note is that the nullability-return check is only allowed to kick in if all arguments to the function satisfy their nullability preconditions. This makes it necessary to emit some null checks in the function body itself. Testing: check-clang and check-ubsan. I also built some Apple ObjC frameworks with an asserts-enabled compiler, and verified that we get valid reports. Differential Revision: https://reviews.llvm.org/D30762 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297700 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 13, 2017
-
-
Sylvestre Ledru authored
Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D30860 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297623 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 10, 2017
-
-
Andi-Bogdan Postelnicu authored
Differential Revision: https://reviews.llvm.org/D30487 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297467 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 09, 2017
-
-
Sylvestre Ledru authored
Summary: For example, "int\* a;" is displayed instead of "int* a;" Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D30740 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297363 91177308-0d34-0410-b5e6-96231b3b80d8
-
Anna Zaks authored
Some of the magic functions take arguments of arbitrary type. However, for semantic correctness, the compiler still requires a declaration of these functions with the correct type. Since C does not have argument-type-overloaded function, this made those functions hard to use in C code. Improve this situation by allowing arbitrary suffixes in the affected magic functions' names, thus allowing the user to create different declarations for different types. A patch by Keno Fischer! Differential Revision: https://reviews.llvm.org/D30589 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297325 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 08, 2017
-
-
Sylvestre Ledru authored
Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D30734 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297275 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 06, 2017
-
-
Sylvestre Ledru authored
Reviewers: klimek, djasper Reviewed By: djasper Subscribers: krasimir, kimgr, cfe-commits Differential Revision: https://reviews.llvm.org/D30532 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297025 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 01, 2017
-
-
Krasimir Georgiev authored
Summary: This patch enables namespace end comments under a new flag FixNamespaceComments, which is enabled for the LLVM and Google styles. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D30405 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296632 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 27, 2017
-
-
Nico Weber authored
https://reviews.llvm.org/D27455 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296387 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 24, 2017
-
-
Kevin Funk authored
Reviewers: silvas, rizsotto.mailinglist, sergio.martins Reviewed By: rizsotto.mailinglist Differential Revision: https://reviews.llvm.org/D30252 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296098 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 17, 2017
-
-
Ismail Donmez authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295433 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 16, 2017
-
-
Anastasia Stulova authored
Added description of a new feature that allows to specify vendor extension in flexible way using compiler pragma instead of modifying source code directly (committed in clang@r289979). Review: D29829 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295313 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 11, 2017
-
-
Saleem Abdulrasool authored
objc_storeStrong does not return a value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@294855 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 10, 2017
-
-
Hans Wennborg authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@294658 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 09, 2017
-
-
Amjad Aboud authored
Added "-fdebug-macro" flag (and "-fno-debug-macro" flag) to enable (and to disable) emitting macro debug info. Added CC1 "-debug-info-macro" flag that enables emitting macro debug info. Differential Revision: https://reviews.llvm.org/D16135 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@294637 91177308-0d34-0410-b5e6-96231b3b80d8
-
Vedant Kumar authored
Point out that --coverage and -ftest-coverage, which is what most people are used to, do not enable clang's frontend based coverage pass. Suggested by Benn Bolay! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@294626 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 08, 2017
-
-
Mike Aizatsky authored
Summary: Documentation update for https://reviews.llvm.org/D29662 Differential Revision: https://reviews.llvm.org/D29722 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@294522 91177308-0d34-0410-b5e6-96231b3b80d8
-