- Dec 22, 2019
-
-
Bruno Ricci authored
The current handling of the operators ||, && and ?: has a number of false positive and false negative. The issues for operator || and && are: 1. We need to add sequencing regions for the LHS and RHS as is done for the comma operator. Not doing so causes false positives in expressions like `((a++, false) || (a++, false))` (from PR39779, see PR22197 for another example). 2. In the current implementation when the evaluation of the LHS fails, the RHS is added to a worklist to be processed later. This results in false negatives in expressions like `(a && a++) + a`. Fix these issues by introducing sequencing regions for the LHS and RHS, and by not deferring the visitation of the RHS. The issues with the ternary operator ?: are similar, with the added twist that we should not warn on expressions like `(x ? y += 1 : y += 2)` since exactly one of the 2nd and 3rd expression is going to be evaluated, but we should still warn on expressions like `(x ? y += 1 : y += 2) = y`. Differential Revision: https://reviews.llvm.org/D57747 Reviewed By: rsmith -
Bruno Ricci authored
NFCs factored out of the following patches: - Change all of the `Expr *` to `const Expr *` in SequenceChecker for const-correctness. SequenceChecker should not modify AST nodes. - Add some comments. - clang-format Differential Revision: https://reviews.llvm.org/D57659 Reviewed By: xbolva00
-
Saar Raz authored
Added support for constraint satisfaction checking and partial ordering of constraints in constrained partial specialization and function template overloads. Re-commit after fixing some crashes and warnings. Differential Revision: https://reviews.llvm.org/D41910
-
Martin Storsjö authored
Previously, SWIG was only a hard dependency if python bindings were enabled. Since bf03e17c, scripts/CMakeLists.txt is included unconditionally, while that file adds the hard dependency on SWIG. Instead, only include that file if either python or lua bindings are enabled.
-
Fangrui Song authored
gcc/config/{i386,s390} support -mnop-mcount. We currently only support -mnop-mcount for SystemZ. The function attribute "mnop-mcount" is ignored on other targets. gcc/config/{i386,s390} support -mfentry. We currently only support -mfentry for X86 and SystemZ. TargetOpcode::FENTRY_CALL is not handled on other targets. % clang -target aarch64 -pg -mfentry a.c -c fatal error: error in backend: Not supported instr: <MCInst 21> -mfentry, -mrecord-mcount, and -mnop-mcount were invented for Linux ftrace. Linux uses $(call cc-option-yn,-mrecord-mcount) to detect if the specific feature is available. Reject unsupported features so that Linux build system will not wrongly consider them available and cause build/runtime failures. Note, GCC has stricter checks that we do not implement, e.g. -fpic/-fpie -fnop-mcount is not allowed on x86, -fpic/-fpie -mfentry is not allowed on x86-32. -
David Blaikie authored
-
Fangrui Song authored
GCC's x86 and s390 ports support -mrecord-mcount. Other ports reject the option. aarch64-linux-gnu-gcc: error: unrecognized command line option ‘-mrecord-mcount’ Allowing this option can cause failures when building Linux kernel for aarch64, powerpc64, etc, which will think the feature is available if the clang command returns 0.
-
Jonas Devlieghere authored
Fix the nonsensical error messages for when breakpoint and watchpoint callbacks are not supported.
-
Jonas Devlieghere authored
This ensures that watchpoint command honors the scripting language passed with `-s`. Currently the argument ignores the actual language and only uses it to differentiate between lldb and script commands.
-
Jonas Devlieghere authored
- Fix enum entry order. - Fix missing enum case in CommandObjectBreakpointCommand. - Add Lua entry to swtich in LanguageToString and simplify the code.
-
LLVM GN Syncbot authored
-
Nico Weber authored
-
Jonas Devlieghere authored
When a function is used as a breakpoint command, use to the debugger's default scripting language, unless a language is explicitly specified.
-
Nico Weber authored
This now defines HAVE_VCS_VERSION_INC for all files in Basic, but now the BUILD.gn file has only a single "sources" field again, and the automerger requires that. Having the automerger work for clang/lib/Basic is a very nice to have, and the downside seems tiny.
-
Yaxun (Sam) Liu authored
getLastArgIntValue is a useful utility function to get command line argument as an integer. Currently it is in Frontend so that it can only be used by clang -cc1. Move it to basic so that it can also be used by clang driver. Differential Revision: https://reviews.llvm.org/D71080
-
Jonas Devlieghere authored
This ensures that breakpoint command honors the scripting language passed with `-s`. Currently the argument ignores the actual language and only uses it to differentiate between lldb and script commands.
-
Jonas Devlieghere authored
Fixes a bogus enum value for the scripting language options, adds an entry for Lua and refactored the code to use an exhaustive switch.
-
Jonas Devlieghere authored
Rather than holding on to one script interpreter, it should be possible to request a script interpreter for a specific scripting language. The GetScriptInterpreter method now takes an optional scripting language argument. (NFC)
-
Jonas Devlieghere authored
Don't create a new lua state on every operation. Share a single state across the lifetime of the script interpreter. Add simple locking to prevent two threads from modifying the state concurrently.
-
Raphael Isemann authored
-
Raphael Isemann authored
ClangASTContext::getASTContext() currently returns a ptr but we have an assert there since a while that the ASTContext is not a nullptr. This causes that we still have a lot of code that is doing nullptr checks on the result of getASTContext() which is all unreachable code. This patch changes the return value to a reference to make it clear this can't be a nullptr and deletes all the nullptr checks.
-
Jonas Devlieghere authored
This patch uses SWIG to generate the Lua bindings for the SB API. It covers most of the API, but some methods require a type map similar to Python. Discussion on the mailing list: http://lists.llvm.org/pipermail/lldb-dev/2019-December/015812.html Differential revision: https://reviews.llvm.org/D71235
-
Artem Dergachev authored
Makes sure that the script works fine both in python2 and python3. Patch by Pavel Samolysov! Differential Revision: https://reviews.llvm.org/D71746
-
Stepan Dyatkovskiy authored
-
Stepan Dyatkovskiy authored
-
John Baldwin authored
Summary: If none of the input files are ELF object files (for example, when generating an object file from a single binary input file via "-b binary"), use a fallback value for the ELF header flags instead of crashing with an assertion failure. Reviewers: MaskRay, ruiu, espindola Reviewed By: MaskRay, ruiu Subscribers: kevans, grimar, emaste, arichardson, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, lenary, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits, jrtc27 Tags: #llvm Differential Revision: https://reviews.llvm.org/D71101
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Michael Liao authored
-
- Dec 21, 2019
-
-
Sanjay Patel authored
We missed a constraint in D44833 when folding a bitcast into a GEP with vector/array types. If the alloc sizes specified by the datalayout don't match, this could miscompile as shown in: https://bugs.llvm.org/show_bug.cgi?id=44321 Differential Revision: https://reviews.llvm.org/D71771
-
Sanjay Patel authored
As discussed in PR44330: https://bugs.llvm.org/show_bug.cgi?id=44330 ...the transform from pow(X, -0.5) libcall/intrinsic to reciprocal square root can result in small deviations from the expected result due to differences in the pow() implementation and/or the extra rounding step from the division. This patch proposes to allow that difference with either the 'approximate functions' or 'reassociate' FMF: http://llvm.org/docs/LangRef.html#fast-math-flags In practice, this likely means that the code is compiled with all of 'fast' (-ffast-math), but I have preserved the existing specializations for -0.0/-INF that enable generating safe code if those special values are allowed simultaneously with allowing approximation/reassociation. The question about whether a similar restriction is needed for the non-reciprocal case -- pow(X, 0.5) -- is deferred. That transform is allowed without FMF currently, and this patch does not change that behavior. Differential Revision: https://reviews.llvm.org/D71706
-
Raphael Isemann authored
Their naming is misleading as they only return the ClangASTContext-owned variables. For ClangASTContext instances constructed for a given clang::ASTContext they silently generated duplicated instances (e.g., a second IdentifierTable) that were essentially unusable. This removes all these getters as they are anyway not very useful in comparison to just calling the clang::ASTContext getters. The initialization code has been moved to the CreateASTContext initialization method so that all code for making our own clang::ASTContext is in one place.
-
Florian Hahn authored
We cannot pick reserved registers as rename registers. Fixes https://bugs.llvm.org/show_bug.cgi?id=44358
-
Mark de Wever authored
This avoids unneeded copies when using a range-based for loops. This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D70869
-
Mark de Wever authored
Differential revision: https://reviews.llvm.org/D69223
-
Pavel Labath authored
I'm unable to get this test working there.
-
Pavel Labath authored
-
David Zarzycki authored
After d567b0ba, the test suite no longer passes if hexagon is disabled.
-
Pavel Labath authored
It does not seem to run automatically on windows.
-
Stephen Kelly authored
Reviewers: aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71680
-