[PATCH] D78374: [Analyzer][StreamChecker] Added evaluation of fread and fwrite.

2020-05-20 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. > Is there a significant gain behind doing that instead of doing a state split > immediately? It feels unnatural to delay the split. It doesn't accurately > represent how the code would run. Are we supposed to do this at every > precall? What about other chec

[clang] f7c9f77 - [Analyzer][StreamChecker] Added support for 'fread' and 'fwrite'.

2020-05-20 Thread Balázs Kéri via cfe-commits
Author: Balázs Kéri Date: 2020-05-20T09:40:57+02:00 New Revision: f7c9f77ef3721c956499b0ccf5e585de105aae4e URL: https://github.com/llvm/llvm-project/commit/f7c9f77ef3721c956499b0ccf5e585de105aae4e DIFF: https://github.com/llvm/llvm-project/commit/f7c9f77ef3721c956499b0ccf5e585de105aae4e.diff L

[PATCH] D78933: [analyzer] RangeConstraintManager optimizations in comparison expressions

2020-05-20 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. I've made some performance measurements on https://github.com/vim/vim project. Since I'm using Windows I had no chance to do a lot of test on different projects, because of Unix-environment dependency. I've tested the most weighty files running `clang --analyze -Xcl

[PATCH] D75791: [clang-format] Added new option IndentExternBlock

2020-05-20 Thread Marcus Johnson via Phabricator via cfe-commits
MarcusJohnson91 added a comment. In D75791#2044492 , @MyDeveloperDay wrote: > If you want me to land this for you, I'd feel more comfortable landing it if: > > a) We can land D80214: [clang-format] Set of unit test to begin to validate > that we don't ch

[PATCH] D80171: [analyzer] LoopUnrolling: fix crash when a parameter is a loop counter

2020-05-20 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp:167 + const bool isParm = VD->getKind() == Decl::ParmVar; + // Reference parameters are assumed as escaped variables. `getKind` function is only an implementation de

[PATCH] D69987: [RISCV] Assemble/Disassemble v-ext instructions.

2020-05-20 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
rogfer01 added a comment. @HsiangKai: just to confirm and to avoid confusion for other reviewers. > Assemble/disassemble RISC-V V extension instructions according to version > 0.8-draft-20191004 in https://github.com/riscv/riscv-v-spec/. Is the patch against the spec published in https://githu

[PATCH] D80015: [Analyzer][StreamChecker] Added support for 'fread' and 'fwrite'.

2020-05-20 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf7c9f77ef372: [Analyzer][StreamChecker] Added support for 'fread' and 'fwrite'. (authored by balazske). Changed prior to commit: https://reviews.llvm.org/D80015?vs=264843&id=265159#toc Repository: rG

[PATCH] D80279: [libclang] Extend clang_Cursor_Evaluate().

2020-05-20 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler created this revision. ckandeler added a reviewer: nik. Herald added subscribers: cfe-commits, arphaman. Herald added a project: clang. Let this function (try to) evaluate expressions, in addition to declarations and compound statements. Repository: rG LLVM Github Monorepo https://r

[PATCH] D80015: [Analyzer][StreamChecker] Added support for 'fread' and 'fwrite'.

2020-05-20 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 2 inline comments as done. balazske added a comment. I want to test the StreamChecker for false positives. Page http://clang.llvm.org/analyzer/open_projects.html says that it has too much false positives because state splitting (I did not see this page before.) There is an alter

[PATCH] D80225: [Driver] Recognize -fuse-ld={bfd, gold, lld} but don't prepend "ld." or "ld64." for other values

2020-05-20 Thread David Chisnall via Phabricator via cfe-commits
theraven added a comment. I'm a bit nervous about this. I'm aware of at least one out-of-tree toolchain that uses this mechanism to select their proprietary linker. I'd expect an RFC and for this to be highlighted in LLVM Weekly before I'm happy that this won't break downstream consumers. R

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-05-20 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay planned changes to this revision. MyDeveloperDay marked 3 inline comments as done. MyDeveloperDay added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:1566 Current.Type = TT_TrailingReturnArrow; - +} else if (Current.is(tok::arrow) && C

[PATCH] D80212: [clangd] Handle references for patched macros

2020-05-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 265182. kadircet added a comment. - Polish Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80212/new/ https://reviews.llvm.org/D80212 Files: clang-tools-extra/clangd/XRefs.cpp clang-tools-extra/clangd/unitt

[PATCH] D80198: [clangd] locateMacroAt handles patched macros

2020-05-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 265181. kadircet added a comment. - Polish Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80198/new/ https://reviews.llvm.org/D80198 Files: clang-tools-extra/clangd/Headers.cpp clang-tools-extra/clangd/Hov

[PATCH] D80202: [ASTMatchers] Performance optimization for memoization

2020-05-20 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Given the extra complexity I'd like to see that it matters - bound nodes tend to be small. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80202/new/ https://reviews.llvm.org/D80202

[PATCH] D66324: clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM

2020-05-20 Thread Alexey Sachkov via Phabricator via cfe-commits
AlexeySachkov added a comment. Looks like the issue is fixed in https://github.com/llvm/llvm-project/commit/6d2b75e0887ee87e247756c4d51733616bb2f356 Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66324/new/ https://reviews.llvm.org/D66324 __

[PATCH] D79721: [Clang][AArch64] Capturing proper pointer alignment for Neon vld1 intrinsicts

2020-05-20 Thread Lucas Prates via Phabricator via cfe-commits
pratlucas added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79721/new/ https://reviews.llvm.org/D79721 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D79930: [clangd] Add buildPreamble to TestTU

2020-05-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 265187. kadircet marked an inline comment as done. kadircet added a comment. - Rename buildPreamble to preamble Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79930/new/ https://reviews.llvm.org/D79930 Files:

[PATCH] D80198: [clangd] locateMacroAt handles patched macros

2020-05-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 265195. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80198/new/ https://reviews.llvm.org/D80198 Files: clang-tools-extra/clangd/Headers.cpp clang-tools-extra/clangd/Hov

[PATCH] D80202: [ASTMatchers] Performance optimization for memoization

2020-05-20 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D80202#2046266 , @klimek wrote: > Given the extra complexity I'd like to see that it matters - bound nodes tend > to be small. I put that in the description, but this is where i need help. whats the best way to benchmark th

[PATCH] D79930: [clangd] Add buildPreamble to TestTU

2020-05-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 265193. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79930/new/ https://reviews.llvm.org/D79930 Files: clang-tools-extra/clangd/unittests/PreambleTests.cpp clang-tools-

[PATCH] D79992: [clangd] Patch PP directives to use stale preambles while building ASTs

2020-05-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 265194. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79992/new/ https://reviews.llvm.org/D79992 Files: clang-tools-extra/clangd/Preamble.cpp clang-tools-extra/clangd/un

[PATCH] D78658: [clang][Frontend] Add missing error handling

2020-05-20 Thread LemonBoy via Phabricator via cfe-commits
LemonBoy added a comment. Ping? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78658/new/ https://reviews.llvm.org/D78658 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D80286: [Analyzer] Allow creation of stack frame for functions without definition

2020-05-20 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware created this revision. baloghadamsoftware added reviewers: NoQ, Szelethus. baloghadamsoftware added a project: clang. Herald added subscribers: ASDenysPetrov, martong, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, xazax.hun, wh

[PATCH] D80286: [Analyzer] Allow creation of stack frame for functions without definition

2020-05-20 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware marked 2 inline comments as done. baloghadamsoftware added a comment. I tested this on several open-source projects: BitCoin, CURL, OpenSLL, PostGreS, TMux, Xerces and even on LLVM itself with most of the projects enabled. No new crash and no change in findings. So it seems to

[PATCH] D75791: [clang-format] Added new option IndentExternBlock

2020-05-20 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D75791#2045986 , @MarcusJohnson91 wrote: > In D75791#2044492 , @MyDeveloperDay > wrote: > > > If you want me to land this for you, I'd feel more comfortable landing it > > if: >

[PATCH] D79721: [Clang][AArch64] Capturing proper pointer alignment for Neon vld1 intrinsicts

2020-05-20 Thread Oliver Stannard (Linaro) via Phabricator via cfe-commits
ostannard accepted this revision. ostannard added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79721/new/ https://reviews.llvm.org/D79721 _

[PATCH] D80288: [AST] default implementation is possible for non-member functions in C++2a.

2020-05-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added a project: clang. Make RAV not visit the default function decl by default. Also update some stale comments on FunctionDecl::isDefault. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D80288 Files: c

[PATCH] D80202: [ASTMatchers] Performance optimization for memoization

2020-05-20 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In D80202#2046321 , @njames93 wrote: > In D80202#2046266 , @klimek wrote: > > > Given the extra complexity I'd like to see that it matters - bound nodes > > tend to be small. > > > I put tha

[PATCH] D80289: [Driver][X86] Support branch align options with LTO

2020-05-20 Thread Kan Shengchen via Phabricator via cfe-commits
skan created this revision. Herald added subscribers: cfe-commits, dexonsmith, steven_wu, hiraditya, inglorion. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D80289 Files: clang/lib/Driver/ToolChains/CommonArgs.cpp clang/test/Driver/lto.c Ind

[clang] 3f333e0 - [analyzer] Get scan-view executable from environment.

2020-05-20 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2020-05-20T14:55:56+03:00 New Revision: 3f333e0af7a872a0152b4db972a37947e47e690d URL: https://github.com/llvm/llvm-project/commit/3f333e0af7a872a0152b4db972a37947e47e690d DIFF: https://github.com/llvm/llvm-project/commit/3f333e0af7a872a0152b4db972a37947e47e690d.dif

[PATCH] D78122: [analyzer][Nullability] Don't emit under the checker name NullabilityBase

2020-05-20 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. We're observing a surprising disappearance of nullability reports today - like, they didn't just change the name, they disappeared completely. Investigating. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78122/new/ https://rev

[PATCH] D77880: get scan-view executable from environment

2020-05-20 Thread Artem Dergachev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3f333e0af7a8: [analyzer] Get scan-view executable from environment. (authored by dergachev.a). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77880/new/ http

[PATCH] D80293: [clangd] Run PreambleThread in async mode behind a flag

2020-05-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. Herald added subscribers: cfe-commits, usaxena95, jfb, arphaman, jkorous, MaskRay, javed.absar, ilya-biryukov. Herald added a project: clang. Depends on D80198 . Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D802

[PATCH] D80214: [clang-format] Set of unit test to begin to validate that we don't change defaults

2020-05-20 Thread Marcus Johnson via Phabricator via cfe-commits
MarcusJohnson91 accepted this revision. MarcusJohnson91 added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80214/new/ https://reviews.llvm.org/D80214 _

[PATCH] D78122: [analyzer][Nullability] Don't emit under the checker name NullabilityBase

2020-05-20 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D78122#2046450 , @NoQ wrote: > We're observing a surprising disappearance of nullability reports today - > like, they didn't just change the name, they disappeared completely. > Investigating. I landed a lot of patches in

[PATCH] D77846: [analyzer][CallAndMessage][NFC] Split up checkPreCall

2020-05-20 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp:27 #include "llvm/Support/Casting.h" +#include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" balazske wrote: > Are these new includes

[PATCH] D77846: [analyzer][CallAndMessage][NFC] Split up checkPreCall

2020-05-20 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 265214. Szelethus marked 4 inline comments as done. Szelethus added a comment. Fixes according to @balazske's comments, cheers! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77846/new/ https://reviews.llvm.org/D77846 Files: clang/lib/StaticAnal

[PATCH] D79704: [Analyzer] [NFC] Parameter Regions

2020-05-20 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Seems like many changes could be simplified or absolutely not needed in this patch if ParamRegion (or with a better name ParamVarRegion) was derived from VarRegion. Is there any difficulties in that derivation? Comment at: clang/include/clang/StaticA

[PATCH] D80286: [Analyzer] Allow creation of stack frame for functions without definition

2020-05-20 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > Retrieving the parameter location of functions was disabled because it may > causes crashes due to the fact that functions may have multiple declarations > and without definition it is difficult to ensure that always the same > declration is used. Now parameters are s

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-05-20 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 265216. MyDeveloperDay marked 2 inline comments as done. MyDeveloperDay added reviewers: miscco, JakeMerdichAMD. MyDeveloperDay added a comment. Add new `AlwaysBreakBeforeConceptDeclarations` Better handling of requires expressions vs constraint expres

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-05-20 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 7 inline comments as done. MyDeveloperDay added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2281 + if (FormatTok->Tok.is(tok::kw_requires)) +parseRequires(); +} miscco wrote: > I believe this should be `parseCo

[clang] 827be69 - [clang] FastMathFlags.allowContract should be initialized only from FPFeatures.allowFPContractAcrossStatement

2020-05-20 Thread Melanie Blower via cfe-commits
Author: Melanie Blower Date: 2020-05-20T06:19:10-07:00 New Revision: 827be690dce158924924a70fda79b35a9d7ad1cc URL: https://github.com/llvm/llvm-project/commit/827be690dce158924924a70fda79b35a9d7ad1cc DIFF: https://github.com/llvm/llvm-project/commit/827be690dce158924924a70fda79b35a9d7ad1cc.diff

[PATCH] D80251: [X86] Update some av512 shift intrinsics to use "unsigned int" parameter instead of int to match Intel documentaiton

2020-05-20 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added a comment. Is it possible to fix those other 5 in the Intel docs for consistency, or is there some functional reason that those are different? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80251/new/ https://reviews.llvm.org/D80251 __

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-05-20 Thread Michael Schellenberger Costa via Phabricator via cfe-commits
miscco added a comment. Question: Should I add my wip work as a child revision or what would you suggest CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79773/new/ https://reviews.llvm.org/D79773 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D75432: [analyzer][NFC][MallocChecker] Convert many parameters into CallEvent

2020-05-20 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1194 - if (!FD) + if (!Call.getOriginExpr()) return; This should be added to avoid later crash (probably not needed for every check kind?): ``` const Funct

[PATCH] D80286: [Analyzer] Allow creation of stack frame for functions without definition

2020-05-20 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 265219. baloghadamsoftware added a comment. Added unittest for checking the sameness for the regions of same params with different redeclarations. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80286/new/ https://reviews.llvm.org/D80286

[PATCH] D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value

2020-05-20 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin added a comment. @mgehre @yvvan it seems that the issue still not fixed and '\n' gets duplicated in the replacements. Are you going to fix this issue or I should create a patch to fix it? Before this change '\n' was actually processed correctly `ReplacementText: '#include \n\n'`

[PATCH] D79903: FastMathFlags.allowContract should be init from FPFeatures.allowFPContractAcrossStatement

2020-05-20 Thread Melanie Blower via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG827be690dce1: [clang] FastMathFlags.allowContract should be initialized only from FPFeatures. (authored by mibintc). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D71739: [AssumeBundles] Use operand bundles to encode alignment assumptions

2020-05-20 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. I guess alignment is one of the main users of the old format, great to see it go :) First set of comments. Comment at: llvm/lib/Analysis/AssumeBundleQueries.cpp:104 +return 1; + }; if (BOI.End - BOI.Begin > ABA_Argument) I t

[PATCH] D80294: Add support for vmsumudm

2020-05-20 Thread Ahsan Saghir via Phabricator via cfe-commits
saghir created this revision. saghir added reviewers: power-llvm-team, nemanjai, stefanp, amyk, lei, hfinkel, PowerPC. Herald added subscribers: llvm-commits, cfe-commits, hiraditya. Herald added projects: clang, LLVM. This patch adds support for Vector Multiply-Sum Unsigned Doubleword Modulo in

[PATCH] D78097: [analyzer][RetainCount] Remove the CheckOSObject option

2020-05-20 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 accepted this revision. gamesh411 added a comment. This revision is now accepted and ready to land. I have no authority whatsoever, but if there is no breakage in buildbots, then it means explicitly providing `CheckOSObject` param is not really valid use-case. I vote for this cleanup.

[PATCH] D75432: [analyzer][NFC][MallocChecker] Convert many parameters into CallEvent

2020-05-20 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked 3 inline comments as done. Szelethus added a comment. I though I addressed the inlines months ago, but seems like I did not. I'll get this done post-commit. Oops. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1194 - if (!FD) + if (!Call.get

[PATCH] D79704: [Analyzer] [NFC] Parameter Regions

2020-05-20 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware marked 7 inline comments as done. baloghadamsoftware added a comment. In D79704#2042130 , @martong wrote: > Can we find the FunctionDecl if the call happens through a function pointer? > Or in that case do we actually find the VarDecl o

[PATCH] D79992: [clangd] Patch PP directives to use stale preambles while building ASTs

2020-05-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/Preamble.cpp:110 -/// Gets the includes in the preamble section of the file by running -/// preprocessor over \p Contents. Re

[PATCH] D80295: [Sema] Diagnose static data members in classes nested in unnamed classes

2020-05-20 Thread John Brawn via Phabricator via cfe-commits
john.brawn created this revision. john.brawn added reviewers: rsmith, rjmccall. Herald added a project: clang. We currently diagnose static data members directly contained in unnamed classes, but we should also diagnose when they're in a class that is nested (directly or indirectly) in an unname

[PATCH] D75432: [analyzer][NFC][MallocChecker] Convert many parameters into CallEvent

2020-05-20 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked 4 inline comments as done. Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:614 + static ProgramStateRef CallocMem(CheckerContext &C, const CallEvent &Call, ProgramStateRef State

[PATCH] D76342: [OpenMP] Implement '#pragma omp tile'

2020-05-20 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added a comment. Herald added a subscriber: sstefan1. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76342/new/ https://reviews.llvm.org/D76342 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D80296: [clangd] Don't traverse the AST within uninteresting files during indexing

2020-05-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: kadircet. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. We already skip function bodies from these files while parsing, and drop symbols found in them. Howeve

[PATCH] D75432: [analyzer][NFC][MallocChecker] Convert many parameters into CallEvent

2020-05-20 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1194 - if (!FD) + if (!Call.getOriginExpr()) return; Szelethus wrote: > Szelethus wrote: > > balazske wrote: > > > This should be added to avoid later crash (

[PATCH] D80023: [clang-tidy] Add abseil-string-find-str-contains checker.

2020-05-20 Thread Tom Lokovic via Phabricator via cfe-commits
tdl-g added a comment. Thanks, all, for the additional comments. I addressed them all except for the suggestion to add an options-specific test. I'm not against it, but (as I mention in the comment) I'm also unsure how to meaningfully test the include-inserting-related options. ===

[PATCH] D80025: [ASTMatcher] Correct memoization bug ignoring direction (descendants or ancestors)

2020-05-20 Thread Loïc Joly via Phabricator via cfe-commits
loic-joly-sonarsource added inline comments. Comment at: clang/lib/ASTMatchers/ASTMatchFinder.cpp:46-49 +enum class MatchDirection { + Ancestors, + Descendants +}; klimek wrote: > loic-joly-sonarsource wrote: > > klimek wrote: > > > Nice find! Why don't we need

[PATCH] D75665: [analyzer] On-demand parsing capability for CTU

2020-05-20 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Hi Endre, just checked the latest update. Overall looks good to me, but found some nits. Comment at: clang/include/clang/CrossTU/CrossTranslationUnit.h:260 +/// that produce the AST used for analysis. +StringRef OnDemandParsingDatabase; + -

[PATCH] D69987: [RISCV] Assemble/Disassemble v-ext instructions.

2020-05-20 Thread Hsiangkai Wang via Phabricator via cfe-commits
HsiangKai added a comment. In D69987#1853986 , @HsiangKai wrote: > Update to version 0.8-draft-20191213. Hi Roger, I have updated it to 0.8-draft-20191213 in February. It is the same as version 0.8. Sorry for that I did not update the commit message. T

[PATCH] D80023: [clang-tidy] Add abseil-string-find-str-contains checker.

2020-05-20 Thread Tom Lokovic via Phabricator via cfe-commits
tdl-g updated this revision to Diff 265234. tdl-g marked 12 inline comments as done. tdl-g added a comment. Addressed second round of comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80023/new/ https://reviews.llvm.org/D80023 Files: clang

[PATCH] D80293: [clangd] Run PreambleThread in async mode behind a flag

2020-05-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/TUScheduler.cpp:248 + ReqCV.wait(Lock, [this] { +return !NextReq || NextReq->WantDiags != WantDiagnostics::Yes; + }); This is mostly

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-05-20 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 2 inline comments as done. MyDeveloperDay added a comment. In D79773#2046565 , @miscco wrote: > Question: Should I add my wip work as a child revision or what would you > suggest Certainly your revision on github was useful for me

[clang] c8a869c - [OPENMP][DOCS]Update status of implemented features, NFC.

2020-05-20 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2020-05-20T10:54:53-04:00 New Revision: c8a869c5e025dcee3bd7393b14a0d55c1ee326e5 URL: https://github.com/llvm/llvm-project/commit/c8a869c5e025dcee3bd7393b14a0d55c1ee326e5 DIFF: https://github.com/llvm/llvm-project/commit/c8a869c5e025dcee3bd7393b14a0d55c1ee326e5.diff

[PATCH] D75432: [analyzer][NFC][MallocChecker] Convert many parameters into CallEvent

2020-05-20 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1194 - if (!FD) + if (!Call.getOriginExpr()) return; Szelethus wrote: > balazske wrote: > > Szelethus wrote: > >

[PATCH] D75432: [analyzer][NFC][MallocChecker] Convert many parameters into CallEvent

2020-05-20 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked 2 inline comments as done. Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1194 - if (!FD) + if (!Call.getOriginExpr()) return; balazske wrote: > Szelethus wrote: > > Szelethus wrote: > >

[PATCH] D79966: [OPENMP]Fix PR45911: Data sharing and lambda capture.

2020-05-20 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 265246. ABataev added a comment. Herald added a subscriber: sstefan1. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79966/new/ https://reviews.llvm.org/D79966 Files: clang/lib/CodeGen/CGOpenMPRuntime.

[PATCH] D80025: [ASTMatcher] Correct memoization bug ignoring direction (descendants or ancestors)

2020-05-20 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clang/lib/ASTMatchers/ASTMatchFinder.cpp:46-49 +enum class MatchDirection { + Ancestors, + Descendants +}; loic-joly-sonarsource wrote: > klimek wrote: > > loic-joly-sonarsource wrote: > > > klimek wrote: > > > > Nice f

[PATCH] D75432: [analyzer][NFC][MallocChecker] Convert many parameters into CallEvent

2020-05-20 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. Hi, @Szelethus, I don't know exactly which of the changes (this one, https://reviews.llvm.org/D75430, or https://reviews.llvm.org/D75431) causes a crash on SQLite, but it's definitely one of these. **Steps to reproduce** clang -cc1 -Wdeprecated-objc-isa-usage -Wer

[PATCH] D79704: [Analyzer] [NFC] Parameter Regions

2020-05-20 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Thanks for addressing my comments! Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h:309 + /// Get the lvalue for a parameter. + Loc getLValue(const Expr *Call, unsigned Index, +const LocationContext *LC

[PATCH] D78099: [analyzer][RetainCount] Tie diagnostics to osx.cocoa.RetainCount rather then RetainCountBase, for the most part

2020-05-20 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Ping, @NoQ @vsavchenko I'm confident with the previous patch, but I'd be glad if one of you could take a look before I land this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78099/new/ https://reviews.llvm.org/D78099

[PATCH] D75432: [analyzer][NFC][MallocChecker] Convert many parameters into CallEvent

2020-05-20 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Thanks, I'll get right to it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75432/new/ https://reviews.llvm.org/D75432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-05-20 Thread Michael Schellenberger Costa via Phabricator via cfe-commits
miscco added a comment. It seems the spacing of the binary operator is not yet stable. This test is breaking for me: verifyFormat("template \nconcept someConcept = Constraint1 && Constraint2;"); CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79773/new/ https://reviews.llvm.org/D7977

[PATCH] D80289: [Driver][X86] Support branch align options with LTO

2020-05-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/lto.c:81 + +/// -flto passes along an explicit branch align argument. +/// Test -malign-branch-boundary= This piece of logic is closer to x86. The test can be added to `x86-malign-branch.c` instead R

[PATCH] D80286: [Analyzer] Allow creation of stack frame for functions without definition

2020-05-20 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/unittests/StaticAnalyzer/ParamRegionTest.cpp:22 +const ParmVarDecl *PVD) { +for (const auto *D2: PVD->redecls()) { + const auto *PVD2 = cast(D2); I am concerned about the re

[PATCH] D80289: [Driver][X86] Support branch align options with LTO

2020-05-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:501 + // Handle options for branch align + if (Args.hasArg(options::OPT_mbranches_within_32B_boundaries)) { +CmdArgs.push_back("-plugin-opt=-x86-branches-within-32B-boundaries"); -

[PATCH] D80171: [analyzer] LoopUnrolling: fix crash when a parameter is a loop counter

2020-05-20 Thread Abbas Sabra via Phabricator via cfe-commits
AbbasSabra marked 2 inline comments as done. AbbasSabra added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp:167 + const bool isParm = VD->getKind() == Decl::ParmVar; + // Reference parameters are assumed as escaped variables. vs

[PATCH] D80171: [analyzer] LoopUnrolling: fix crash when a parameter is a loop counter

2020-05-20 Thread Abbas Sabra via Phabricator via cfe-commits
AbbasSabra updated this revision to Diff 265253. AbbasSabra added a comment. Fix code review 2 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80171/new/ https://reviews.llvm.org/D80171 Files: clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp clan

[PATCH] D80300: [Driver] Add DEFAULT_DYLD_PREFIX and DEFAULT_RPATH to complement DEFAULT_SYSROOT

2020-05-20 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast created this revision. hubert.reinterpretcast added reviewers: nemanjai, jsji, daltenty, stevewan, jasonliu. Herald added subscribers: atanasyan, jrtc27, mgorny. Herald added a project: clang. hubert.reinterpretcast edited the summary of this revision. Some target toolchain

[PATCH] D79966: [OPENMP]Fix PR45911: Data sharing and lambda capture.

2020-05-20 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79966/new/ https://reviews.llvm.org/D79966 _

[PATCH] D75432: [analyzer][NFC][MallocChecker] Convert many parameters into CallEvent

2020-05-20 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1194 - if (!FD) + if (!Call.getOriginExpr()) return; Szelethus wrote: > Szelethus wrote: > > balazske wrote: > > > Szelethus wrote: > > > > Szelethus wrote: >

[PATCH] D79998: Add AST_SIGNATURE record to unhashed control block of pcm files (Patch series 2/3)

2020-05-20 Thread Daniel Grumberg via Phabricator via cfe-commits
dang updated this revision to Diff 265262. dang added a comment. Herald added a subscriber: ormris. Add a small bug fix and test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79998/new/ https://reviews.llvm.org/D79998 Files: clang/test/Modu

[PATCH] D80296: [clangd] Don't traverse the AST within uninteresting files during indexing

2020-05-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a subscriber: adamcz. sammccall added a comment. @adamcz I think this is relevant to your interests maybe? :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80296/new/ https://reviews.llvm.org/D80296 _

[PATCH] D80301: [yaml][clang-tidy] Fix new line YAML serialization

2020-05-20 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin created this revision. DmitryPolukhin added reviewers: gribozavr, mgehre, yvvan. DmitryPolukhin added projects: clang-tools-extra, clang. Herald added subscribers: hiraditya, xazax.hun. Herald added a project: LLVM. DmitryPolukhin edited the summary of this revision. Move new line d

[PATCH] D79998: Add AST_SIGNATURE record to unhashed control block of pcm files (Patch series 2/3)

2020-05-20 Thread Daniel Grumberg via Phabricator via cfe-commits
dang updated this revision to Diff 265263. dang added a comment. Uploaded the wrong diff Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79998/new/ https://reviews.llvm.org/D79998 Files: clang/include/clang/Serialization/ASTBitCodes.h clang/incl

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-05-20 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D79773#2046833 , @miscco wrote: > It seems the spacing of the binary operator is not yet stable. This test is > breaking for me: > > verifyFormat("template \nconcept someConcept = Constraint1 > && Constraint2;"); >

[PATCH] D75432: [analyzer][NFC][MallocChecker] Convert many parameters into CallEvent

2020-05-20 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added a comment. This will take a while for me to fix (couple hours, wanna wait for creduce to finish running, and I needed to compile llvm on the server as well), but I'll get it done probably today. Comment at: clang/lib

[PATCH] D80023: [clang-tidy] Add abseil-string-find-str-contains checker.

2020-05-20 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. LGTM, but leaving for one of the other reviewers to give you the official "Accept Revision". Comment at: clang-tools-extra/clang-tidy/abseil/StringFindStrContainsCheck.cpp:72 + binaryOperator(hasOperatorName("=="), +

[PATCH] D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value

2020-05-20 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin added a comment. Sent D80301 for review. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63482/new/ https://reviews.llvm.org/D63482 ___ cfe-commits mailing list cfe-commi

[PATCH] D77062: [analyzer] Added check for unacceptable equality operation between Loc and NonLoc types

2020-05-20 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. Folk, please look at this patch. It has been hanging for a time here. We should finally make a decision about it. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77062/new/ https://reviews.llvm.org/D77062 ___ c

[PATCH] D80117: [analyzer] Introduce reasoning about symbolic remainder operator

2020-05-20 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @vsavchenko I've made some assumptions. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:459-469 +if (Origin.From().isMinSignedValue()) { + // If mini is a minimal signed value, absolute value of it is greater + /

[PATCH] D80198: [clangd] locateMacroAt handles patched macros

2020-05-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/SourceCode.cpp:975 + + // Macro definitions could be injected through preamble patch. These contain + // line directives to hint their original location in main file. OK, this is fairly horri

[PATCH] D80242: [Clang] implement -fno-eliminate-unused-debug-types

2020-05-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:5559 + case Decl::Typedef: +if (getCodeGenOpts().DebugUnusedTypes) + if (CGDebugInfo *DI = getModuleDebugInfo()) dblaikie wrote: > Probably test this within the imple

[PATCH] D80242: [Clang] implement -fno-eliminate-unused-debug-types

2020-05-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. probably should add a test for `enum class` in C++ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80242/new/ https://reviews.llvm.org/D80242 ___ cfe-commits mailing list

[clang] 60ee885 - [clang][asm goto][slh] Warn if asm goto + SLH

2020-05-20 Thread Zola Bridges via cfe-commits
Author: Zola Bridges Date: 2020-05-20T09:46:18-07:00 New Revision: 60ee885990982197013c71ff965a81e938184fd2 URL: https://github.com/llvm/llvm-project/commit/60ee885990982197013c71ff965a81e938184fd2 DIFF: https://github.com/llvm/llvm-project/commit/60ee885990982197013c71ff965a81e938184fd2.diff

[PATCH] D80309: [clang-format][docfix] Update predefined styles in docs

2020-05-20 Thread Jake Merdich via Phabricator via cfe-commits
JakeMerdichAMD created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. JakeMerdichAMD added reviewers: MyDeveloperDay, krasimir, mitchell-stellar, sammccall. JakeMerdichAMD added a project: clang-format. The predefined styles that clang-format supports are li

[PATCH] D80214: [clang-format] Set of unit test to begin to validate that we don't change defaults

2020-05-20 Thread Jake Merdich via Phabricator via cfe-commits
JakeMerdichAMD added a comment. Just belatedly caught something: Webkit style is supported too but not listed here. Can you add that? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80214/new/ https://reviews.llvm.org/D80214 _

  1   2   >