- 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
-
Alexander Shaposhnikov authored
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300114 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 12, 2017
-
-
Vassil Vassilev authored
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)! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300110 91177308-0d34-0410-b5e6-96231b3b80d8
-
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
-
Bruno Cardoso Lopes authored
Remove the restriction where this is only valid with C++ rdar://problem/29055656 Differential Revision: https://reviews.llvm.org/D31781 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300108 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Blaikie authored
Modular Codegen: Include testing for inline asm as well as some commentary on the implementaiton choice. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300106 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Blaikie authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300105 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Blaikie authored
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) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300104 91177308-0d34-0410-b5e6-96231b3b80d8
-
Hans Wennborg authored
It caused PR32640. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300074 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300071 91177308-0d34-0410-b5e6-96231b3b80d8
-
Sanjay Patel authored
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300068 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alex Lorenz authored
rdar://31576715 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300049 91177308-0d34-0410-b5e6-96231b3b80d8
-
Yaron Keren authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300043 91177308-0d34-0410-b5e6-96231b3b80d8
-
Yaron Keren authored
Remove Sema::addOverloadedOperatorToUnresolvedSet declaration. Its definition was removed in r206436. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300036 91177308-0d34-0410-b5e6-96231b3b80d8
-
Chandler Carruth authored
an actual iterator and so we need to look through it to the case handle). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300035 91177308-0d34-0410-b5e6-96231b3b80d8
-
Bruno Cardoso Lopes authored
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300027 91177308-0d34-0410-b5e6-96231b3b80d8
-
Duncan P. N. Exon Smith authored
r293123 started serializing diagnostic pragma state for modules. This makes the serialization work properly for implicit modules. An implicit module build (using Clang's internal build system) uses the same PCM file location for different `-Werror` levels. E.g., if a TU has `-Werror=format` and tries to load a PCM built without `-Werror=format`, a new PCM will be built in its place (and the new PCM should have the same signature, since r297655). In the other direction, if a TU does not have `-Werror=format` and tries to load a PCM built with `-Werror=format`, it should "just work". The idea is to evolve the PCM toward the strictest -Werror flags that anyone tries. r293123 started serializing the diagnostic pragma state for each PCM. Since this encodes the -Werror settings at module-build time, it breaks the implicit build model. This commit filters the diagnostic state in order to simulate the current compilation's diagnostic settings. Firstly, it ignores the module's serialized first diagnostic state, replacing it with the state from this compilation's command-line. Secondly, if a pragma warning was upgraded to error/fatal when generating the PCM (e.g., due to `-Werror` on the command-line), it checks whether it should still be upgraded in its current context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300025 91177308-0d34-0410-b5e6-96231b3b80d8
-
Duncan P. N. Exon Smith authored
Emit the final diagnostic state last to match source order. This also prepares for a follow-up commit for implicit modules. There's no real functionaliy change, just a slightly different AST file format. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300024 91177308-0d34-0410-b5e6-96231b3b80d8
-
Duncan P. N. Exon Smith authored
The record is never empty, since we always serialize the initial state. Skip the check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300021 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
Summary: For now, it just wraps AttributeSetNode*. Eventually, it will hold AvailableAttrs as an inline bitset, and adding and removing enum attributes will be super cheap. This sinks AttributeSetNode back down to lib/IR/AttributeImpl.h. Reviewers: pete, chandlerc Subscribers: llvm-commits, jfb Differential Revision: https://reviews.llvm.org/D31940 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300014 91177308-0d34-0410-b5e6-96231b3b80d8
-
Benjamin Kramer authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300006 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Trieu authored
r299989 fixes the underlying issue by waiting long enough to late parsed arguments to be processed before doing an calculating the hash. r298742 [ODRHash] Add error messages for mismatched parameters in methods. r298754 [ODRHash] Add support for array and decayed types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300001 91177308-0d34-0410-b5e6-96231b3b80d8
-
Akira Hatanaka authored
checking its storage class, when determining whether casting a C pointer to an ObjC pointer is allowed. This change allows casting variables whose declarations are directly contained in a linkage specification to an ObjC pointer type. Those variables are treated as if they contain the extern specifier for the purpose of determining whether they are definitions or not. rdar://problem/29249853 Differential Revision: https://reviews.llvm.org/D31673 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299992 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 11, 2017
-
-
Richard Trieu authored
Calculating the hash in Sema::ActOnTagFinishDefinition could happen before all sub-Decls were parsed or processed, which would produce the wrong hash value. Change to calculating the hash on the first use and storing the value instead. Also, avoid using the macros that were only for Boolean fields and use an explicit checker during the DefintionData merge. No functional change, but was this blocking other ODRHash patches. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299989 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Blaikie authored
Matching the function-homing support for modular codegen. Any type implicitly (implicit template specializations) or explicitly defined in a module is attached to that module's object file and omitted elsewhere (only a declaration used if necessary for references). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299987 91177308-0d34-0410-b5e6-96231b3b80d8
-
Sean Callanan authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299983 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Blaikie authored
Modular Codegen: Add/use a bit in serialized function definitions to track whether they are the subject of modular codegen Some decls are created not where they are written, but in other module files/users (implicit special members and function template implicit specializations). To correctly identify them, use a bit next to the definition to track the modular codegen property. Discussed whether the module file bit could be omitted in favor of reconstituting from the modular codegen decls list - best guess today is that the efficiency improvement of not having to deserialize the whole list whenever any function is queried by a module user is worth it for the small size increase of this redundant (list + bit-on-def) representation. Reviewers: rsmith Differential Revision: https://reviews.llvm.org/D29901 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299982 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299981 91177308-0d34-0410-b5e6-96231b3b80d8
-
Sean Callanan authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299977 91177308-0d34-0410-b5e6-96231b3b80d8
-
Sean Callanan authored
clang-import-test has until now been only able to report top-level Decls. This is clearly insufficient; we should be able to look inside structs and namespaces also. This patch adds new test cases for a variety of lookups inside existing ASTContexts, and adds the functionality necessar to make most of these testcases work. (One testcase is known to fail because of ASTImporter limitations when importing templates; I'll look into that separately.) This patch also separates the core functionality out into ExternalASTMerger, an interface that allows clients like LLDB to make use of it. clang-import-test now only has the machinery necessary to set up the tests. Differential revision: https://reviews.llvm.org/D30435 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299976 91177308-0d34-0410-b5e6-96231b3b80d8
-
Yaxun Liu authored
For OpenCL, the private address space qualifier is 0 in AST. Before this change, 0 address space qualifier is always mapped to target address space 0. As now target private address space is specified by alloca address space in data layout, address space qualifier 0 needs to be mapped to alloca addr space specified by the data layout. This change has no impact on targets whose alloca addr space is 0. With contributions from Matt Arsenault, Tony Tye and Wen-Heng (Jack) Chung Differential Revision: https://reviews.llvm.org/D31404 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299965 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alex Lorenz authored
rdar://31501863 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299962 91177308-0d34-0410-b5e6-96231b3b80d8
-
Vassil Vassilev authored
We need to address cases (breaking libc++) such as template <class _Up> static int __test(...); template<typename _Tp> auto v = __test<_Tp>(0); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299956 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nico Weber authored
At present, clang-format mangles Java containing logical right shift operators ('>>>=' or '>>>'), splitting them in two, resulting in invalid code: public class Minimal { public void func(String args) { int i = 42; - i >>>= 1; + i >> >= 1; return i; } } This adds both forms of logical right shift to the FormatTokenLexer, so clang-format won't attempt to split them and insert bogus whitespace. https://reviews.llvm.org/D31652 Patch from Richard Bradfield <bradfier@fstab.me>! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299952 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alex Lorenz authored
Differential Revision: https://reviews.llvm.org/D25321 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299951 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alex Lorenz authored
as identifiers in Objective-C++ This commit improves the 'expected identifier' errors that are presented when a C++ keyword is used as an identifier in Objective-C++ by mentioning that this is a C++ keyword in the diagnostic message. It also improves the error recovery: the parser will now treat the C++ keywords as identifiers to prevent unrelated parsing errors. rdar://20626062 Differential Revision: https://reviews.llvm.org/D26503 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299950 91177308-0d34-0410-b5e6-96231b3b80d8
-
Vassil Vassilev authored
Reviewed by Richard Smith (D29877)! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299930 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexander Kornienko authored
Summary: This fixes a few outstanding bugs: * incorrect breaking of NSString literals containing double-width characters; * inconsistent formatting of ObjC dictionary literals containing NSString literals; * AlwaysBreakBeforeMultilineStrings ignoring implicitly-concatenated NSString literals. Reviewers: djasper Reviewed By: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D31706 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299927 91177308-0d34-0410-b5e6-96231b3b80d8
-
Maxim Ostapenko authored
This is a compiler part of https://reviews.llvm.org/D29586. Enable LSan on arm Linux. Differential Revision: https://reviews.llvm.org/D31760 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299921 91177308-0d34-0410-b5e6-96231b3b80d8
-
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
-