[PATCH] D119656: [Driver][DragonFly] -r: imply -nostdlib like GCC

2022-02-12 Thread Brad Smith via Phabricator via cfe-commits
brad created this revision. brad added a reviewer: MaskRay. brad requested review of this revision. Herald added a project: clang. Similar to D116843 for Gnu.cpp Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D119656 Files: clang/lib/Driver/

[PATCH] D119655: [Driver][NetBSD] -r: imply -nostdlib like GCC

2022-02-12 Thread Brad Smith via Phabricator via cfe-commits
brad created this revision. brad added a reviewer: MaskRay. brad requested review of this revision. Herald added a project: clang. Similar to D116843 for Gnu.cpp Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D119655 Files: clang/lib/Driver/

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-02-12 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 408235. LegalizeAdulthood added a comment. - Move small methods to class decl CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117522/new/ https://reviews.llvm.org/D117522 Files: clang-tools-extra/clang-tidy/modernize/CMakeLists.txt clan

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-02-12 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 408233. LegalizeAdulthood added a comment. - clang-format CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117522/new/ https://reviews.llvm.org/D117522 Files: clang-tools-extra/clang-tidy/modernize/CMakeLists.txt clang-tools-extra/clang-

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-02-12 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 408231. LegalizeAdulthood added a comment. Herald added subscribers: kbarton, nemanjai. - Rejects macros that are used in preprocessor conditionals - cppcoreguidelines-macro-to-enum is an alias for modernize-macro-to-enum - Document alias CHANGES S

[PATCH] D119651: [clang] Fix evaluation context type for consteval function calls in instantiations

2022-02-12 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a subscriber: cor3ntin. erichkeane added a comment. I'm pretty sure @cor3ntin just messed with this quite a bit, so I'd like to hear his thoughts on this. But this generally looks right on first blush. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[PATCH] D119646: [clang] Allow consteval functions in default arguments

2022-02-12 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/AST/Decl.cpp:2816 if (auto *E = dyn_cast_or_null(Arg)) -return E->getSubExpr(); +if (!isa(E)) + return E->getSubExpr(); So what is happening here? I would still expect us to give the proper

[PATCH] D119601: [analyzer] Refactor makeNull to makeNullWithWidth

2022-02-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. > steakhal performed systems testing across a large set of open source projects. I'm curious if any findings there caused you to make changes in the patch. If so it'd be great to reduce them into test cases so that other people didn't make the same mistake when they edit yo

[PATCH] D116261: [Clang][OpenMP] Add support for compare capture in parser

2022-02-12 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 408226. tianshilei1992 marked an inline comment as done. tianshilei1992 added a comment. add tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116261/new/ https://reviews.llvm.org/D116261 Files: cla

[PATCH] D119597: [clang-format][NFC] Give State.Stack.back() a meaningful name

2022-02-12 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks updated this revision to Diff 408222. HazardyKnusperkeks marked an inline comment as done. HazardyKnusperkeks added a comment. This revision is now accepted and ready to land. Added const CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119597/new/ https://reviews.llvm.o

[PATCH] D119138: [clang-format] Further improve support for requires expressions

2022-02-12 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks marked 3 inline comments as done. HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2835-2841 + // FIXME: We need an annotation on the paren to really know if it is a + // function call: + // ... foo()

[PATCH] D119138: [clang-format] Further improve support for requires expressions

2022-02-12 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks updated this revision to Diff 408221. HazardyKnusperkeks added a comment. New approach for identifying the expressions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119138/new/ https://reviews.llvm.org/D119138 Files: clang/lib/Format/UnwrappedLineParser.cpp clan

[PATCH] D119651: [clang] Fix evaluation context type for consteval function calls in instantiations

2022-02-12 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron updated this revision to Diff 408220. Izaron added a comment. (Fast test comment 80 character line fix) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119651/new/ https://reviews.llvm.org/D119651 Files: clang/lib/Sema/SemaTemplateInstantia

[PATCH] D119651: [clang] Fix evaluation context type for consteval function calls in instantiations

2022-02-12 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron created this revision. Izaron added reviewers: aaron.ballman, erichkeane, rsmith. Izaron requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When instantiating a VarDecl initializing sub-AST, the evaluation context was only PotentiallyEv

[PATCH] D119648: [clang-format] Fix PointerAlignment within lambdas in a multi-variable declaration statement.

2022-02-12 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:8415-8417 + verifyFormat("if (int *p, *q; p != q) {\n p = p->next;\n}", Style); + verifyFormat("/*comment*/ if (int *p, *q; p != q) {\n p = p->next;\n}", + Style);

[PATCH] D116261: [Clang][OpenMP] Add support for compare capture in parser

2022-02-12 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 marked 3 inline comments as done. tianshilei1992 added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:11320 + bool MutexClauseEncountered = false; + llvm::SmallSet EncounteredAtomicKinds; for (const OMPClause *C : Clauses) { ABatae

[PATCH] D116261: [Clang][OpenMP] Add support for compare capture in parser

2022-02-12 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:11320 + bool MutexClauseEncountered = false; + llvm::SmallSet EncounteredAtomicKinds; for (const OMPClause *C : Clauses) { ABataev wrote: > tianshilei1992 wrote: > > ABataev wrote: > >

[PATCH] D116261: [Clang][OpenMP] Add support for compare capture in parser

2022-02-12 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:11320 + bool MutexClauseEncountered = false; + llvm::SmallSet EncounteredAtomicKinds; for (const OMPClause *C : Clauses) { tianshilei1992 wrote: > ABataev wrote: > > tianshilei1992 wrot

[PATCH] D116261: [Clang][OpenMP] Add support for compare capture in parser

2022-02-12 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 marked 2 inline comments as done. tianshilei1992 added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:11320 + bool MutexClauseEncountered = false; + llvm::SmallSet EncounteredAtomicKinds; for (const OMPClause *C : Clauses) { ABatae

[PATCH] D119613: [OpenMP] Add support for CPU offloading in new driver

2022-02-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 408218. jhuber6 added a comment. Fixing LTO. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119613/new/ https://reviews.llvm.org/D119613 Files: clang/lib/Driver/ToolChains/Clang.cpp clang/tools/clang-linker

[PATCH] D119650: [clang-format] Handle PointerAlignment in `if` statements with initializers (C++17) the same way as in `for` loops.

2022-02-12 Thread Owen Pan via Phabricator via cfe-commits
owenpan accepted this revision. owenpan added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Format/TokenAnnotator.cpp:31 +/// with an initializer. +static bool startsWithStatementWithInitializer(const AnnotatedLine &Line) { + return Line

[PATCH] D116261: [Clang][OpenMP] Add support for compare capture in parser

2022-02-12 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:11320 + bool MutexClauseEncountered = false; + llvm::SmallSet EncounteredAtomicKinds; for (const OMPClause *C : Clauses) { tianshilei1992 wrote: > ABataev wrote: > > tianshilei1992 wrot

[PATCH] D116261: [Clang][OpenMP] Add support for compare capture in parser

2022-02-12 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 marked 2 inline comments as done. tianshilei1992 added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:11320 + bool MutexClauseEncountered = false; + llvm::SmallSet EncounteredAtomicKinds; for (const OMPClause *C : Clauses) { ABatae

[PATCH] D116261: [Clang][OpenMP] Add support for compare capture in parser

2022-02-12 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:11320 + bool MutexClauseEncountered = false; + llvm::SmallSet EncounteredAtomicKinds; for (const OMPClause *C : Clauses) { tianshilei1992 wrote: > ABataev wrote: > > SmallVector with 2

[PATCH] D119599: Add option to align compound assignments like `+=`

2022-02-12 Thread sstwcw via Phabricator via cfe-commits
sstwcw added inline comments. Comment at: clang/include/clang/Format/Format.h:157 + /// a &= 2; + /// bbb = 2; + /// HazardyKnusperkeks wrote: > sstwcw wrote: > > HazardyKnusperkeks wrote: > > > curdeius wrote: > > > > I guess it would be complicated to

[PATCH] D119649: [clang-format] Correctly format loops and `if` statements even if preceded with comments.

2022-02-12 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:379 if (NextLine.First->is(tok::l_brace)) { if ((TheLine->First->isOneOf(tok::kw_if, tok::kw_else, tok::kw_while, tok::kw_for, tok::kw_switch, t

[PATCH] D116261: [Clang][OpenMP] Add support for compare capture in parser

2022-02-12 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 marked an inline comment as done. tianshilei1992 added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:11320 + bool MutexClauseEncountered = false; + llvm::SmallSet EncounteredAtomicKinds; for (const OMPClause *C : Clauses) { ABatae

[PATCH] D119648: [clang-format] Fix PointerAlignment within lambdas in a multi-variable declaration statement.

2022-02-12 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius updated this revision to Diff 408217. curdeius added a comment. This revision is now accepted and ready to land. Split from and rebase on top of D119650 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D11964

[PATCH] D118632: [Clang]OpenMP] Add the codegen support for `atomic compare`

2022-02-12 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118632/new/ https://reviews.llvm.org/D118632 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[PATCH] D119650: [clang-format] Handle PointerAlignment in `if` statements with initializers (C++17) the same way as in `for` loops.

2022-02-12 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius created this revision. curdeius added reviewers: MyDeveloperDay, HazardyKnusperkeks, owenpan. curdeius requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Depends on D119649 Repository: rG LLVM Gi

[PATCH] D119392: [Clang][OpenMP][Sema] Remove support for floating point values in atomic compare

2022-02-12 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119392/new/ https://reviews.llvm.org/D119392 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[PATCH] D119649: [clang-format] Correctly format loops and `if` statements even if preceded with comments.

2022-02-12 Thread sstwcw via Phabricator via cfe-commits
sstwcw added inline comments. Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:379 if (NextLine.First->is(tok::l_brace)) { if ((TheLine->First->isOneOf(tok::kw_if, tok::kw_else, tok::kw_while, tok::kw_for, tok::kw_switch, tok

[PATCH] D119648: [clang-format] Fix PointerAlignment within lambdas in a multi-variable declaration statement.

2022-02-12 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius planned changes to this revision. curdeius added a comment. In D119648#3317212 , @owenpan wrote: > Does any C++ standard support init statements in `while` loops? Argh, I initially thought about `if` statements and then somehow my brain turned

[PATCH] D119648: [clang-format] Fix PointerAlignment within lambdas in a multi-variable declaration statement.

2022-02-12 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. Does any C++ standard support init statements in `while` loops? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119648/new/ https://reviews.llvm.org/D119648 ___ cfe-commits mailing

[PATCH] D119649: [clang-format] Correctly format loops even if preceded with comments.

2022-02-12 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius updated this revision to Diff 408215. curdeius added a comment. Test ifs and FOREACH loops. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119649/new/ https://reviews.llvm.org/D119649 Files: clang/lib/Format/UnwrappedLineFormatter.cpp

[PATCH] D119621: [SanitizerCoverage] Add instrumentation callbacks for FP cmp instructions

2022-02-12 Thread Chaofan Shou via Phabricator via cfe-commits
shouc updated this revision to Diff 408214. shouc added a comment. Add support for dfsan CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119621/new/ https://reviews.llvm.org/D119621 Files: clang/docs/SanitizerCoverage.rst compiler-rt/lib/dfsan/dfsan_custom.cpp compiler-rt/lib/dfsan

[PATCH] D119648: [clang-format] Fix PointerAlignment within lambdas in a multi-variable declaration statement.

2022-02-12 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. In D119648#3317188 , @HazardyKnusperkeks wrote: > What about if? True, I need to fix them in D119649 too. And I think that I'll split the fix for while loops from this revision. Repository:

[PATCH] D119648: [clang-format] Fix PointerAlignment within lambdas in a multi-variable declaration statement.

2022-02-12 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius updated this revision to Diff 408213. curdeius added a comment. Rebase on top of D119649 , add a similar case with a leading comment. Without it, there would be a different spacing of multi-variable initializers in loops, e.g. (-expected, +incorrect):

[PATCH] D119648: [clang-format] Fix PointerAlignment within lambdas in a multi-variable declaration statement.

2022-02-12 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. This revision is now accepted and ready to land. What about if? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119648/new/ https://reviews.llvm.org/D119648 _

[PATCH] D119649: [clang-format] Correctly format loops even if preceded with comments.

2022-02-12 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius created this revision. curdeius added reviewers: MyDeveloperDay, HazardyKnusperkeks, owenpan. curdeius requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes https://github.com/llvm/llvm-project/issues/53758. Braces in loops with l

[clang] 7d5062c - [clang-format] Remove unnecessary parentheses in return statements. NFC.

2022-02-12 Thread Marek Kurdej via cfe-commits
Author: Marek Kurdej Date: 2022-02-12T21:25:52+01:00 New Revision: 7d5062c6ac868537605dd0860b2714aba9ece90d URL: https://github.com/llvm/llvm-project/commit/7d5062c6ac868537605dd0860b2714aba9ece90d DIFF: https://github.com/llvm/llvm-project/commit/7d5062c6ac868537605dd0860b2714aba9ece90d.diff

[PATCH] D119648: [clang-format] Fix PointerAlignment within lambdas in a multi-variable declaration statement.

2022-02-12 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius created this revision. curdeius added reviewers: MyDeveloperDay, HazardyKnusperkeks, owenpan. curdeius requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes https://github.com/llvm/llvm-project/issues/43115. Also, handle while loo

[clang] abe1bb7 - [clang] MicrosoftCXXNameMangler::mangleObjCKindOfType - use castAs<> instead of getAs<> to avoid dereference of nullptr

2022-02-12 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2022-02-12T20:11:21Z New Revision: abe1bb763e3a7ce197f310afbff6112eb605136f URL: https://github.com/llvm/llvm-project/commit/abe1bb763e3a7ce197f310afbff6112eb605136f DIFF: https://github.com/llvm/llvm-project/commit/abe1bb763e3a7ce197f310afbff6112eb605136f.diff LOG:

[PATCH] D119364: Refactor nested if else with ternary operator in CGExprScalar.cpp

2022-02-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. It's nothing to do with your patch, and you don't need to worry about it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119364/new/ https://reviews.llvm.org/D119364 ___ cfe-comm

[PATCH] D119364: Refactor nested if else with ternary operator in CGExprScalar.cpp

2022-02-12 Thread Shivam Rajput via Phabricator via cfe-commits
phyBrackets added a comment. Hey @rjmccall , would you tell me about this build fail https://green.lab.llvm.org/green/job/lldb-cmake/41339/ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119364/new/ https://reviews.llvm.org/D119364 ___

[clang-tools-extra] 5d1e3ed - [clang-tidy] SimplifyBooleanExprCheck - use cast<> instead of dyn_cast<> to avoid dereference of nullptr

2022-02-12 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2022-02-12T19:59:30Z New Revision: 5d1e3ed3e257535fbd51706023685d2c2d9eba51 URL: https://github.com/llvm/llvm-project/commit/5d1e3ed3e257535fbd51706023685d2c2d9eba51 DIFF: https://github.com/llvm/llvm-project/commit/5d1e3ed3e257535fbd51706023685d2c2d9eba51.diff LOG:

[PATCH] D119638: [OpenMP][NFC] Simplify identifying the device bitcode library

2022-02-12 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa0e8077d285a: [OpenMP][NFC] Simplify identifying the device bitcode library (authored by jhuber6). Changed prior to commit: https://reviews.llvm.org/D119638?vs=408193&id=408208#toc Repository: rG LLV

[clang] a0e8077 - [OpenMP][NFC] Simplify identifying the device bitcode library

2022-02-12 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-02-12T14:55:47-05:00 New Revision: a0e8077d285ad35578677e3e03375cb9f1208e36 URL: https://github.com/llvm/llvm-project/commit/a0e8077d285ad35578677e3e03375cb9f1208e36 DIFF: https://github.com/llvm/llvm-project/commit/a0e8077d285ad35578677e3e03375cb9f1208e36.diff

[PATCH] D119646: [clang] Allow consteval functions in default arguments

2022-02-12 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron created this revision. Izaron added reviewers: aaron.ballman, erichkeane, andreasfertig. Herald added a subscriber: kristof.beyls. Izaron requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. We should not mark a function as "referenced" i

[PATCH] D118070: Make lld-link work in a non-MSVC shell

2022-02-12 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Thanks for the revert! FWIW, also failed on https://ci.chromium.org/ui/p/chromium/builders/try/win_upload_clang/2069/overview / https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8822456541383185105/+/u/package_clang/stdout?format=raw . So maybe it's no

[PATCH] D119364: Refactor nested if else with ternary operator in CGExprScalar.cpp

2022-02-12 Thread Shivam Rajput via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGde4e855204aa: Refactor nested if else with ternary operator in CGExprScalar.cpp (authored by phyBrackets). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1193

[clang] de4e855 - Refactor nested if else with ternary operator in CGExprScalar.cpp

2022-02-12 Thread via cfe-commits
Author: phyBrackets Date: 2022-02-13T00:15:35+05:30 New Revision: de4e855204aab9ecf0507f57341cad9c349b3c49 URL: https://github.com/llvm/llvm-project/commit/de4e855204aab9ecf0507f57341cad9c349b3c49 DIFF: https://github.com/llvm/llvm-project/commit/de4e855204aab9ecf0507f57341cad9c349b3c49.diff L

[PATCH] D119638: [OpenMP][NFC] Simplify identifying the device bitcode library

2022-02-12 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield accepted this revision. JonChesterfield added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:2014 - StringRef ArchPrefix = Triple.isAMDGCN() ? "amdgcn" : "nvptx"; - std::string LibOmpTar

[PATCH] D119638: [OpenMP][NFC] Simplify identifying the device bitcode library

2022-02-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: JonChesterfield, jdoerfert. Herald added subscribers: kerbowa, guansong, yaxunl, jvesely. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. Now that the old device runti

[PATCH] D119599: Add option to align compound assignments like `+=`

2022-02-12 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/include/clang/Format/Format.h:151 + /// When aligning assignments, whether compound assignments like + /// ``+=``'s are aligned along with ``=``'s. sstwcw wrote: > curdeius wrote: > > You need to upd

[PATCH] D119625: Fix integer underflow bug when aligning code in clang-format

2022-02-12 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a reviewer: HazardyKnusperkeks. HazardyKnusperkeks requested changes to this revision. HazardyKnusperkeks added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/Format/WhitespaceManager.cpp:578 } -unsigned Cha

[PATCH] D7982: [clang-tidy] Add readability-duplicate-include check

2022-02-12 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. Thanks for this, it found 74 occurrences of this in the firefox code base https://hg.mozilla.org/mozilla-central/rev/b07f125d09fd Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7982/new/ https://reviews.llvm.org/D798

[PATCH] D119599: Add option to align compound assignments like `+=`

2022-02-12 Thread sstwcw via Phabricator via cfe-commits
sstwcw added inline comments. Comment at: clang/lib/Format/WhitespaceManager.cpp:273 AlignTokenSequence(const FormatStyle &Style, unsigned Start, unsigned End, - unsigned Column, F &&Matches, + unsigned Column, unsigned AnchorWidth, F &&Matche

[PATCH] D119599: Add option to align compound assignments like `+=`

2022-02-12 Thread sstwcw via Phabricator via cfe-commits
sstwcw updated this revision to Diff 408177. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119599/new/ https://reviews.llvm.org/D119599 Files: clang/docs/ClangFormatStyleOptions.rst clang/include/clang/Format/Format.h clang/lib/Format/Format.c

[PATCH] D119597: [clang-format][NFC] Give State.Stack.back() a meaningful name

2022-02-12 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. @HazardyKnusperkeks agreed, I'm fine with this approach (especially on what is one of the more confusing parts of clang-format) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119597/new/ https://reviews.llvm.org/D119

[PATCH] D119599: Add option to align compound assignments like `+=`

2022-02-12 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay requested changes to this revision. MyDeveloperDay added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/Format/WhitespaceManager.cpp:273 AlignTokenSequence(const FormatStyle &Style, unsigned Start, unsigned End, -

[PATCH] D113372: [Driver] Add CLANG_DEFAULT_PIE_ON_LINUX to emulate GCC --enable-default-pie

2022-02-12 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. When enabled, this seems to break a fair number of tests: Clang :: CodeGen/mips-vector-return.c Clang :: Driver/hexagon-toolchain-elf.c Clang :: Driver/hip-fpie-option.hip Clang :: Driver/mips-cs.cpp Clang :: Driver/mips-fsf.cpp Clang :: Driver/mips-img-v2.cpp

[PATCH] D119599: Add option to align compound assignments like `+=`

2022-02-12 Thread sstwcw via Phabricator via cfe-commits
sstwcw updated this revision to Diff 408172. sstwcw marked an inline comment as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119599/new/ https://reviews.llvm.org/D119599 Files: clang/docs/ClangFormatStyleOptions.rst clang/include/clang/Fo

[PATCH] D119599: Add option to align compound assignments like `+=`

2022-02-12 Thread sstwcw via Phabricator via cfe-commits
sstwcw marked 6 inline comments as done. sstwcw added inline comments. Comment at: clang/include/clang/Format/Format.h:151 + /// When aligning assignments, whether compound assignments like + /// ``+=``'s are aligned along with ``=``'s. curdeius wrote: > You

[PATCH] D119625: Fix integer underflow bug when aligning code in clang-format

2022-02-12 Thread sstwcw via Phabricator via cfe-commits
sstwcw added a comment. This isolates the problem that changes the unit test mentioned in https://reviews.llvm.org/D119599. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119625/new/ https://reviews.llvm.org/D119625 ___

[PATCH] D119625: Fix integer underflow bug when aligning code in clang-format

2022-02-12 Thread sstwcw via Phabricator via cfe-commits
sstwcw created this revision. sstwcw added a reviewer: clang-format. sstwcw added a project: clang-format. sstwcw requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D119625 Files

[clang-tools-extra] 2188e61 - [clang-doc] populateParentNamespaces - use cast<> instead of dyn_cast<> to avoid dereference of nullptr

2022-02-12 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2022-02-12T11:28:50Z New Revision: 2188e61691ad89e27583fd3a4197322be830df59 URL: https://github.com/llvm/llvm-project/commit/2188e61691ad89e27583fd3a4197322be830df59 DIFF: https://github.com/llvm/llvm-project/commit/2188e61691ad89e27583fd3a4197322be830df59.diff LOG:

[clang-tools-extra] 7ad94bd - [clang-tidy] ContainerSizeEmptyCheck::check - simplify isa<> and dyn_cast<> repeated calls

2022-02-12 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2022-02-12T11:31:27Z New Revision: 7ad94bd74bb5e2c984f541bc1921a9eda73ed973 URL: https://github.com/llvm/llvm-project/commit/7ad94bd74bb5e2c984f541bc1921a9eda73ed973 DIFF: https://github.com/llvm/llvm-project/commit/7ad94bd74bb5e2c984f541bc1921a9eda73ed973.diff LOG:

[clang] fbe0ca5 - [clang][sema] checkNoThrow - use cast<> instead of dyn_cast<> to avoid dereference of nullptr

2022-02-12 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2022-02-12T11:18:49Z New Revision: fbe0ca576d2b96c523182200529b5afbf709506f URL: https://github.com/llvm/llvm-project/commit/fbe0ca576d2b96c523182200529b5afbf709506f DIFF: https://github.com/llvm/llvm-project/commit/fbe0ca576d2b96c523182200529b5afbf709506f.diff LOG:

[clang] f0f4452 - [clang][sema] Sema::CheckFreeArguments - use cast<> instead of dyn_cast<> to avoid dereference of nullptr

2022-02-12 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2022-02-12T11:17:02Z New Revision: f0f4452ed488bc7d9c3b9693dc110f1107921a08 URL: https://github.com/llvm/llvm-project/commit/f0f4452ed488bc7d9c3b9693dc110f1107921a08 DIFF: https://github.com/llvm/llvm-project/commit/f0f4452ed488bc7d9c3b9693dc110f1107921a08.diff LOG:

[clang] 5e27487 - [clang][sema] TryStaticCast - use castAs<> instead of getAs<> to avoid dereference of nullptr

2022-02-12 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2022-02-12T11:14:19Z New Revision: 5e27487fc992cece0d703f0bd83480381764b77b URL: https://github.com/llvm/llvm-project/commit/5e27487fc992cece0d703f0bd83480381764b77b DIFF: https://github.com/llvm/llvm-project/commit/5e27487fc992cece0d703f0bd83480381764b77b.diff LOG:

[clang-tools-extra] 869c066 - [clang-tidy] RedundantControlFlowCheck::issueDiagnostic - use cast<> instead of dyn_cast<> to avoid dereference of nullptr

2022-02-12 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2022-02-12T11:05:59Z New Revision: 869c066ca8a4231b950b5367f90758de0c6768a3 URL: https://github.com/llvm/llvm-project/commit/869c066ca8a4231b950b5367f90758de0c6768a3 DIFF: https://github.com/llvm/llvm-project/commit/869c066ca8a4231b950b5367f90758de0c6768a3.diff LOG:

[clang-tools-extra] 9acba52 - [clang-tidy] FunctionASTVisitor::TraverseStmt - use cast<> instead of dyn_cast<> to avoid dereference of nullptr

2022-02-12 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2022-02-12T11:04:20Z New Revision: 9acba5206a91d735bc56ba41f18eabfc81db0513 URL: https://github.com/llvm/llvm-project/commit/9acba5206a91d735bc56ba41f18eabfc81db0513 DIFF: https://github.com/llvm/llvm-project/commit/9acba5206a91d735bc56ba41f18eabfc81db0513.diff LOG:

[clang-tools-extra] ed5d659 - [clang-tidy] NoexceptMoveConstructorCheck::check - use castAs<> instead of getAs<> to avoid dereference of nullptr

2022-02-12 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2022-02-12T10:57:09Z New Revision: ed5d659038362d6ccfebad3d9b7e10e73e681196 URL: https://github.com/llvm/llvm-project/commit/ed5d659038362d6ccfebad3d9b7e10e73e681196 DIFF: https://github.com/llvm/llvm-project/commit/ed5d659038362d6ccfebad3d9b7e10e73e681196.diff LOG:

[clang-tools-extra] 99acc0d - [clang-tidy] UseNoexceptCheck::check - use cast<> instead of dyn_cast<> to avoid dereference of nullptr

2022-02-12 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2022-02-12T10:51:48Z New Revision: 99acc0dc6434373dc391ac4c89f6ae6b72ec7208 URL: https://github.com/llvm/llvm-project/commit/99acc0dc6434373dc391ac4c89f6ae6b72ec7208 DIFF: https://github.com/llvm/llvm-project/commit/99acc0dc6434373dc391ac4c89f6ae6b72ec7208.diff LOG:

[clang-tools-extra] 003e038 - [clang-tidy] getOutermostNamespace - remove redundant nullptr check

2022-02-12 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2022-02-12T10:49:54Z New Revision: 003e0382647fa311e1bd48bc5298a3182d6f2552 URL: https://github.com/llvm/llvm-project/commit/003e0382647fa311e1bd48bc5298a3182d6f2552 DIFF: https://github.com/llvm/llvm-project/commit/003e0382647fa311e1bd48bc5298a3182d6f2552.diff LOG:

[clang-tools-extra] 5bc13f9 - [clang-tidy] ProBoundsConstantArrayIndexCheck::check - use cast<> instead of dyn_cast<> to avoid dereference of nullptr

2022-02-12 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2022-02-12T10:43:21Z New Revision: 5bc13f9d9471adc81c8bf2b62775b6e2fd72f8e6 URL: https://github.com/llvm/llvm-project/commit/5bc13f9d9471adc81c8bf2b62775b6e2fd72f8e6 DIFF: https://github.com/llvm/llvm-project/commit/5bc13f9d9471adc81c8bf2b62775b6e2fd72f8e6.diff LOG:

[clang-tools-extra] 389bee7 - [clang-tidy] checkOverridingFunctionReturnType - use castAs<> instead of getAs<> to avoid dereference of nullptr

2022-02-12 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2022-02-12T10:41:43Z New Revision: 389bee71ea71bf5a36e3786d3f60d3aa62e30be3 URL: https://github.com/llvm/llvm-project/commit/389bee71ea71bf5a36e3786d3f60d3aa62e30be3 DIFF: https://github.com/llvm/llvm-project/commit/389bee71ea71bf5a36e3786d3f60d3aa62e30be3.diff LOG:

[PATCH] D119597: [clang-format][NFC] Give State.Stack.back() a meaningful name

2022-02-12 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D119597#3316643 , @MyDeveloperDay wrote: > I like this change for clarity reasons, my only concern and it's not based on > evidence is what if any of these functions get passed in State, and then they > themselves

[PATCH] D119599: Add option to align compound assignments like `+=`

2022-02-12 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/include/clang/Format/Format.h:157 + /// a &= 2; + /// bbb = 2; + /// curdeius wrote: > I guess it would be complicated to avoid adding an additional space here. I > mean, it could be: > ``` >

[PATCH] D119599: Add option to align compound assignments like `+=`

2022-02-12 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/lib/Format/WhitespaceManager.cpp:468 + // Widths of the aligned text. + // The part to the left of the anchor. For right-justified assignment + // operators, this includes the initial space before the sign but not ---

[PATCH] D119599: Add option to align compound assignments like `+=`

2022-02-12 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/include/clang/Format/Format.h:163 + /// \endcode + bool AlignCompoundAssignments; + This option is not independent of `AlignConsecutiveAssignments` is it? this will cause confusion when people turn it on

[PATCH] D112730: [clang-tidy] Add AUTOSAR module

2022-02-12 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Thanks a lot @tonic for your update and for the work done in the last months ! It's indeed very sad to hear the news. It's a pity that the work will probably be duplicated in many local forks with sub-optimal solutions instead of a centralized, high-quality, peer-

[PATCH] D119597: [clang-format][NFC] Give State.Stack.back() a meaningful name

2022-02-12 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I like this change for clarity reasons, my only concern and it's not based on evidence is what if any of these functions get passed in State, and then they themselves alter the State.Stack? In most cases I'd expect CurrentState to always be correct, but doesn't i

[PATCH] D119597: [clang-format][NFC] Give State.Stack.back() a meaningful name

2022-02-12 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks planned changes to this revision. HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:1356 moveStatePastScopeCloser(State); + // Do not use CurrentState here, since the two functions before may change the + // S

[PATCH] D119138: [clang-format] Further improve support for requires expressions

2022-02-12 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks planned changes to this revision. HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2835-2841 + // FIXME: We need an annotation on the paren to really know if it is a + // function call: + // ... foo()

[PATCH] D119599: Add option to align compound assignments like `+=`

2022-02-12 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. Thanks for working on this! Looks pretty good already. Comment at: clang/include/clang/Format/Format.h:151 + /// When aligning assignments, whether compound

[PATCH] D119597: [clang-format][NFC] Give State.Stack.back() a meaningful name

2022-02-12 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 whether you keep it as is or use a pointer. It looks like it would be cool if we had some sort of expression aliases in the language... `using CurrentState = State.Stack.back()`... One

[PATCH] D119597: [clang-format][NFC] Give State.Stack.back() a meaningful name

2022-02-12 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:1514 + auto &CurrentState = State.Stack.back(); + Can you make it `const` here? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D112663: [clang-repl] Allow Interpreter::getSymbolAddress to take a mangled name.

2022-02-12 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev closed this revision. v.g.vassilev added a comment. That change landed in 4fb0805c6525b13e50067b9ddfe8677a0b7b2d7c CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112663/new/ https://reviews.llvm.org/D1126

[PATCH] D119615: [CUDA][HIP] Do not promote constexpr var with non-constant initializer

2022-02-12 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Sema/SemaCUDA.cpp:148-150 + if ((Var->isConstexpr() || Var->getType().isConstQualified()) && + Var->hasAttr() && !hasExplicitAttr(Var)) -