[PATCH] D115604: [Support] Expand `` as the base directory in configuration files.

2021-12-29 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: llvm/lib/Support/CommandLine.cpp:1099 +else + llvm::sys::path::append(ResponseFile, LHS); +ResponseFile.append(BasePath); What happens if `` is used without trailing path? Such line: ``` --sysroot= -ab

[PATCH] D116395: [Clang] Emit warning for -x option without effects

2021-12-29 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf created this revision. qiucf added reviewers: rsmith, hans, thakis, awarzynski, brad, phosek. qiucf requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Things might be confusing for people not familiar with how this option works. Add thi

[PATCH] D116316: [clang-format] Add an experimental option to remove optional control statement braces in LLVM C++ code

2021-12-29 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:23224 + + EXPECT_EQ("if (a)\n" +" if (b)\n" owenpan wrote: > MyDeveloperDay wrote: > > any reason these can't be verifyFormats? > Did you mean to add the expected part

[PATCH] D116003: [NFC] Specify targets for clang stack-protector-guard.c

2021-12-29 Thread Qiu Chaofan 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 rG4039d17355b7: [NFC] Specify targets for clang stack-protector-guard.c (authored by qiucf). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[clang] 4039d17 - [NFC] Specify targets for clang stack-protector-guard.c

2021-12-29 Thread Qiu Chaofan via cfe-commits
Author: Qiu Chaofan Date: 2021-12-30T10:13:41+08:00 New Revision: 4039d17355b7dc54d847d05d8685912cf081a113 URL: https://github.com/llvm/llvm-project/commit/4039d17355b7dc54d847d05d8685912cf081a113 DIFF: https://github.com/llvm/llvm-project/commit/4039d17355b7dc54d847d05d8685912cf081a113.diff L

[PATCH] D116387: [CodeCompletion][clangd] Clean __uglified parameter names in completion & hover

2021-12-29 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: kbobyrev. Herald added subscribers: dexonsmith, usaxena95, kadircet, arphaman. sammccall requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added projects: clang, clang-tools-extra. U

[PATCH] D116386: [clang-tidy] Narrow cppguidelines-macro-usage to actual constants

2021-12-29 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood created this revision. LegalizeAdulthood added a reviewer: alexfh. Herald added subscribers: carlosgalvezp, kbarton, xazax.hun, nemanjai. LegalizeAdulthood requested review of this revision. Herald added a project: clang-tools-extra. Previously, any macro that didn't look like a

[PATCH] D116370: [clang][dataflow] Add multi-variable constant propagation example.

2021-12-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D116370#3213120 , @xazax.hun wrote: > Does it make sense to have both the single and multi variable tracking tests? > Or do we want to have these as some sort of steps in a tutorial? Right -- the intent in keeping the origina

[PATCH] D116371: [clang-format] Support inheriting from more than 1 parents in the fallback case

2021-12-29 Thread Zhao Wei Liew via Phabricator via cfe-commits
zwliew updated this revision to Diff 396580. zwliew added a comment. Herald added a subscriber: cfe-commits. Rebased on master for context. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116371/new/ https://reviews.llvm.org/D116371 Files: clang/l

[PATCH] D116316: [clang-format] Add an experimental option to remove optional control statement braces in LLVM C++ code

2021-12-29 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2303 + assert(IfRightBrace->MatchingParen == IfLeftBrace); + IfLeftBrace->MatchingParen = nullptr; + IfRightBrace->MatchingParen = nullptr; HazardyKnusperkeks wrote

[PATCH] D105169: [Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default

2021-12-29 Thread Hyeongyu Kim via Phabricator via cfe-commits
hyeongyukim added a comment. Great. I'll check it out. > I have a reproducer for the first two, as that is all I had time for; if you > would like them for the other two, I can get those for you tomorrow. @nathanchance I think the other two can be reproduced without difficulty. If the reproduc

[PATCH] D116316: [clang-format] Add an experimental option to remove optional control statement braces in LLVM C++ code

2021-12-29 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:3398 +**RemoveBracesLLVM** (``Boolean``) :versionbadge:`clang-format 14` + Remove optional braces of control statements (``if``, ``else``, ``for``, MyDeveloperDay wrote: > Can we

[PATCH] D105169: [Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default

2021-12-29 Thread Nathan Chancellor via Phabricator via cfe-commits
nathanchance added a comment. @hyeongyukim I hand reduced a couple of the translation units that I see issues in so apologies if they are a little verbose. The full set of warnings: drivers/net/ethernet/renesas/ravb.lto.o: warning: objtool: .text.ravb_set_gti: unexpected end of section dri

[PATCH] D116314: [clang-format] Add style to separate definition blocks

2021-12-29 Thread ksyx via Phabricator via cfe-commits
ksyx updated this revision to Diff 396577. ksyx added a comment. Apply suggestion from clangfmt CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116314/new/ https://reviews.llvm.org/D116314 Files: clang/docs/ClangFormatStyleOptions.rst clang/include/clang/Format/Format.h clang/lib/F

[PATCH] D115604: [Support] Expand `` as the base directory in configuration files.

2021-12-29 Thread Jack Andersen via Phabricator via cfe-commits
jackoalan updated this revision to Diff 396576. jackoalan added a comment. Update call parameters in `ExpandResponseFilesDatabase::expand` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115604/new/ https://reviews.llvm.org/D115604 Files: clang/do

[PATCH] D116314: [clang-format] Add style to separate definition blocks

2021-12-29 Thread ksyx via Phabricator via cfe-commits
ksyx updated this revision to Diff 396575. ksyx added a comment. Apply clangfmt's suggestions CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116314/new/ https://reviews.llvm.org/D116314 Files: clang/docs/ClangFormatStyleOptions.rst clang/include/clang/Format/Format.h clang/lib/For

[PATCH] D116314: [clang-format] Add style to separate definition blocks

2021-12-29 Thread ksyx via Phabricator via cfe-commits
ksyx updated this revision to Diff 396574. ksyx marked 9 inline comments as done. ksyx edited the summary of this revision. ksyx added a comment. - Improve compatibility to other languages - Improve unit test by test format stability, inverse result, and generate some input from expected output -

[PATCH] D116370: [clang][dataflow] Add multi-variable constant propagation example.

2021-12-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Does it make sense to have both the single and multi variable tracking tests? Or do we want to have these as some sort of steps in a tutorial? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116370/new/ https://reviews.llv

[PATCH] D116369: [clang][dataflow] Add parameterized map lattice.

2021-12-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/MapLattice.h:92 + /// entry as it was in the source map. + LatticeJoinEffect join(const MapLattice &Other) { +LatticeJoinEffect Effect = LatticeJoinEffect::Unchanged; It

[PATCH] D116368: [clang][dataflow] Add transfer function for VarDecl statements

2021-12-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Thanks! I have some questions inline. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h:61 + /// `D` must not be assigned a storage location. + void setStorageLocation(const VarDecl &D, StorageLocation &Loc) { +a

[PATCH] D116316: [clang-format] Add an experimental option to remove optional control statement braces in LLVM C++ code

2021-12-29 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2303 + assert(IfRightBrace->MatchingParen == IfLeftBrace); + IfLeftBrace->MatchingParen = nullptr; + IfRightBrace->MatchingParen = nullptr; Why null that

[PATCH] D116316: [clang-format] Add an experimental option to remove optional control statement braces in LLVM C++ code

2021-12-29 Thread Owen Pan via Phabricator via cfe-commits
owenpan updated this revision to Diff 396573. owenpan added a comment. Fixed a bug and added a test case. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116316/new/ https://reviews.llvm.org/D116316 Files: clang/docs/ClangFormatStyleOptions.rst clang/include/clang/Format/Format.h c

[PATCH] D116369: [clang][dataflow] Add parameterized map lattice.

2021-12-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 3 inline comments as done. ymandel added a comment. In D116369#3212532 , @sgatev wrote: > It seems unnecessary to deal with AST elements in the tests for `MapLattice`. > I think testing it with integer or string keys would be simpler. Give

[PATCH] D116369: [clang][dataflow] Add parameterized map lattice.

2021-12-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 396570. ymandel marked 2 inline comments as done. ymandel added a comment. update comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116369/new/ https://reviews.llvm.org/D116369 Files: clang/include/clan

[PATCH] D116385: [clangd] Code action for creating an ObjC initializer

2021-12-29 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 396569. dgoldman added a comment. Remove debug log statement Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116385/new/ https://reviews.llvm.org/D116385 Files: clang-tools-extra/clangd/refactor/tweaks/CMakeL

[PATCH] D116385: [clangd] Code action for creating an ObjC initializer

2021-12-29 Thread David Goldman via Phabricator via cfe-commits
dgoldman created this revision. Herald added subscribers: usaxena95, kadircet, arphaman, mgorny. dgoldman requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. The code action creates an initializer for the sele

[PATCH] D116369: [clang][dataflow] Add parameterized map lattice.

2021-12-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 396565. ymandel added a comment. addressed comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116369/new/ https://reviews.llvm.org/D116369 Files: clang/include/clang/Analysis/FlowSensitive/MapLattice.h

[PATCH] D115604: [Support] Expand `` as the base directory in configuration files.

2021-12-29 Thread Jack Andersen via Phabricator via cfe-commits
jackoalan updated this revision to Diff 396561. jackoalan retitled this revision from "[Support] Expand `` as the base directory in response files." to "[Support] Expand `` as the base directory in configuration files.". jackoalan added a comment. Make `` constant at point of expansion. Use bool

[PATCH] D115456: Implement on-demand TLS initialization for Microsoft CXX ABI

2021-12-29 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added inline comments. Comment at: clang/lib/CodeGen/MicrosoftCXXABI.cpp:2470 +// Dynamic TLS initialization works by checking the state of a +// guard varibale (__tls_guard) to see whether TLS initialization +// for a thread has happend yet. s

[PATCH] D116370: [clang][dataflow] Add multi-variable constant propagation example.

2021-12-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/MultiVarConstantPropagationTest.cpp:375-376 + Pair("p2", HoldsCPLattice(UnorderedElementsAre( + Pair(Var("target"), HasConstantVal(2)), +

[PATCH] D116370: [clang][dataflow] Add multi-variable constant propagation example.

2021-12-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 396557. ymandel marked an inline comment as done. ymandel added a comment. Fix handling of uninitialized variables. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116370/new/ https://reviews.llvm.org/D116370 Fi

[PATCH] D116328: [ast-matchers] Add hasSubstmt() traversal matcher for caseStmt(), defaultStmt(), labelStmt()

2021-12-29 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 396556. LegalizeAdulthood added a comment. clang-format CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116328/new/ https://reviews.llvm.org/D116328 Files: clang/docs/LibASTMatchersReference.html clang/include/clang/ASTMatchers/ASTMatch

[PATCH] D111081: [clang] [MinGW] Fix paths on Gentoo

2021-12-29 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. Well, I dunno how MinGW works, so can't judge that part. Furthermore, I'm thoroughly confused why this works on top of existing (non-Gentoo?) test tree. Could you explain it a bit more? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111081/new/ https://reviews.l

[PATCH] D116170: [clang-format] Add penalty for breaking after '('

2021-12-29 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116170/new/ https://reviews.llvm.org/D116170 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D116170: [clang-format] Add penalty for breaking after '('

2021-12-29 Thread G Pery via Phabricator via cfe-commits
GPery added a comment. Fixed and marked :D Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116170/new/ https://reviews.llvm.org/D116170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[PATCH] D116170: [clang-format] Add penalty for breaking after '('

2021-12-29 Thread G Pery via Phabricator via cfe-commits
GPery updated this revision to Diff 396547. GPery marked 4 inline comments as done. GPery added a comment. Now using verifyFormat! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116170/new/ https://reviews.llvm.org/D116170 Files: clang/docs/Clang

[PATCH] D115604: [Support] Expand `` as the base directory in response files.

2021-12-29 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. The name of the patch could be more precise if you change `response files` to `configuration files`. Comment at: clang/docs/UsersManual.rst:926-927 + +A potential `` use-case may be search paths in a portable (i.e. not +installed) SDK directory for e

[clang] ee3f557 - [Basic] Drop unnecessary const from return types (NFC)

2021-12-29 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2021-12-29T08:55:37-08:00 New Revision: ee3f557a9cfefdcf07d4fc1394cb05098a2c2508 URL: https://github.com/llvm/llvm-project/commit/ee3f557a9cfefdcf07d4fc1394cb05098a2c2508 DIFF: https://github.com/llvm/llvm-project/commit/ee3f557a9cfefdcf07d4fc1394cb05098a2c2508.diff L

[PATCH] D116328: [ast-matchers] Add hasSubstmt() traversal matcher for caseStmt(), defaultStmt(), labelStmt()

2021-12-29 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 396543. LegalizeAdulthood added a comment. Correct HTML copy/paste error for labelStmt() traversal CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116328/new/ https://reviews.llvm.org/D116328 Files: clang/docs/LibASTMatchersReference.html

[PATCH] D116328: [ast-matchers] Add hasSubstmt() traversal matcher for caseStmt(), defaultStmt(), labelStmt()

2021-12-29 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 396542. LegalizeAdulthood retitled this revision from "[ast-matchers] Add hasSubstmt() traversal matcher for caseStmt(), defaultStmt()" to "[ast-matchers] Add hasSubstmt() traversal matcher for caseStmt(), defaultStmt(), labelStmt()". LegalizeAdulth

[PATCH] D116378: Disable clang-tidy warnings from system macros

2021-12-29 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp created this revision. carlosgalvezp added reviewers: aaron.ballman, whisperity, salman-javed-nz. carlosgalvezp added a project: clang-tools-extra. Herald added subscribers: rnkovacs, kbarton, nemanjai. carlosgalvezp requested review of this revision. Herald added a subscriber: cfe-co

[clang] 298367e - [clang] Use nullptr instead of 0 or NULL (NFC)

2021-12-29 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2021-12-29T08:34:20-08:00 New Revision: 298367ee6e36eeb1b193ad9fa92082c2ef2345a3 URL: https://github.com/llvm/llvm-project/commit/298367ee6e36eeb1b193ad9fa92082c2ef2345a3 DIFF: https://github.com/llvm/llvm-project/commit/298367ee6e36eeb1b193ad9fa92082c2ef2345a3.diff L

[clang] 1b329fe - [clang] Remove unused "using" (NFC)

2021-12-29 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2021-12-29T08:27:29-08:00 New Revision: 1b329fe28206287e8a496b66cc68f4c1838a0230 URL: https://github.com/llvm/llvm-project/commit/1b329fe28206287e8a496b66cc68f4c1838a0230 DIFF: https://github.com/llvm/llvm-project/commit/1b329fe28206287e8a496b66cc68f4c1838a0230.diff L

[PATCH] D116283: [clang-format] Add an option to add a space between operator overloading and opening parentheses

2021-12-29 Thread Rajat Bajpai via Phabricator via cfe-commits
rajatbajpai added a comment. In D116283#3211590 , @HazardyKnusperkeks wrote: > Does it affect calling code? `a.operator++(5);` Should it? But please add > tests for that. Yes, it does affect the calling code as well. However, I am not sure if we shoul

[PATCH] D116377: [libTooling] Adds more support for constructing object access expressions.

2021-12-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr2. ymandel requested review of this revision. Herald added a project: clang. This patch adds a `buildAccess` function, which constructs a string with the proper operator to use based on the expression's form and type. It also adds t

[PATCH] D116368: [clang][dataflow] Add transfer function for VarDecl statements

2021-12-29 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev updated this revision to Diff 396537. sgatev added a comment. Convert pointers to references. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116368/new/ https://reviews.llvm.org/D116368 Files: clang/include/clang/Analysis/FlowSensitive/Dat

[PATCH] D116170: [clang-format] Add penalty for breaking after '('

2021-12-29 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Looks good, use the `verifyFormat` and please mark comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116170/new/ https://reviews.llvm.org/D116170 ___ cfe

[PATCH] D72326: [clang-format] Add option to explicitly specify a config file

2021-12-29 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. Although there is no context. Maybe still update the uploaded diff for the archive. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72326/new/ https://reviews.llvm.org/D72326 _

[PATCH] D116351: Update Bug report URL to Github Issues

2021-12-29 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone accepted this revision. Quuxplusone added a comment. Tweaked English wording throughout. LGTM with all these modifications made. Orthogonally, it does occur to me that one might save a //lot// of this churn (and also the next time the bug tracker moves, e.g. if we go from GitHub to

[PATCH] D116370: [clang][dataflow] Add multi-variable constant propagation example.

2021-12-29 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/MultiVarConstantPropagationTest.cpp:375-376 + Pair("p2", HoldsCPLattice(UnorderedElementsAre( + Pair(Var("target"), HasConstantVal(2)), +

[PATCH] D116368: [clang][dataflow] Add transfer function for VarDecl statements

2021-12-29 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h:56 + + /// Assigns `Loc` to `D`. + /// ymandel wrote: > The term "assignment" is overloaded. :) Maybe instead "Associates `Loc` with > `D`"? Or, exp

[PATCH] D105297: [OPENMP]Fix PR50347: Mapping of global scope deep object fails.

2021-12-29 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 396531. ABataev added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105297/new/ https://reviews.llvm.org/D105297 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp clang/test/OpenMP/reduction_i

[PATCH] D93844: [clang-format] Add possibility to be based on parent directory

2021-12-29 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks marked an inline comment as done. HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/Format.cpp:3067 + if (!ChildFormatTextToApply.empty()) { +assert(ChildFormatTextToApply.size() == 1); + zwliew wrote: > zwliew wrote:

[PATCH] D72326: [clang-format] Add option to explicitly specify a config file

2021-12-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72326/new/ https://reviews.llvm.org/D72326 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[PATCH] D116316: [clang-format] Add an experimental option to remove optional control statement braces in LLVM C++ code

2021-12-29 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2338 + KeepAncestorBraces(); + NestedTooDeep.push_back(false); if (FormatTok->is(tok::l_brace)) { owenpan wrote: > HazardyKnusperkeks wrote: > > I think it is wort

[PATCH] D116368: [clang][dataflow] Add transfer function for VarDecl statements

2021-12-29 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev updated this revision to Diff 396529. sgatev marked 8 inline comments as done. sgatev added a comment. Address reviewers' comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116368/new/ https://reviews.llvm.org/D116368 Files: clang/in

[PATCH] D116170: [clang-format] Add penalty for breaking after '('

2021-12-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:18519 + Style.PenaltyExcessCharacter = 15; + EXPECT_EQ("int foo(\n" +"int );", any reason you are not using verifyFormat here? Repo

[PATCH] D116314: [clang-format] Add style to separate definition blocks

2021-12-29 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/DefinitionBlockSeparator.h:38-39 +}; +} // end namespace format +} // end namespace clang + HazardyKnusperkeks wrote: > I know you copied it. It is wrong where you copied it from. :) Not done.

[PATCH] D116170: [clang-format] Add penalty for breaking after '('

2021-12-29 Thread G Pery via Phabricator via cfe-commits
GPery updated this revision to Diff 396527. GPery added a comment. Resorted everything and added more tests, thanks for the comments <3 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116170/new/ https://reviews.llvm.org/D116170 Files: clang/docs/

[PATCH] D116374: [clang-format] Add penalty for breaking after '('

2021-12-29 Thread G Pery via Phabricator via cfe-commits
GPery updated this revision to Diff 396526. GPery added a comment. Resorted everything and added more tests, thanks for the comments <3 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116374/new/ https://reviews.llvm.org/D116374 Files: clang/docs/

[PATCH] D116374: [clang-format] Add penalty for breaking after '('

2021-12-29 Thread G Pery via Phabricator via cfe-commits
GPery created this revision. GPery requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Resorted and added tests, thanks for the comments <3 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D116374 Files: clang/docs/ClangForm

[PATCH] D99436: [OPENMP]Fix PR49366: crash on VLAs in task untied regions.

2021-12-29 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 396524. ABataev added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99436/new/ https://reviews.llvm.org/D99436 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/include/clang/

[PATCH] D116316: [clang-format] Add an experimental option to remove optional control statement braces in LLVM C++ code

2021-12-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:3398 +**RemoveBracesLLVM** (``Boolean``) :versionbadge:`clang-format 14` + Remove optional braces of control statements (``if``, ``else``, ``for``, Can we agree on one set

[PATCH] D116351: Update Bug report URL to Github Issues

2021-12-29 Thread Louis Dionne via Phabricator via cfe-commits
ldionne accepted this revision as: libc++, libunwind. ldionne added a comment. Libc++ and libunwind changes LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116351/new/ https://reviews.llvm.org/D116351 ___ cfe-commits mailing list cfe-commi

[PATCH] D116369: [clang][dataflow] Add parameterized map lattice.

2021-12-29 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev added a comment. It seems unnecessary to deal with AST elements in the tests for `MapLattice`. I think testing it with integer or string keys would be simpler. Given that `VarMapLattice` is just an alias, I don't think it's necessary to add dedicated tests for it. What do you think? =

[PATCH] D116368: [clang][dataflow] Add transfer function for VarDecl statements

2021-12-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Nice! A few small comments on the headers... Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h:56 + + /// Assigns `Loc` to `D`. + /// The term "assignment" is overloaded. :) Maybe instead "Associates `

[PATCH] D116351: Update Bug report URL to Github Issues

2021-12-29 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked 7 inline comments as done. ChuanqiXu added inline comments. Comment at: clang/www/c_status.html:76 +The https://bugs.llvm.org/";>LLVM bug tracker and +https://github.com/llvm/llvm-project/issues/";>LLVM Issues contain +a Clang C component that tracks known bugs

[PATCH] D116351: Update Bug report URL to Github Issues

2021-12-29 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 396509. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116351/new/ https://reviews.llvm.org/D116351 Files: clang-tools-extra/docs/clang-doc.rst clang/docs/CommandGuide/clang.rst clang/www/c_status

[PATCH] D116351: Update Bug report URL to Github Issues

2021-12-29 Thread Anton Korobeynikov via Phabricator via cfe-commits
asl requested changes to this revision. asl added a comment. This revision now requires changes to proceed. Will you please check the comments and reword everything using proper terminology and new things we're having on GitHub? Comment at: clang/www/c_status.html:76 +The http

[PATCH] D116351: Update Bug report URL to Github Issues

2021-12-29 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 396498. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116351/new/ https://reviews.llvm.org/D116351 Files: clang-tools-extra/docs/clang-doc.rst clang/docs/CommandGuide/clang.rst clang/www/c_status

[PATCH] D116351: Update Bug report URL to Github Issues

2021-12-29 Thread Anton Korobeynikov via Phabricator via cfe-commits
asl requested changes to this revision. asl added a subscriber: tstellar. asl added a comment. This revision now requires changes to proceed. Thanks for doing this! I added few notes on the way. Comment at: clang/www/c_status.html:76 +The https://bugs.llvm.org/";>LLVM bug track

[PATCH] D116351: Update Bug report URL to Github Issues

2021-12-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Herald added a subscriber: JDevlieghere. Comment at: llvm/docs/DeveloperPolicy.rst:64 +.. FIXME: Edit for LLVM Issues in Github. + You can drop this and let others fix this paragraph. Repository: rG LLVM Github Monorepo CHANG

[PATCH] D116351: Update Bug report URL to Github Issues

2021-12-29 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: aaron.ballman, asl. Herald added subscribers: libcxx-commits, ormris, arphaman, mgorny. Herald added a reviewer: alexander-shaposhnikov. Herald added a reviewer: MaskRay. Herald added a project: libunwind. Herald added a reviewer: libunwin

[PATCH] D72326: [clang-format] Add option to explicitly specify a config file

2021-12-29 Thread Zhao Wei Liew via Phabricator via cfe-commits
zwliew added a comment. Thanks for the review. I've moved the unrelated change to https://reviews.llvm.org/D116371 instead. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72326/new/ https://reviews.llvm.org/D72326 ___ cfe-commits mailing list

[PATCH] D72326: [clang-format] Add option to explicitly specify a config file

2021-12-29 Thread Zhao Wei Liew via Phabricator via cfe-commits
zwliew updated this revision to Diff 396519. zwliew retitled this revision from "[clang-format] Rebased on master: Add option to specify explicit config file" to "[clang-format] Add option to explicitly specify a config file". zwliew edited the summary of this revision. zwliew added a comment. A

[PATCH] D116370: [clang][dataflow] Add multi-variable constant propagation example.

2021-12-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, gribozavr2, sgatev. Herald added subscribers: rnkovacs, mgorny. ymandel requested review of this revision. Herald added a project: clang. Adds another constant-propagation analysis that covers all variables in the scope (vs the exi

[PATCH] D116369: [clang][dataflow] Add parameterized map lattice.

2021-12-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, gribozavr2, sgatev. Herald added subscribers: rnkovacs, mgorny. ymandel requested review of this revision. Herald added a project: clang. This patchs adds a `MapLattice` template for lifting a lattice to a keyed map. A typical use

[PATCH] D116368: [clang][dataflow] Add transfer function for VarDecl statements

2021-12-29 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev updated this revision to Diff 396516. sgatev added a comment. Minor changes to names and comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116368/new/ https://reviews.llvm.org/D116368 Files: clang/include/clang/Analysis/FlowSensitiv

[PATCH] D116290: [clang-format] Add enforcement of consistent `class`/typename` keyword for template arguments

2021-12-29 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/lib/Format/TemplateArgumentKeywordFixer.cpp:55 +// For `auto` language version, be conservative and assume we are < C++17 +KeepTemplateTemplateKW = (Style.Standard == FormatStyle::LS_Auto) || +

[clang] 52e8f58 - [SYCL] Diagnose uses of zero length arrays

2021-12-29 Thread Mariya Podchishchaeva via cfe-commits
Author: Mariya Podchishchaeva Date: 2021-12-29T15:30:18+03:00 New Revision: 52e8f58d49e63aaf6f4c1682bb787bcbfd240009 URL: https://github.com/llvm/llvm-project/commit/52e8f58d49e63aaf6f4c1682bb787bcbfd240009 DIFF: https://github.com/llvm/llvm-project/commit/52e8f58d49e63aaf6f4c1682bb787bcbfd2400

[PATCH] D114080: [SYCL] Diagnose uses of zero length arrays

2021-12-29 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG52e8f58d49e6: [SYCL] Diagnose uses of zero length arrays (authored by Fznamznon). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114080/new/ https://reviews.

[clang] 3ad32df - Fix lit feature name in 9dc4af327b12d

2021-12-29 Thread via cfe-commits
Author: Sam McCall Date: 2021-12-29T13:18:11+01:00 New Revision: 3ad32df72eb2063ba45ec2956a815e1bbb6e6012 URL: https://github.com/llvm/llvm-project/commit/3ad32df72eb2063ba45ec2956a815e1bbb6e6012 DIFF: https://github.com/llvm/llvm-project/commit/3ad32df72eb2063ba45ec2956a815e1bbb6e6012.diff LO

[clang] 9dc4af3 - Re-land "[clang] Add early exit when checking for const init of arrays."

2021-12-29 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2021-12-29T13:07:30+01:00 New Revision: 9dc4af327b12dfbcf90fde1641cd649c6814bf98 URL: https://github.com/llvm/llvm-project/commit/9dc4af327b12dfbcf90fde1641cd649c6814bf98 DIFF: https://github.com/llvm/llvm-project/commit/9dc4af327b12dfbcf90fde1641cd649c6814bf98.diff LO

[PATCH] D116368: [clang][dataflow] Add transfer function for VarDecl statements

2021-12-29 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev created this revision. sgatev added reviewers: ymandel, xazax.hun, gribozavr2. Herald added subscribers: rnkovacs, mgorny. sgatev requested review of this revision. Herald added a project: clang. This is part of the implementation of the dataflow analysis framework. See "[RFC] A dataflow an

[PATCH] D72326: [clang-format] Rebased on master: Add option to specify explicit config file

2021-12-29 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. Oh, and please rename the patch before landing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72326/new/ https://reviews.llvm.org/D72326 ___ cfe-commits mailing list cfe-commits

[PATCH] D72326: [clang-format] Rebased on master: Add option to specify explicit config file

2021-12-29 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM but please wait for the green light from other involved reviewers. Also, as noted in a comment, I'd like to see unrelated changes in a different patch (unless you convince me that it's

[PATCH] D116314: [clang-format] Add style to separate definition blocks

2021-12-29 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius requested changes to this revision. curdeius added a comment. This revision now requires changes to proceed. Nice job. Some minor comments. Please don't forget to reformat too. Comment at: clang/docs/ClangFormatStyleOptions.rst:3415 + + SeparateDefinitions + Ne

[PATCH] D108694: [RISCV] Add the zvl extension according to the v1.0 spec

2021-12-29 Thread Yueh-Ting Chen via Phabricator via cfe-commits
eopXD added inline comments. Comment at: llvm/lib/Support/RISCVISAInfo.cpp:741-751 +{{"zvl1024b"}, {ImpliedExtsZvl1024b}}, +{{"zvl128b"}, {ImpliedExtsZvl128b}}, +{{"zvl16384b"}, {ImpliedExtsZvl16384b}}, +{{"zvl2048b"}, {ImpliedExtsZvl2048b}}, +{{"zvl256b"}, {I

[PATCH] D108694: [RISCV] Add the zvl extension according to the v1.0 spec

2021-12-29 Thread Yueh-Ting Chen via Phabricator via cfe-commits
eopXD updated this revision to Diff 396505. eopXD added a comment. Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108694/new/ https://reviews.llvm.org/D108694 Files: clang/lib/Basic/Targets/RISCV.cpp clang/test/Driver/riscv-arch.c cla

[PATCH] D116318: [clang-format][NFC] Fix a bug in getPreviousToken() in the parser

2021-12-29 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. On another note, you can fix the comment typo without a review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116318/new/ https://reviews.llvm.org/D116318 ___ cfe-commits mailin

[PATCH] D116318: [clang-format][NFC] Fix a bug in getPreviousToken() in the parser

2021-12-29 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. I'm in the same position as @hazardyknusperkeks. If you need something to simplify the code you can add a helper `getPreviousTokenOrNull` or something like that in your patch. But we certainly don't want to pay for the `if` check each time we call `getPreviousToken`.

[PATCH] D108694: [RISCV] Add the zvl extension according to the v1.0 spec

2021-12-29 Thread Shao-Ce SUN via Phabricator via cfe-commits
achieveartificialintelligence added inline comments. Comment at: llvm/lib/Support/RISCVISAInfo.cpp:741-751 +{{"zvl1024b"}, {ImpliedExtsZvl1024b}}, +{{"zvl128b"}, {ImpliedExtsZvl128b}}, +{{"zvl16384b"}, {ImpliedExtsZvl16384b}}, +{{"zvl2048b"}, {ImpliedExtsZvl2048b}

[PATCH] D108694: [RISCV] Add the zvl extension according to the v1.0 spec

2021-12-29 Thread Yueh-Ting Chen via Phabricator via cfe-commits
eopXD added a comment. Ping, thank you. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108694/new/ https://reviews.llvm.org/D108694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[PATCH] D116316: [clang-format] Add an experimental option to remove optional control statement braces in LLVM C++ code

2021-12-29 Thread Owen Pan via Phabricator via cfe-commits
owenpan marked 2 inline comments as done. owenpan added a comment. In D116316#3211269 , @curdeius wrote: > Could you have a look at preceding reviews and see if there wasn't a similar > patch before? I conversed

[clang] 8de2d06 - [clang] Fix crash in bug52905

2021-12-29 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2021-12-29T16:22:26+08:00 New Revision: 8de2d06251c30751bdc0fd7b89133610797759e6 URL: https://github.com/llvm/llvm-project/commit/8de2d06251c30751bdc0fd7b89133610797759e6 DIFF: https://github.com/llvm/llvm-project/commit/8de2d06251c30751bdc0fd7b89133610797759e6.diff LO

[PATCH] D116316: [clang-format] Add an experimental option to remove optional control statement braces in LLVM C++ code

2021-12-29 Thread Owen Pan via Phabricator via cfe-commits
owenpan marked 4 inline comments as done. owenpan added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2173 +void UnwrappedLineParser::KeepAncestorBraces() { + const int MaxNestingLevels = 2; + const int Size = NestedTooDeep.size(); Hazar

[clang] b468281 - [clang] Fix header guards (NFC)

2021-12-29 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2021-12-29T00:16:40-08:00 New Revision: b4682816bc6e35fb4e207227f73b88b2603d4363 URL: https://github.com/llvm/llvm-project/commit/b4682816bc6e35fb4e207227f73b88b2603d4363 DIFF: https://github.com/llvm/llvm-project/commit/b4682816bc6e35fb4e207227f73b88b2603d4363.diff L

[PATCH] D116316: [clang-format] Add an experimental option to remove optional control statement braces in LLVM C++ code

2021-12-29 Thread Owen Pan via Phabricator via cfe-commits
owenpan updated this revision to Diff 396493. owenpan added a comment. Addresses review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116316/new/ https://reviews.llvm.org/D116316 Files: clang/docs/ClangFormatStyleOptions.rst clang/include/clang/Format/Format.h clang/lib