[PATCH] D81745: [analyzer][MallocChecker] PR46253: Correctly recognize standard realloc

2020-06-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Thanks! Yeah, that's a lot of annoying code to write that doesn't need to be imperative at all. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1074-1075 + //

[PATCH] D69825: [Clang][Driver] Re-use the calling process instead of creating a new process for the cc1 invocation

2020-06-13 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a subscriber: asbirlea. dim added a comment. Okay, after a long while of attempting to make a reproduction scenario, I finally managed one that consistently worked. As BSD make puts in different redirections for stderr when running in `-j` mode, it turned out that I could simply run

[PATCH] D81315: [analyzer] Warning for default constructed unique pointer dereferences

2020-06-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Hey, that's a lot of progress already! =) Comment at: clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp:124 +return; + updateTrackedRegion(Call, C, ThisValRegion); +} Not all constructors behave this way. In particular, if it's a

[libunwind] 0c1a135 - [libunwind][RISCV] Track PC separately from RA

2020-06-13 Thread Amanieu d'Antras via cfe-commits
Author: Amanieu d'Antras Date: 2020-06-13T08:15:40+01:00 New Revision: 0c1a135adae530b88f68c9425fb85bd8fb9152ca URL: https://github.com/llvm/llvm-project/commit/0c1a135adae530b88f68c9425fb85bd8fb9152ca DIFF:

[PATCH] D15528: Teach clang-tidy how to -Werror checks.

2020-06-13 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Herald added a subscriber: arphaman. Comment at: clang-tidy/tool/ClangTidyMain.cpp:362 + << Plural << "\n"; +return WErrorCount; + } Was there any specific reason for returning the error count instead of

[PATCH] D71512: [clang-format] Fix short block when braking after control statement

2020-06-13 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0487f6f19cda: [clang-format] Fix short block when braking after control statement (authored by MyDeveloperDay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D81786: [clang][utils] Modify make-ast-dump-check.sh to generate AST serialization dump tests

2020-06-13 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. In D81786#2091387 , @lebedev.ri wrote: > +1, thank you for looking into this! > I suspect there's a few issues to be discovered with this :) Indeed; I already got one in D81787 .

Re: [PATCH] D15528: Teach clang-tidy how to -Werror checks.

2020-06-13 Thread Jon Roelofs via cfe-commits
Oh, yeah, that should probably be clamped. I didn’t have a specific use case in mind, but in general I find that tools that emit “richer” information can be used for more things, hence returning the count, and not some fixed value. On Sat, Jun 13, 2020 at 12:58 AM Nathan James via Phabricator <

[PATCH] D81787: [clang] Fix the serialization of LambdaExpr and the bogus mutation in LambdaExpr::getBody

2020-06-13 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added reviewers: jyknight, GorNishanov, aaron.ballman. riccibruno added a project: clang. Herald added subscribers: cfe-commits, modocache. The body of `LambdaExpr` is currently not properly serialized. Instead `LambdaExpr::getBody` checks if the body

[PATCH] D81786: [clang][utils] Modify make-ast-dump-check.sh to generate AST serialization dump tests

2020-06-13 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. +1, thank you for looking into this! I suspect there's a few issues to be discovered with this :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81786/new/ https://reviews.llvm.org/D81786

[clang] 6a79f5a - [clang][NFC] Add an AST dump test for LambdaExpr

2020-06-13 Thread Bruno Ricci via cfe-commits
Author: Bruno Ricci Date: 2020-06-13T14:03:25+01:00 New Revision: 6a79f5aa5dbc2528444b4dfb92bb68039c5a32e9 URL: https://github.com/llvm/llvm-project/commit/6a79f5aa5dbc2528444b4dfb92bb68039c5a32e9 DIFF: https://github.com/llvm/llvm-project/commit/6a79f5aa5dbc2528444b4dfb92bb68039c5a32e9.diff

[clang] eb614db - [clang][NFC] Mark CWG 974 and 1814 (default argument in a...

2020-06-13 Thread Bruno Ricci via cfe-commits
Author: Bruno Ricci Date: 2020-06-13T13:49:07+01:00 New Revision: eb614db0a0b41734ef52c2cdd87461f0ca62a900 URL: https://github.com/llvm/llvm-project/commit/eb614db0a0b41734ef52c2cdd87461f0ca62a900 DIFF: https://github.com/llvm/llvm-project/commit/eb614db0a0b41734ef52c2cdd87461f0ca62a900.diff

[clang] f13d704 - [clang][NFC] Mark CWG 1443 (Default arguments and non-static data members)...

2020-06-13 Thread Bruno Ricci via cfe-commits
Author: Bruno Ricci Date: 2020-06-13T13:59:54+01:00 New Revision: f13d704a5014fa28d56240a6da7d1aa0b1c01f4d URL: https://github.com/llvm/llvm-project/commit/f13d704a5014fa28d56240a6da7d1aa0b1c01f4d DIFF: https://github.com/llvm/llvm-project/commit/f13d704a5014fa28d56240a6da7d1aa0b1c01f4d.diff

[clang] c669a1e - [clang][NFC] Pack LambdaExpr

2020-06-13 Thread Bruno Ricci via cfe-commits
Author: Bruno Ricci Date: 2020-06-13T14:31:13+01:00 New Revision: c669a1ed6386d57a75a602b53266466dae1e1d84 URL: https://github.com/llvm/llvm-project/commit/c669a1ed6386d57a75a602b53266466dae1e1d84 DIFF: https://github.com/llvm/llvm-project/commit/c669a1ed6386d57a75a602b53266466dae1e1d84.diff

[PATCH] D80514: [clang-tidy] modernize-use-trailing-return-type support for C++20 concepts and decltype

2020-06-13 Thread Bernhard Manfred Gruber via Phabricator via cfe-commits
bernhardmgruber added a comment. Ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80514/new/ https://reviews.llvm.org/D80514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D81786: [clang][utils] Modify make-ast-dump-check.sh to generate AST serialization dump tests

2020-06-13 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. Example of a test: F12153075: ast-dump-lambda.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81786/new/ https://reviews.llvm.org/D81786

[PATCH] D81786: [clang][utils] Modify make-ast-dump-check.sh to generate AST serialization dump tests

2020-06-13 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added reviewers: aaron.ballman, stephenkelly. riccibruno added a project: clang. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. riccibruno added a comment. Example of a test: F12153075: ast-dump-lambda.cpp

[clang] 0487f6f - [clang-format] Fix short block when braking after control statement

2020-06-13 Thread via cfe-commits
Author: mydeveloperday Date: 2020-06-13T14:19:49+01:00 New Revision: 0487f6f19cdaaec81a5e2d6dfce7fd0cd3a9b6ca URL: https://github.com/llvm/llvm-project/commit/0487f6f19cdaaec81a5e2d6dfce7fd0cd3a9b6ca DIFF:

[PATCH] D81785: [clangd] Fix readability-else-after-return 'Adding a note without main diagnostic' crash

2020-06-13 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: sammccall, hokein. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. njames93 added a comment. The actual fix in `ElseAfterReturnCheck.cpp` is needed.

[PATCH] D81785: [clangd] Fix readability-else-after-return 'Adding a note without main diagnostic' crash

2020-06-13 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. The actual fix in `ElseAfterReturnCheck.cpp` is needed. However clangd's handling of Remarks is a little suspicious. Remarks are supposed to be different to notes in the sense they are designed to be stand alone, unlike notes which depend on a another diagnostic. see

[PATCH] D81678: Introduce partialinit attribute at call sites for stricter poison analysis

2020-06-13 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added a comment. Positive attribute sounds good to me (frozen is not a bad name), but the tests update change is going to be huge. Any concerns about IR size bloat? The attribute will apply to the majority of function arguments, 8 bytes per instance as far as I can see. Good point

[PATCH] D81678: Introduce partialinit attribute at call sites for stricter poison analysis

2020-06-13 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. In D81678#2089041 , @aqjune wrote: > > @efriedma > > The way that call argument coercion works is unsound in the presence of > > poison. An integer can't be partially poisoned: it's either poison, or not > > poison. We

[PATCH] D81422: Change filecheck default to dump input on failure

2020-06-13 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In D81422#2090425 , @mehdi_amini wrote: > I'm thinking about a possible improvement here: we could have FileCheck dump > the input for the current CHECK-LABEL section only: it seems like it could > reduce the output drastically

[PATCH] D81422: Change filecheck default to dump input on failure

2020-06-13 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. I'm thinking about a possible improvement here: we could have FileCheck dump the input for the current CHECK-LABEL section only: it seems like it could reduce the output drastically while still preserving how useful the information is? Repository: rG LLVM

[PATCH] D81422: Change filecheck default to dump input on failure

2020-06-13 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In D81422#2090725 , @mehdi_amini wrote: > In D81422#2090618 , @jdenny wrote: > > > In D81422#2090425 , @mehdi_amini > > wrote: > > > > > I'm

[PATCH] D81422: Change filecheck default to dump input on failure

2020-06-13 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In D81422#2090618 , @jdenny wrote: > In D81422#2090425 , @mehdi_amini > wrote: > > > I'm thinking about a possible improvement here: we could have FileCheck > > dump the input for the

[PATCH] D81422: Change filecheck default to dump input on failure

2020-06-13 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D81422#2090425 , @mehdi_amini wrote: > I'm thinking about a possible improvement here: we could have FileCheck dump > the input for the current CHECK-LABEL section only: it seems like it could > reduce the output drastically

[PATCH] D81736: [openmp] Base of tablegen generated OpenMP common declaration

2020-06-13 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added reviewers: fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp. jdoerfert added a comment. This is really cool :) In D81736#2090419 , @clementval wrote: > @jdoerfert Some tests in clang relies on the position of the

[PATCH] D81794: [clang] Don't emit warn_cxx_ms_struct when MSBitfields is enabled globally

2020-06-13 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: rjmccall, rnk. Herald added a project: clang. Herald added a subscriber: cfe-commits. This diagnostic (which defaults to an error, added in 95833f33bda6c92e746e0b0007b69c2c30bfc693) was (as far as I can see) intended to clearly point out

[PATCH] D81795: [clang] Enable -mms-bitfields by default for mingw targets

2020-06-13 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: rjmccall, rnk. Herald added a project: clang. Herald added a subscriber: cfe-commits. This matches GCC, which enabled -mms-bitfields by default for mingw targets in 4.7 [1]. [1] https://www.gnu.org/software/gcc/gcc-4.7/changes.html

[PATCH] D81794: [clang] Don't emit warn_cxx_ms_struct when MSBitfields is enabled globally

2020-06-13 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 270587. mstorsjo added a comment. Fixed the formatting CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81794/new/ https://reviews.llvm.org/D81794 Files: clang/lib/Sema/SemaDeclCXX.cpp clang/test/SemaCXX/ms_struct.cpp Index:

[PATCH] D74166: [AIX][Frontend] Static init implementation for AIX considering no priority

2020-06-13 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:4482 + llvm::Value *NeedsDestruct = + CGF.Builder.CreateIsNull(V, "needsDestruct"); + There are uses of `CreateIsNull` with `snake_case`; this is the only

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-06-13 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D69764#2063798 , @MyDeveloperDay wrote: > @steveire Thanks for the additional test cases, I'm reworking how I handle > the Macro case as I realized that I didn't actually even try to change the > case @rsmith came up with