- Aug 27, 2019
-
-
David Bolvansky authored
llvm-svn: 370046
-
Gabor Marton authored
There are numorous flaws about the name conflict handling, this patch attempts fixes them. Changes in details: * HandleNameConflict return with a false DeclarationName Hitherto we effectively never returned with a NameConflict error, even if the preceding StructuralMatch indicated a conflict. Because we just simply returned with the parameter `Name` in HandleNameConflict and that name is almost always `true` when converted to `bool`. * Add tests which indicate wrong NameConflict handling * Add to ConflictingDecls only if decl kind is different Note, we might not indicate an ODR error when there is an existing record decl and a enum is imported with same name. But there are other cases. E.g. think about the case when we import a FunctionTemplateDecl with name f and we found a simple FunctionDecl with name f. They overload. Or in case of a ClassTemplateDecl and CXXRecordDecl, the CXXRecordDecl could be the 'templated' class, so it would be false to report error. So I think we should report a name conflict error only when we are 100% sure of that. That is why I think it should be a general pattern to report the error only if the kind is the same. * Fix failing ctu test with EnumConstandDecl In ctu-main.c we have the enum class 'A' which brings in the enum constant 'x' with value 0 into the global namespace. In ctu-other.c we had the enum class 'B' which brought in the same name ('x') as an enum constant but with a different enum value (42). This is clearly an ODR violation in the global namespace. The solution was to rename the second enum constant. * Introduce ODR handling strategies Reviewers: a_sidorin, shafik Differential Revision: https://reviews.llvm.org/D59692 llvm-svn: 370045
-
Bruno Ricci authored
Since statements, expressions and types are allocated with the BumpPtrAllocator from ASTContext their destructor is not executed. Two classes are currently exempted from the check : InitListExpr due to its ASTVector and ConstantArrayType due to its APInt. No functional changes. Differential Revision: https://reviews.llvm.org/D66646 Reviewed By: lebedev.ri, gribozavr llvm-svn: 370044
-
Raphael Isemann authored
On the command line we usually insert a space after a completion to indicate that the completion was successful. After the completion API refactoring, this also happens with directories which essentially breaks file path completion (as adding a space terminates the path and starts a new arg). This patch restores the old behavior by again allowing partial completions. Also extends the iohandler and SB API tests as the implementation for this is different in Editline and SB API. llvm-svn: 370043
-
Pavel Labath authored
Summary: This is motivated by D63591, where we realized that there isn't a really good way of telling whether a DataExtractor is reading actual data, or is it just returning default values because it reached the end of the buffer. This patch resolves that by providing a new "Cursor" class. A Cursor object encapsulates two things: - the current position/offset in the DataExtractor - an error object Storing the error object inside the Cursor enables one to use the same pattern as the std::{io}stream API, where one can blindly perform a sequence of reads and only check for errors once at the end of the operation. Similarly to the stream API, as soon as we encounter one error, all of the subsequent operations are skipped (return default values) too, even if the would suceed with clear error state. Unlike the std::stream API (but in line with other llvm APIs), we force the error state to be checked through usage of llvm::Error. Reviewers: probinson, dblaikie, JDevlieghere, aprantl, echristo Subscribers: kristina, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63713 llvm-svn: 370042
-
Bruno Ricci authored
As in D66646, these classes are also allocated with a BumpPtrAllocator, and therefore should be trivially destructible. Differential Revision: https://reviews.llvm.org/D66722 Reviewed By: Mordante, gribozavr llvm-svn: 370041
-
Amaury Sechet authored
Summary: As per title. Reviewers: craig.topper, efriedma, RKSimon, lebedev.ri Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66702 llvm-svn: 370040
-
Dmitri Gribenko authored
Summary: I think it makes method implementations more obvious. Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66788 llvm-svn: 370039
-
David Bolvansky authored
Summary: Handle pattern [0]: int ctz(unsigned int a) { int c = __clz(a & -a); return a ? 31 - c : c; } In reality, the compiler can generate much better code for cttz, so fold away this pattern. https://godbolt.org/z/c5kPtV [0] https://community.arm.com/community-help/f/discussions/2114/count-trailing-zeros Reviewers: spatel, nikic, lebedev.ri, dmgreen, hfinkel Reviewed By: hfinkel Subscribers: hfinkel, javed.absar, kristof.beyls, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66308 llvm-svn: 370037
-
Tim Northover authored
Inserting a value into Visited has the effect of terminating a search for predecessors if that node is seen. This is legitimate for the base address, and acts as a slight performance optimization, but the vector-building node can be paert of a legitimate cycle so we shouldn't stop searching there. PR43056. llvm-svn: 370036
-
David Carlier authored
Reviewers: sylvestre.ledru, kcc Reviewed By: sylvestre.ledru Differential Revision: https://reviews.llvm.org/D66792 llvm-svn: 370035
-
George Rimar authored
There is a problem with reportError we have. Declaration says we have ArchiveName that follows the FileName: reportError(Error E, StringRef FileName, StringRef ArchiveName,... Though implementation have them reversed. I cleaned it up and removed an excessive reportError(Error E, StringRef File) version. Rebased on top of D66418. Differential revision: https://reviews.llvm.org/D66517 llvm-svn: 370034
-
Ilya Biryukov authored
Summary: Previously, it would always return nullptr on any error. This change adds a parameter, controlling whether the function should attempt to return a non-null result even if unknown arguments (or other errors were encountered). The new behavior is only used in clangd. Considered an alternative of changing the return value instead of adding a new parameter, but that would require updating all callsites. Settled with the parameter to minimize the code changes. Reviewers: gribozavr Reviewed By: gribozavr Subscribers: nridge, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66731 llvm-svn: 370033
-
George Rimar authored
This is a follow up discussed in the comments of D66583. Currently, if for example, we have both StOther and Other set in YAML document for a symbol, then yaml2obj reports an "unknown key 'Other'" error. It happens because 'mapOptional()' is never called for 'Other/Visibility' in this case, leaving those unhandled. This message does not describe the reason of the error well. This patch fixes it. Differential revision: https://reviews.llvm.org/D66642 llvm-svn: 370032
-
Sam McCall authored
llvm-svn: 370030
-
Sam McCall authored
Summary: https://github.com/clangd/clangd/issues/129 Reviewers: SureYeaah Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66590 llvm-svn: 370029
-
Dmitri Gribenko authored
Summary: The last glob that matches the string decides whether that string is included or excluded. Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66787 llvm-svn: 370028
-
Pavel Labath authored
Summary: The DWARFExpression methods have a lot of arguments. This removes two of them by removing the ability to slice the expression via two offset+size parameters. This is a functionality that it is not always needed, and when it is, we already have a different handy way of slicing a data extractor which we can use instead. Reviewers: JDevlieghere, clayborg Subscribers: aprantl, lldb-commits Differential Revision: https://reviews.llvm.org/D66745 llvm-svn: 370027
-
Pavel Labath authored
llvm-svn: 370026
-
Alexander Richardson authored
I D65322 I added a check for BrokenPipeError. However, python 2.7 doesn't have BrokenPipeError. To be python 2.7 and 3 compatible we need to catch IOError instead and check for errno == errno.EPIPE. llvm-svn: 370025
-
Vitaly Buka authored
llvm-svn: 370023
-
Sam McCall authored
This reverts commit 51029e5c. llvm-svn: 370022
-
Alexander Richardson authored
It is possible that addr2line returns a valid function and file name for the passed address on some build configuations. The test is only checking that asan_symbolize doesn't assert any more when passed a valid file with an invalid address so there is no need to check that it can't find a valid function name. This should fix http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux llvm-svn: 370021
-
Pavel Labath authored
missing decorator import. llvm-svn: 370020
-
Pavel Labath authored
llvm-svn: 370019
-
Craig Topper authored
ConstantDataVector is a specialized verison of ConstantVector that stores data in a packed array of bits instead of as individual pointers to other Constants. But we really shouldn't expose that if we can void it. And we should handle regular ConstantVector equally well. This removes a dyn_cast to ConstantDataVector and just calls getSplatValue directly on a Constant* if the type is a vector. llvm-svn: 370018
-
Craig Topper authored
llvm-svn: 370017
-
Hideto Ueno authored
This commit was part of D65402. llvm-svn: 370016
-
Hideto Ueno authored
Summary: Similar to `^=` operator for IntegerState, this patch introduces a `+=` operator to "clamp" known information. Reviewers: jdoerfert, sstefan1 Reviewed By: jdoerfert Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66635 llvm-svn: 370015
-
Johannes Doerfert authored
Summary: During the fixpoint iteration, including the manifest stage, we should not delete stuff as other abstract attributes might have a reference to the value. Through the API this can now be done safely at the very end. Reviewers: uenoku, sstefan1 Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66779 llvm-svn: 370014
-
Philip Reames authored
The current approach is restrictive (as all of geps must be multiples of the alignment), but correct. llvm-svn: 370013
-
Sam Clegg authored
Handling of --export/--undefined can pull in lazy symbols which in turn can pull in referenced to optional symbols. We need to delay the creation of optional symbols until all possible references to them have been created. Differential Revision: https://reviews.llvm.org/D66768 llvm-svn: 370012
-
David Carlier authored
llvm-svn: 370011
-
Sam Clegg authored
I've got another change that makes more use of this value in other places. Differential Revision: https://reviews.llvm.org/D66777 llvm-svn: 370010
-
David Carlier authored
- Unless explicit configuration, using FreeBSD super pages feature for shadow mapping. - asan only for now. Reviewers: dim, emaste, vitalybuka Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D65851 llvm-svn: 370008
-
Vitaly Buka authored
llvm-svn: 370007
-
Richard Trieu authored
This change causes instrumented builds of Clang to have a fatal error in the backend. https://reviews.llvm.org/D66537 has the details. llvm-svn: 370006
-
Pengfei Wang authored
Summary: This is an alternate approach to D63396 Currently funclets reuse the same stack slots that are used in the parent function for saving callee-saved xmm registers. If the parent function modifies a callee-saved xmm register before an excpetion is thrown, the catch handler will overwrite the original saved value. This patch allocates space in funclets stack for saving callee-saved xmm registers and uses RSP instead RBP to access memory. Signed-off-by:
Pengfei Wang <pengfei.wang@intel.com> Reviewers: rnk, RKSimon, craig.topper, annita.zhang, LuoYuanke, andrew.w.kaylor Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66596 Signed-off-by:
Pengfei Wang <pengfei.wang@intel.com> llvm-svn: 370005
-
Alex Lorenz authored
llvm-svn: 370004
-
Jonas Devlieghere authored
This disables two tests on Windows that I re-enabled in r369995. llvm-svn: 370003
-