[PATCH] D104550: [analyzer] Implement getType for SVal

2021-06-21 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko updated this revision to Diff 353343. vsavchenko added a comment. Support GotoLabel Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104550/new/ https://reviews.llvm.org/D104550 Files:

[PATCH] D100118: [clang] Add support for new builtin __arithmetic_fence to control floating point optimization, and new clang option fprotect-parens

2021-06-21 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. Thanks, that's better. The clang front-end option is not directly relevant for the semantic of the intrinsic, so it would be better to explicitly specify it was not being fuseable unless the operand degenerates into a single operand. Otherwise the specification sounds

[PATCH] D104539: [Sema][SVE] Properly match builtin ID when using aux target

2021-06-21 Thread Bradley Smith via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG325b6707942d: [Sema][SVE] Properly match builtin ID when using aux target (authored by bsmith). Changed prior to commit:

[clang] 325b670 - [Sema][SVE] Properly match builtin ID when using aux target

2021-06-21 Thread Bradley Smith via cfe-commits
Author: Bradley Smith Date: 2021-06-21T12:52:18+01:00 New Revision: 325b6707942dc295a0d7fc9bc23a8242d7a3824f URL: https://github.com/llvm/llvm-project/commit/325b6707942dc295a0d7fc9bc23a8242d7a3824f DIFF: https://github.com/llvm/llvm-project/commit/325b6707942dc295a0d7fc9bc23a8242d7a3824f.diff

[PATCH] D93528: [clang-format] Add basic support for formatting JSON

2021-06-21 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. something @sammccall said about support `foo["name"]` made me realise that our javascript support doesn't always support what all the options x = { "firstName" : "John", "lastName" : "Smith", "isAlive" : true, "age" : 27, "address" : {

[PATCH] D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator

2021-06-21 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/test/Analysis/constant-folding.c:280-281 + if (c < 0 && c != INT_MIN && d < 0) { +clang_analyzer_eval((c + d) == -1); // expected-warning{{FALSE}} +clang_analyzer_eval((c + d) == 0); // expected-warning{{FALSE}} +

[PATCH] D103612: [flang][driver] Add `-funparse-typed-exprs-as-fortran`

2021-06-21 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. In D103612#2827468 , @klausler wrote: > Kind suffixes are described in subclause 7.4.3 of Fortran 2018, e.g. R708 on > p. 58. Many thanks for this reference. So when calling `Unparse,` one specifes

[PATCH] D104500: [clang] Apply P1825 as Defect Report from C++11 up to C++20.

2021-06-21 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 353320. mizvekov added a comment. remove unnecessary qualification. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104500/new/ https://reviews.llvm.org/D104500 Files:

[PATCH] D95588: [RISCV] Implement the MC layer support of P extension

2021-06-21 Thread Jim Lin via Phabricator via cfe-commits
Jim added a comment. ping? Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95588/new/ https://reviews.llvm.org/D95588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator

2021-06-21 Thread Manas Gupta via Phabricator via cfe-commits
manas added inline comments. Comment at: clang/test/Analysis/constant-folding.c:280-281 + if (c < 0 && c != INT_MIN && d < 0) { +clang_analyzer_eval((c + d) == -1); // expected-warning{{FALSE}} +clang_analyzer_eval((c + d) == 0); // expected-warning{{FALSE}} +

[PATCH] D104044: [clang-format] Fix the issue that empty lines being removed at the beginning of namespace

2021-06-21 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:280 + "}", + CustomStyle)); + EXPECT_EQ("/* something */ namespace N\n" I'm not sure I understand this.. why is this not ``` namespace N

[PATCH] D93528: [clang-format] Add basic support for formatting JSON

2021-06-21 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 353295. MyDeveloperDay added a comment. Add more unit tests and ensure clang-format-diff is setup to check json CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93528/new/ https://reviews.llvm.org/D93528 Files: clang/docs/ClangFormat.rst

[PATCH] D104616: [analyzer][WIP] Model comparision methods of std::unique_ptr

2021-06-21 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. In D104616#2829705 , @RedDocMD wrote: > The only method that I think can be realistically modelled is `==` (and thus > `!=`). If both the operands refer to the same `unique_ptr`, we know `==` > returns true. If they are not

[PATCH] D103314: [Analyzer][solver] Simplify existing constraints when a new constraint is added

2021-06-21 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. In D103314#2829806 , @uabelho wrote: > Hi, > > I'm seeing a failed assertion with this patch. > Reproduce with > > clang --analyze bbi-57338.c > > Result: > > clang:

[PATCH] D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator

2021-06-21 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1395 + + if (Min > Max) { +// This implies that an overflow has occured as either boundary would have I commented on this part previously, you shouldn't

[PATCH] D93528: [clang-format] Add basic support for formatting JSON

2021-06-21 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 353290. MyDeveloperDay added a comment. Ensure git clang-format can handle json CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93528/new/ https://reviews.llvm.org/D93528 Files: clang/docs/ClangFormat.rst

[PATCH] D103943: [X86] Add -mgeneral-regs-only support.

2021-06-21 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/include/clang/Driver/Options.td:3214 -def mgeneral_regs_only : Flag<["-"], "mgeneral-regs-only">, Group, - HelpText<"Generate code which only uses the general purpose registers (AArch64 only)">; +def mgeneral_regs_only :

[PATCH] D103314: [Analyzer][solver] Simplify existing constraints when a new constraint is added

2021-06-21 Thread Mikael Holmén via Phabricator via cfe-commits
uabelho added a comment. Hi, I'm seeing a failed assertion with this patch. Reproduce with clang --analyze bbi-57338.c Result: clang: /repo/uabelho/master-github/llvm/include/llvm/ADT/APSInt.h:148: bool llvm::APSInt::operator<(const llvm::APSInt &) const: Assertion `IsUnsigned ==

[PATCH] D104617: [clangd] Type hints for structured bindings

2021-06-21 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/InlayHints.cpp:40 +// types would be "tuple_element::type". +TypeHintPolicy.PrintCanonicalTypes = true; } While playing around with this, it did occur to me that in some cases it's

[PATCH] D104044: [clang-format] Fix the issue that empty lines being removed at the beginning of namespace

2021-06-21 Thread Darwin Xu via Phabricator via cfe-commits
darwin marked an inline comment as done. darwin added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:281 + CustomStyle)); + EXPECT_EQ("/* something */ namespace N\n" +"{\n" MyDeveloperDay wrote: > What does > >

[PATCH] D104619: [clang] [WIP] Fix for https://bugs.llvm.org/show_bug.cgi?id=50774

2021-06-21 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D104619 Files: clang/lib/AST/TypePrinter.cpp Index: clang/lib/AST/TypePrinter.cpp

[PATCH] D104616: [analyzer][WIP] Model comparision methods of std::unique_ptr

2021-06-21 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD added a comment. The only method that I think can be realistically modelled is `==` (and thus `!=`). If both the operands refer to the same `unique_ptr`, we know `==` returns true. If they are not the same, the only way `==` can return true if the two smart pointers were initialized

[PATCH] D104617: [clangd] Type hints for structured bindings

2021-06-21 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman. nridge requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Hints are shown for the

[PATCH] D104616: [analyzer][WIP] Model comparision methods of std::unique_ptr

2021-06-21 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD created this revision. RedDocMD added reviewers: NoQ, vsavchenko, xazax.hun, teemperor. Herald added subscribers: manas, steakhal, ASDenysPetrov, martong, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware. RedDocMD requested review of this

<    1   2