- Jan 09, 2019
-
-
Anastasia Stulova authored
Rather than duplicating data fields, use DeclSpec directly to store the qualifiers for the functions/methods. This change doesn't handle attributes yet and has to be extended further. Differential revision: https://reviews.llvm.org/D55948 llvm-svn: 350703
-
Craig Topper authored
[X86] Make the pointer arguments to avx512 gather/scatter intrinsics 'void*' to match gcc and Intel's documentation. The avx2 gather intrinsics are documented to use 'int', 'long long', 'float', or 'double' *. So I'm leaving those. This matches gcc. llvm-svn: 350696
-
Stephen Kelly authored
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55337 llvm-svn: 350677
-
- Jan 08, 2019
-
-
Dan Albert authored
Summary: The Android NDK still uses GNU binutils by default. Reviewers: srhines, pirama Reviewed By: srhines Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56456 llvm-svn: 350668
-
Stephen Kelly authored
Summary: This way, when the generic ASTTraverser is extracted from ASTDumper, there can't be any problem related to ordering of class members, a concern that was raised in https://reviews.llvm.org/D55337. This will also preserve the property that the generic traverser does not enforce any coupling between the NodeDumper and the TreeStructure. https://godbolt.org/z/PEtT1_ Reviewers: aaron.ballman, erichkeane Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56407 llvm-svn: 350665
-
Dan Albert authored
Reviewers: pirama, srhines Reviewed By: srhines Subscribers: kristina, cfe-commits Differential Revision: https://reviews.llvm.org/D55953 llvm-svn: 350664
-
Philip Pfaffe authored
llvm-svn: 350648
-
Erich Keane authored
As reported in PR33035, LLVM crashes if given a common object with an alignment of greater than 32 bits. This is because the COFF file format does not support these alignments, so emitting them is broken anyway. This patch changes any global definitions greater than 32 bit alignment to no longer be in 'common'. https://bugs.llvm.org/show_bug.cgi?id=33035 Differential Revision: https://reviews.llvm.org/D56391 Change-Id: I48609289753b7f3b58c5e2bc1712756750fbd45a llvm-svn: 350643
-
Alexander Kornienko authored
Summary: `buildASTFromCodeWithArgs()` was creating a memory buffer referencing a stack-allocated string. This diff changes the implementation to copy the code string into the memory buffer so that said buffer owns the memory. Patch by Yitzhak Mandelbaum. Reviewers: alexfh Reviewed By: alexfh Subscribers: cfe-commits, EricWF Differential Revision: https://reviews.llvm.org/D55765 llvm-svn: 350638
-
Paul Robinson authored
Finishes off the functional part of PR36168. Differential Revision: https://reviews.llvm.org/D56393 llvm-svn: 350636
-
Bruno Ricci authored
Use the newly available space in the bit-fields of Stmt. This saves one pointer per CXXScalarValueInitExpr. NFC. llvm-svn: 350635
-
Alexey Bataev authored
Prohibited use of the orphaned cancellation directives. llvm-svn: 350634
-
Bruno Ricci authored
Use the newly available space in the bit-fields of Stmt. This saves one pointer per CXXNoexceptExpr/SubstNonTypeTemplateParmExpr. Use this opportunity to run clang-format on these two classes and fix some style issues. NFC overall. llvm-svn: 350627
-
Bruno Ricci authored
Use the newly available space in the bit-fields of Stmt. Additionally store FirstQualifierFoundInScope as a trailing object since it is most of the time null (non-null for 2 of the 35446 CXXDependentScopeMemberExpr when parsing all of Boost). It would be possible to move the data for the nested-name-specifier to a trailing object too to save another 2 pointers, however doing so did actually regress the time taken to parse all of Boost slightly. This saves 8 bytes + 1 pointer per CXXDependentScopeMemberExpr in the vast majority of cases. Differential Revision: https://reviews.llvm.org/D56367 Reviewed By: rjmccall llvm-svn: 350625
-
Bruno Ricci authored
When the type of the base expression after IgnoreParenCasts is incomplete, it is still possible to diagnose an array access which precedes the array bounds. This is a follow-up on D55862 which added an early return when the type of the base expression after IgnoreParenCasts was incomplete. Differential Revision: https://reviews.llvm.org/D56050 Reviewed By: efriedma llvm-svn: 350622
-
Sam McCall authored
Summary: This assert catches places where the AST (as seen by RecursiveASTVisitor) becomes disconnected due to incomplete traversal. Making it print the actual parent-less node is a lot more helpful - it's possible to work out which part of the tree wasn't traversed. Reviewers: ilya-biryukov Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56395 llvm-svn: 350612
-
- Jan 07, 2019
-
-
Stephen Kelly authored
Summary: Nowhere else in the AST classes assert on these kinds of accessors. This way, we can call the accessors and check the validity of the result instead of externally duplicating the conditions. This generality will make it possible to introspect instances for source locations: http://ec2-18-191-7-3.us-east-2.compute.amazonaws.com:10240/z/iiaWhw Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56354 llvm-svn: 350573
-
Alexey Bataev authored
Each we create the target regions with the teams distribute inner region, we can better estimate number of the teams required to execute the target region. Function __kmpc_push_target_tripcount() is used for purpose, which accepts device_id and the number of the iterations, performed by the associated loop. llvm-svn: 350571
-
Craig Topper authored
The MSVC limit hit in AutoUpgrade.cpp has been worked around for now. llvm-svn: 350568
-
Craig Topper authored
Had to revert the LLVM patch this depends on to fix a MSVC compiler limit in AutoUpgrade.cpp llvm-svn: 350563
-
Craig Topper authored
Differential Revision: https://reviews.llvm.org/D56365 llvm-svn: 350555
-
Alexey Bataev authored
After the fix for the syncthreads we don't need to generate extra barriers for the parallel reductions. llvm-svn: 350530
-
Benjamin Kramer authored
llvm-svn: 350529
-
Rafael Stahl authored
Summary: The LocationE parameter of evalStore is documented as "The location expression that is stored to". When storing from an increment / decrement operator this was not satisfied. In user code this causes an inconsistency between the SVal and Stmt parameters of checkLocation. Reviewers: NoQ, dcoughlin, george.karpenkov Reviewed By: NoQ Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D55701 llvm-svn: 350528
-
Bruno Ricci authored
Store the optional array size expression, optional initialization expression and optional placement new arguments in a trailing array. Additionally store the range for the parenthesized type-id in a trailing object if needed since in the vast majority of cases the type is not parenthesized (not a single new expression in the translation unit of SemaDecl.cpp has a parenthesized type-id). This saves 2 pointers per CXXNewExpr in all cases, and 2 pointers + 8 bytes per CXXNewExpr in the common case where the type is not parenthesized. Differential Revision: https://reviews.llvm.org/D56134 Reviewed By: rjmccall llvm-svn: 350527
-
Bruno Ricci authored
Use the newly available space in the bit-fields of Stmt. This saves 1 pointer per DependentScopeDeclRefExpr/CXXUnresolvedConstructExpr. Additionally rename "TypeSourceInfo *Type;" to "TypeSourceInfo *TSI;" as was done in D56022 (r350003) (but this is an internal detail anyway), and clang-format both classes. NFC. llvm-svn: 350525
-
Hyrum Wright authored
Summary: Much like hasArg for various call expressions, this allows LibTooling users to match against a member of an initializer list. This is currently being used as part of the abseil-duration-scale clang-tidy check. Differential Revision: https://reviews.llvm.org/D56090 llvm-svn: 350523
-
Gabor Marton authored
Summary: In loadExternalAST we return with either an error or with a valid ASTUnit pointer which should not be a nullptr. This prevents in the call site any superfluous check for being a nullptr. Reviewers: xazax.hun, a_sidorin, Szelethus, balazske Subscribers: rnkovacs, dkrupp, gamesh411, cfe-commits Differential Revision: https://reviews.llvm.org/D55280 llvm-svn: 350521
-
Bruno Ricci authored
Use the newly available space in the bit-fields of Stmt. This saves 1 pointer per OpaqueValueExpr. NFC. llvm-svn: 350519
-
Martin Probst authored
Summary: It's a new primitive for importing symbols, and should be treated like the (previously handled) `goog.require` and `goog.forwardDeclare`. Reviewers: krasimir Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56385 llvm-svn: 350516
-
Richard Smith authored
template specialization if there is no matching non-template function. This exposed a couple of related bugs: - we would sometimes substitute into a friend template instead of a suitable non-friend declaration; this would now crash because we'd decide the specialization of the friend is a redeclaration of itself - ADL failed to properly handle the case where an invisible local extern declaration redeclares an invisible friend Both are fixed herein: in particular, we now never make invisible friends or local extern declarations visible to name lookup unless they are the only declaration of the entity. (We already mostly did this for local extern declarations.) llvm-svn: 350505
-
Brian Gesiak authored
Summary: The documentation for RecursiveASTVisitor::TraverseDecl states that the Decl being traversed may be null. In fact, this is the case when a CXXCatchStmt with no exception decl is traversed. Because the visitor for diagnosing unexpanded parameter packs does not check for null, it ends up crashing when it attempts to call the Decl::isParameterPack method on a null Decl pointer. Add a null check to prevent an ICE, and a test case that would crash otherwise. Also, because the test requires C++ exceptions and C++14, change the test parameters for the entire test file. (Alternatively, I thought about adding a new test file, but went with this approach for my own convenience.) Co-authored-by:
Andreas Molzer <andreas.molzer@gmx.de> Co-authored-by:
Mara Bos <m-ou.se@m-ou.se> Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56271 llvm-svn: 350501
-
- Jan 05, 2019
-
-
Saleem Abdulrasool authored
The autolinking extension for ELF uses a slightly different format for encoding the autolink information compared to COFF and MachO. Account for this in the CGM to ensure that we do not assert when emitting assembly or an object file. llvm-svn: 350476
-
Saleem Abdulrasool authored
Change a loop to range based instead while working on cleaning up some modules autolinking issues on Linux. NFC. llvm-svn: 350472
-
Nico Weber authored
llvm-svn: 350453
-
Nico Weber authored
Moves the code added in r350340 around a bit, to hopefully make the existing plugin tests pass when clang is built with examples enabled. llvm-svn: 350451
-
- Jan 04, 2019
-
-
Joel E. Denny authored
As discussed in D56113, this patch refactors the implementation of the const restriction for linear to reuse a function introduced by D56113. A side effect is that, if a variable has mutable members, this diagnostic is now skipped, and the diagnostic for the variable not being an integer or pointer is reported instead. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D56299 llvm-svn: 350441
-
Joel E. Denny authored
As discussed in D56113, this patch refactors the implementation of the const restriction for reductions to reuse a function introduced by D56113. A side effect is that diagnostics sometimes now say "variable" instead of "list item" when a list item is a variable. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D56298 llvm-svn: 350440
-
Joel E. Denny authored
The following appears in OpenMP 3.1 sec. 2.9.1.1 as a predetermined data-sharing attribute: > Variables with const-qualified type having no mutable member are > shared. It does not appear in OpenmP 4.0, 4.5, or 5.0. This patch removes the implementation of that attribute when the requested OpenMP version is greater than 3.1. One effect of that removal is that `default(none)` affects const variables without mutable members. Also, without this patch, if a const variable without mutable members was explicitly lastprivate or private, it was an error because it was predetermined shared. Now, clang instead complains that it's const without mutable fields, which is a more intelligible diagnostic. That should be fine for all of the above versions because they all have something like the following, which is quoted from OpenMP 5.0 sec. 2.19.3: > A variable that is privatized must not have a const-qualified type > unless it is of class type with a mutable member. This restriction does > not apply to the firstprivate clause. reduction and linear clauses already have separate checks for const variables. Future patches will merge the implementations. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D56113 llvm-svn: 350439
-
Peter Collingbourne authored
The problem is similar to D55986 but for threads: a process with the interceptor hwasan library loaded might have some threads started by instrumented libraries and some by uninstrumented libraries, and we need to be able to run instrumented code on the latter. The solution is to perform per-thread initialization lazily. If a function needs to access shadow memory or add itself to the per-thread ring buffer its prologue checks to see whether the value in the sanitizer TLS slot is null, and if so it calls __hwasan_thread_enter and reloads from the TLS slot. The runtime does the same thing if it needs to access this data structure. This change means that the code generator needs to know whether we are targeting the interceptor runtime, since we don't want to pay the cost of lazy initialization when targeting a platform with native hwasan support. A flag -fsanitize-hwaddress-abi={interceptor,platform} has been introduced for selecting the runtime ABI to target. The default ABI is set to interceptor since it's assumed that it will be more common that users will be compiling application code than platform code. Because we can no longer assume that the TLS slot is initialized, the pthread_create interceptor is no longer necessary, so it has been removed. Ideally, lazy initialization should only cost one instruction in the hot path, but at present the call may cause us to spill arguments to the stack, which means more instructions in the hot path (or theoretically in the cold path if the spills are moved with shrink wrapping). With an appropriately chosen calling convention for the per-thread initialization function (TODO) the hot path should always need just one instruction and the cold path should need two instructions with no spilling required. Differential Revision: https://reviews.llvm.org/D56038 llvm-svn: 350429
-