[PATCH] D109621: [clang][Driver] Default to loading clang.cfg if config file not specified

2022-09-15 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. As @sepavloff points out in the linked discussion, we probably need an option to disable loading default configuration files too, and we should use it in the test suite (via modifying the `%clang` substitutions, I guess), as otherwise someone enabling config file support

[PATCH] D133886: [clang][RecoveryExpr] Don't perform alignment check if parameter type contains errors

2022-09-15 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:5779 QualType ParamTy = Proto->getParamType(ArgIdx); +if (ParamTy->containsErrors()) + continue; hokein wrote: > It looks like for the failure case the `ParamTy`

[PATCH] D133757: [clangd] Turn QueryDriverDatabase into a CompileCommandsAdjuster

2022-09-15 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. I think the sticking point for just having `QueryDriverDatabase` run after the entirety of `CommandMangler` is this check in `resolveDriver()`,

[PATCH] D109621: [clang][Driver] Default to loading clang.cfg if config file not specified

2022-09-15 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. On this topic, it would be great if we could pick up a per-target default config file too, if clang is invoked with `clang -target `. Currently this is done automatically if clang is invoked as `-clang`, but not with an explicit `-target` parameter. CHANGES SINCE LAS

[PATCH] D133865: [clang][dataflow] Replace usage of the deprecated overload of `checkDataflow`.

2022-09-15 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev accepted this revision. sgatev added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/TestingSupportTest.cpp:83-88 +AnalysisInputs( +Code, hasName(Target), +[](ASTContext &Co

[PATCH] D133843: [clangd] Prefer definitions for gototype and implementation

2022-09-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D133843#3791127 , @sammccall wrote: > There's no test here, can you describe the cases you expect this to affect > and why the new behavior is better? right, sorry for the obscure patch. giving examples/details in particular

[PATCH] D133341: [C++] [Coroutines] Prefer aligned (de)allocation for coroutines - implement the option2 of P2014R0

2022-09-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 460315. ChuanqiXu marked 6 inline comments as done. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133341/new/ https://reviews.llvm.org/D133341 Files: clang/docs/ReleaseNotes.rst clang/include/clang

[PATCH] D133341: [C++] [Coroutines] Prefer aligned (de)allocation for coroutines - implement the option2 of P2014R0

2022-09-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked 2 inline comments as done. ChuanqiXu added inline comments. Comment at: clang/test/SemaCXX/coroutine-alloc-4.cpp:49 +void return_value(int) {} +void *operator new(std::size_t, std::align_val_t) noexcept; +void *operator new(std::size_t) noexcept;

[PATCH] D133920: [X86][fastcall] Move capability check before free register update

2022-09-15 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added a reviewer: rnk. Herald added a project: All. pengfei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes: #57737 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D133920 File

[PATCH] D133875: [clang] fix generation of .debug_aranges with LTO (resubmit)

2022-09-15 Thread Azat Khuzhin via Phabricator via cfe-commits
azat updated this revision to Diff 460321. azat added a comment. Fix clang-format and tiny test refactoring Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133875/new/ https://reviews.llvm.org/D133875 Files: clang/lib/Driver/ToolChains/CommonArgs.

[PATCH] D133664: [clangd] Fix hover on symbol introduced by using declaration

2022-09-15 Thread Tom Praschan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG220d85082349: [clangd] Fix hover on symbol introduced by using declaration (authored by tom-anders). Changed prior to commit: https://reviews.llvm.org/D133664?vs=460058&id=460328#toc Repository: rG L

[clang-tools-extra] 220d850 - [clangd] Fix hover on symbol introduced by using declaration

2022-09-15 Thread Tom Praschan via cfe-commits
Author: Tom Praschan Date: 2022-09-15T13:02:58+02:00 New Revision: 220d850823494aad48d984395512e2ac74c666de URL: https://github.com/llvm/llvm-project/commit/220d850823494aad48d984395512e2ac74c666de DIFF: https://github.com/llvm/llvm-project/commit/220d850823494aad48d984395512e2ac74c666de.diff

[PATCH] D133664: [clangd] Fix hover on symbol introduced by using declaration

2022-09-15 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. Hmm, Github noticed that I referenced the issue with this commit, but didn't close it. According to https://github.blog/2013-03-18-closing-issues-across-repositories/ closing issues across repos should work, but only if you have push permissions in the repo that has

[PATCH] D133886: [clang][RecoveryExpr] Don't perform alignment check if parameter type contains errors

2022-09-15 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:5779 QualType ParamTy = Proto->getParamType(ArgIdx); +if (ParamTy->containsErrors()) + continue; ArcsinX wrote: > hokein wrote: > > It looks like for the failure c

[PATCH] D133664: [clangd] Fix hover on symbol introduced by using declaration

2022-09-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D133664#3791694 , @tom-anders wrote: > Hmm, Github noticed that I referenced the issue with this commit, but didn't > close it. > According to > https://github.blog/2013-03-18-closing-issues-across-repositories/ closing >

[PATCH] D133924: add clang_CXXMethod_isDeleted function

2022-09-15 Thread Anders Langlands via Phabricator via cfe-commits
anderslanglands created this revision. Herald added a subscriber: arphaman. Herald added a project: All. anderslanglands 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/D133924

[PATCH] D128462: [HLSL] add -I option for dxc mode.

2022-09-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang/include/clang/Driver/Options.td:6362 -def cl_Group : OptionGroup<"">, Flags<[CLOption]>, +def cl_Group : OptionGroup<"">, Flags<[CLDXCOption]>, HelpText<"CL.EXE COMPATIBILITY OPTIONS">; i am failing to unders

[PATCH] D101526: [analyzer][StdLibraryFunctionsChecker] Add NoteTags for applied arg constraints

2022-09-15 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 7 inline comments as done. martong added inline comments. Herald added a project: All. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:156-157 // the bug is reported. -virtual std::string describe(ProgramStateRef State, +v

[PATCH] D101526: [analyzer][StdLibraryFunctionsChecker] Add NoteTags for applied arg constraints

2022-09-15 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 460345. martong marked 2 inline comments as done. martong added a comment. - Rebase - move Msg into the lambda Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101526/new/ https://reviews.llvm.org/D101526 Files:

[PATCH] D101526: [analyzer][StdLibraryFunctionsChecker] Add NoteTags for applied arg constraints

2022-09-15 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Gentle ping @steakhal @NoQ Trying to revive this after a year :) I am sorry it took so long to get back to this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101526/new/ https://reviews.llvm.org/D101526

[PATCH] D133757: [clangd] Turn QueryDriverDatabase into a CompileCommandsAdjuster

2022-09-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D133757#3791485 , @nridge wrote: > I think the sticking point for just having `QueryDriverDatabase` run after > the entirety of `CommandMangler` is this check >

[PATCH] D133924: add clang_CXXMethod_isDeleted function

2022-09-15 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/tools/libclang/CIndex.cpp:8870 + const CXXMethodDecl *Method = + D ? dyn_cast_or_null(D->getAsFunction()) : nullptr; + return (Method && Method->isDeleted()) ? 1 : 0; Repository: rG LLVM Github Monorepo

[PATCH] D133930: [clang][dataflow] Replace `transfer(const Stmt *, ...)` with `transfer(const CFGElement *, ...)` in `Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel`.

2022-09-15 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.l

[PATCH] D133931: [clang][dataflow] Replace `transfer(const Stmt *, ...)` with `transfer(const CFGElement *, ...)` in `clang/Analysis/FlowSensitive`.

2022-09-15 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.l

[PATCH] D133933: [clang][dataflow] Modify `transfer` in `DataflowModel` to take `CFGElement` as input instead of `Stmt`.

2022-09-15 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. To keep API of transfer functions consistent. The singl

[PATCH] D133934: [clang][Interp] Handle sizeof() expressions

2022-09-15 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, shafik, tahonermann. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Handle sizeof expressions. I was a bit unsure here

[PATCH] D133886: [clang][RecoveryExpr] Don't perform alignment check if parameter type contains errors

2022-09-15 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 460358. ArcsinX added a comment. - Check for dependent type inside CheckArgAlignment() - Simplify test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133886/new/ https://reviews.llvm.org/D133886 Files: clang/

[PATCH] D133935: [clang][dataflow] Refactor `clang/Analysis/FlowSensitive/MatchSwitchTest.cpp`.

2022-09-15 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, xazax.hun. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Remove use of `runDataflowAnalysis` to keep test isolated. - Add test for `ASTMatchS

[PATCH] D133886: [clang][RecoveryExpr] Don't perform alignment check if parameter type contains errors

2022-09-15 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX marked 3 inline comments as done. ArcsinX added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:5779 QualType ParamTy = Proto->getParamType(ArgIdx); +if (ParamTy->containsErrors()) + continue; hokein wrote: > ArcsinX

[PATCH] D133930: [clang][dataflow] Replace `transfer(const Stmt *, ...)` with `transfer(const CFGElement *, ...)` in `Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel`.

2022-09-15 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev accepted this revision. sgatev added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h:75 + std::vector + diagnose(ASTContext &Context, const CFGElement *Elt, co

[PATCH] D133886: [clang][RecoveryExpr] Don't perform alignment check if parameter type contains errors

2022-09-15 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133886/new/ https://reviews.llvm.org/D133886

[PATCH] D133933: [clang][dataflow] Modify `transfer` in `DataflowModel` to take `CFGElement` as input instead of `Stmt`.

2022-09-15 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev accepted this revision. sgatev added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h:235 + /// Return value indicates whether the model processed the `Element`. + virtual bool tra

[PATCH] D133935: [clang][dataflow] Refactor `clang/Analysis/FlowSensitive/MatchSwitchTest.cpp`.

2022-09-15 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev accepted this revision. sgatev added inline comments. This revision is now accepted and ready to land. Comment at: clang/unittests/Analysis/FlowSensitive/MatchSwitchTest.cpp:139 TEST(MatchSwitchTest, ReturnNonVoid) { using namespace ast_matchers; Let

[PATCH] D133800: [Clang 15.0.1] Downgrade implicit int and implicit function declaration to warning only

2022-09-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. In D133800#3789377 , @aaron.ballman wrote: > In D133800#3787378 , @thieta wrote: > >> I think the easiest way to handle this is that when you hav

[PATCH] D133771: Add a "Potentially Breaking Changes" section to the Clang release notes

2022-09-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked 3 inline comments as done. aaron.ballman added inline comments. Comment at: clang/docs/ReleaseNotes.rst:52 + into an error-only diagnostic in the next Clang release. Fixes + `Issue 50055: `_. +- ``-Wincompa

[clang] e076680 - Add a "Potentially Breaking Changes" section to the Clang release notes

2022-09-15 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2022-09-15T07:29:49-04:00 New Revision: e076680bd59cec5e98fe05aeb91891a1e5745e5b URL: https://github.com/llvm/llvm-project/commit/e076680bd59cec5e98fe05aeb91891a1e5745e5b DIFF: https://github.com/llvm/llvm-project/commit/e076680bd59cec5e98fe05aeb91891a1e5745e5b.diff

[PATCH] D133771: Add a "Potentially Breaking Changes" section to the Clang release notes

2022-09-15 Thread Aaron Ballman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. aaron.ballman marked an inline comment as done. Closed by commit rGe076680bd59c: Add a "Potentially Breaking Changes" section to the Clang release notes (authored by aaron.ballman). Changed prior to commit: https://review

[PATCH] D133930: [clang][dataflow] Replace `transfer(const Stmt *, ...)` with `transfer(const CFGElement *, ...)` in `Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel`.

2022-09-15 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 460366. wyt marked an inline comment as done. wyt added a comment. Address comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133930/new/ https://reviews.llvm.org/D133930 Files: clang/include/clang/Analysis

[PATCH] D133933: [clang][dataflow] Modify `transfer` in `DataflowModel` to take `CFGElement` as input instead of `Stmt`.

2022-09-15 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 460368. wyt added a comment. Address comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133933/new/ https://reviews.llvm.org/D133933 Files: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h cla

[PATCH] D133935: [clang][dataflow] Refactor `clang/Analysis/FlowSensitive/MatchSwitchTest.cpp`.

2022-09-15 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 460371. wyt added a comment. Address comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133935/new/ https://reviews.llvm.org/D133935 Files: clang/unittests/Analysis/FlowSensitive/MatchSwitchTest.cpp Index:

[PATCH] D133937: [mlir] Remove the unused source file.

2022-09-15 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: Groverkss. Herald added subscribers: anlunx, bzcheeseman, arjunp, sdasgup3, wenzhicui, wrengr, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, mgester, arpith-jacob, antiagainst, sha

[PATCH] D133711: [Sema] Reject array element types whose sizes aren't a multiple of their alignments

2022-09-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D133711#3790933 , @rnk wrote: > This seems like a new error that will be pretty easy to run into, especially > in the funky MSVC virtual base case. @aaron.ballman proposed some kind of new > breaking change announcement

[PATCH] D133436: Ground work for cuda-related checks in clang-tidy

2022-09-15 Thread Bartłomiej Cieślar via Phabricator via cfe-commits
barcisz updated this revision to Diff 460374. barcisz marked 2 inline comments as done. barcisz added a comment. Changes suggested by njames93 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133436/new/ https://reviews.llvm.org/D133436 Files: clan

[PATCH] D133804: Cuda Check for ignored return errors from api calls to cuda

2022-09-15 Thread Bartłomiej Cieślar via Phabricator via cfe-commits
barcisz updated this revision to Diff 460376. barcisz added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133804/new/ https://reviews.llvm.org/D133804 Files: clang-tools-extra/- clang-tools-extra/clang-tidy/cuda/CMakeLists.tx

[PATCH] D133937: [mlir] Remove the unused source file.

2022-09-15 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe488ce29ec5e: [mlir] Remove the unused source file. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133937/new/ https://reviews.llvm.org

[PATCH] D133659: [Clang] P1169R4: static operator()

2022-09-15 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a subscriber: erichkeane. cor3ntin added a comment. Beside a missing test, this LGTM I'd like someone else (@erichkeane maybe) to review the codegen tests. Comment at: clang/test/Parser/cxx2b-lambdas.cpp:60 + auto SC5 = [&y = x]() static {}; // expected-error {{

[PATCH] D128440: [WebAssembly] Initial support for reference type funcref in clang

2022-09-15 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:954 10, // wasm_externref, +20, // wasm_funcref }; aaron.ballman wrote: > Where did this value come from? Unsure what you mean here. This is the address space number we a

[PATCH] D133052: [clang] Avoid crash when expanding conversion templates in concepts.

2022-09-15 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. It seems wrong to change semantics of initialization when instantiating concept requirements. It implies that semantic checking may behave differently inside requires expressions, this is a red flag. Clang has a mechanism

[clang] 3ce7d25 - [clang][RecoveryExpr] Don't perform alignment check if parameter type is dependent

2022-09-15 Thread Aleksandr Platonov via cfe-commits
Author: Aleksandr Platonov Date: 2022-09-15T15:51:43+03:00 New Revision: 3ce7d256f2d7f64d57ccbfd7935d55eafc639314 URL: https://github.com/llvm/llvm-project/commit/3ce7d256f2d7f64d57ccbfd7935d55eafc639314 DIFF: https://github.com/llvm/llvm-project/commit/3ce7d256f2d7f64d57ccbfd7935d55eafc639314.

[PATCH] D133886: [clang][RecoveryExpr] Don't perform alignment check if parameter type is dependent

2022-09-15 Thread Aleksandr Platonov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. ArcsinX marked an inline comment as done. Closed by commit rG3ce7d256f2d7: [clang][RecoveryExpr] Don't perform alignment check if parameter type is… (authored by ArcsinX). Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D123630: Remove connection between 'ffast-math' and 'ffp-contract'.

2022-09-15 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 460389. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123630/new/ https://reviews.llvm.org/D123630 Files: clang/docs/UsersManual.rst clang/lib/Driver/ToolChains/Clang.cpp clang/test/CodeGen/ffp-contract-option.c clang/test/Driver/fp-contract

[PATCH] D133641: [Clang] [Sema] Ignore invalid multiversion function redeclarations

2022-09-15 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. makes sense to me, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133641/new/ https://reviews.llvm.org/D133641 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D125142: [clang][auto-init] Remove -enable flag for "zero" mode

2022-09-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D125142#3782296 , @xbolva00 wrote: > In D125142#3782244 , > @nickdesaulniers wrote: > >> @rsmith can we get some guidance here? Has your opinion changed in the time >> since GC

[PATCH] D111283: [clang] template / auto deduction deduces common sugar

2022-09-15 Thread David Rector via Phabricator via cfe-commits
davrec added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:12367 + case Type::Class: \ +llvm_unreachable("Unexpected " Kind ": " #Class); + aaronpuchert wrote: > mizvekov wrote: > > aaro

[PATCH] D133941: [clang][Interp] Record item types in InterpStack

2022-09-15 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, shafik, erichkeane, tahonermann. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Since I've run into this a few times now... When `

[PATCH] D133931: [clang][dataflow] Replace `transfer(const Stmt *, ...)` with `transfer(const CFGElement *, ...)` in `clang/Analysis/FlowSensitive`.

2022-09-15 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/MultiVarConstantPropagationTest.cpp:137-140 +auto CS = E->getAs(); +if (!CS) + return; +auto S = CS->getStmt(); This is exactly the same code that you have in `Si

[PATCH] D128462: [HLSL] add -I option for dxc mode.

2022-09-15 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/Driver/Options.td:6362 -def cl_Group : OptionGroup<"">, Flags<[CLOption]>, +def cl_Group : OptionGroup<"">, Flags<[CLDXCOption]>, HelpText<"CL.EXE COMPATIBILITY OPTIONS">; kadircet wrote: > i am fa

[PATCH] D133109: [LLVM][ARM] Remove options for armv2, 2A, 3 and 3M

2022-09-15 Thread David Spickett via Phabricator via cfe-commits
DavidSpickett added subscribers: nickdesaulniers, psmith. DavidSpickett added a comment. > 1:38 AM might be good to take them out here as well So I looked into this. Here are the Arm architectures that clang has that gcc doesn't: "armv5tej" // Not in GCC, j = jazelle "armv7k" // Apple Watch S1 "

[PATCH] D133941: [clang][Interp] Record item types in InterpStack

2022-09-15 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Can you clarify what the intent of this patch is? Perhaps I'm just being slow today, but I don't really get the intent here. Comment at: clang/lib/AST/Interp/InterpStack.h:135 + return PT_Ptr; +else if (std::is_same::value || std::is_same:

[PATCH] D133941: [clang][Interp] Record item types in InterpStack

2022-09-15 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/AST/Interp/InterpStack.h:161 + return PT_Uint64; +assert(false); + } llvm_unreachable? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133941/new/ ht

[PATCH] D133934: [clang][Interp] Handle sizeof() expressions

2022-09-15 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/AST/Interp/Context.cpp:134 +llvm::Optional Context::sizeofType(QualType T) const { + if (llvm::Optional ArgT = classify(T)) +return primSize(*ArgT); This function seems pretty large for something you sh

[PATCH] D133942: Clang tidy utility to generate a fix hint for a subsequent expression to the existing one

2022-09-15 Thread Bartłomiej Cieślar via Phabricator via cfe-commits
barcisz created this revision. Herald added a subscriber: carlosgalvezp. Herald added a project: All. barcisz requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D13394

[PATCH] D133942: Clang tidy utility to generate a fix hint for a subsequent expression to the existing one

2022-09-15 Thread Bartłomiej Cieślar via Phabricator via cfe-commits
barcisz updated this revision to Diff 460405. barcisz added a comment. Use the new Lexer option to include comments while finding next token Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133942/new/ https://reviews.llvm.org/D133942 Files: clang-

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-15 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki updated this revision to Diff 460407. yusuke-kadowaki marked 3 inline comments as done. yusuke-kadowaki added a comment. Implementation done except for the `Leave` option. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132131/new/ ht

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-15 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki added inline comments. Comment at: clang/include/clang/Format/Format.h:428 + +bool operator==(const TrailingCommentsAlignmentStyle &R) const { + return Kind == R.Kind && OverEmptyLines == R.OverEmptyLines; MyDeveloperDay wrote: > yusuke-k

[PATCH] D133109: [LLVM][ARM] Remove options for armv2, 2A, 3 and 3M

2022-09-15 Thread Renato Golin via Phabricator via cfe-commits
rengolin added a comment. I think we can safely say that we care less about jazelle than we care about armv1/2/3, so feel free to ignore that, too. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133109/new/ https://reviews.llvm.org/D133109 ___

[PATCH] D133634: [clang] Allow vector of BitInt

2022-09-15 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. There was no motivation for disabling this other than not wanting/caring enough to define the ABI and writing sufficient tests. While I don't think there is sufficient testing here around ABI/etc, I have no problem with this. Repository: rG LLVM Github Monorepo

[PATCH] D133941: [clang][Interp] Record item types in InterpStack

2022-09-15 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D133941#3792330 , @erichkeane wrote: > Can you clarify what the intent of this patch is? Perhaps I'm just being > slow today, but I don't really get the intent here. Consider: push(...); (lots of stuff) pop(); curre

[PATCH] D133934: [clang][Interp] Handle sizeof() expressions

2022-09-15 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 460409. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133934/new/ https://reviews.llvm.org/D133934 Files: clang/lib/AST/Interp/Boolean.h clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/Interp/Opco

[PATCH] D133934: [clang][Interp] Handle sizeof() expressions

2022-09-15 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Didn't now I could just get that information from the ASTContext, nice. Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133934/new/ https://reviews.llvm.org/D133934 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D133934: [clang][Interp] Handle sizeof() expressions

2022-09-15 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:289 +QualType ArgType = E->getTypeOfArgument(); +return this->emitConst(E, Ctx.getASTContext().getTypeSize(ArgType)); + } You probably want `getTypeSizeInChars`. `getT

[PATCH] D133804: Cuda Check for ignored return errors from api calls to cuda

2022-09-15 Thread Bartłomiej Cieślar via Phabricator via cfe-commits
barcisz updated this revision to Diff 460410. barcisz added a comment. Use header guards instead of pragma Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133804/new/ https://reviews.llvm.org/D133804 Files: clang-tools-extra/- clang-tools-extra/

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-15 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:865 + + * ``TCAS_DontAlign`` (in configuration: ``DontAlign``) +Don't align trailing comments. HazardyKnusperkeks wrote: > yusuke-kadowaki wrote: > > HazardyKnusperkeks

[PATCH] D83015: [Driver] Add --ld-path= and deprecate -fuse-ld=/abs/path and -fuse-ld=rel/path

2022-09-15 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Herald added a subscriber: StephenFan. Herald added a project: All. `LinkerIsLLD` isn't getting set when `--ld-path` is used. (It also isn't getting set when using `-fuse-ld=` with an absolute path.) How do you imagine using an absolute path and telling clang "the linker

[PATCH] D133934: [clang][Interp] Handle sizeof() expressions

2022-09-15 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:289 +QualType ArgType = E->getTypeOfArgument(); +return this->emitConst(E, Ctx.getASTContext().getTypeSize(ArgType)); + } erichkeane wrote: > You probably want `getTypeSi

[PATCH] D133934: [clang][Interp] Handle sizeof() expressions

2022-09-15 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 460412. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133934/new/ https://reviews.llvm.org/D133934 Files: clang/lib/AST/Interp/Boolean.h clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/Interp/Opco

[PATCH] D133945: [clang][ASTImporter] Continue with slow lookup in DeclContext::localUncachedLookup when regular lookup fails

2022-09-15 Thread Michael Buch via Phabricator via cfe-commits
Michael137 created this revision. Michael137 added reviewers: aprantl, martong. Herald added a subscriber: rnkovacs. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: All. Michael137 requested review of this revision. Herald added projects: clang, LLDB. He

[PATCH] D133945: [clang][ASTImporter] Continue with slow lookup in DeclContext::localUncachedLookup when regular lookup fails

2022-09-15 Thread Michael Buch via Phabricator via cfe-commits
Michael137 added inline comments. Herald added a subscriber: JDevlieghere. Comment at: clang/lib/AST/DeclBase.cpp:1781 if (Name && !hasLazyLocalLexicalLookups() && !hasLazyExternalLexicalLookups()) { if (StoredDeclsMap *Map = LookupPtr) { Could mer

[PATCH] D132461: [clang-tidy] Add cppcoreguidelines-avoid-do-while check

2022-09-15 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 460419. carlosgalvezp added a comment. Adjust warning message for consistency. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132461/new/ https://reviews.llvm.org/D132461 Files: clang-tools-extra/clang-

[PATCH] D133945: [clang][ASTImporter] Continue with slow lookup in DeclContext::localUncachedLookup when regular lookup fails

2022-09-15 Thread Michael Buch via Phabricator via cfe-commits
Michael137 updated this revision to Diff 460420. Michael137 added a comment. - Merge if-blocks - Reword commit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133945/new/ https://reviews.llvm.org/D133945 Files: clang/lib/AST/DeclBase.cpp clang/u

[PATCH] D123630: Remove connection between 'ffast-math' and 'ffp-contract'.

2022-09-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM aside from a few nits. Comment at: clang/docs/UsersManual.rst:1411 + Note: ``-ffast-math`` causes ``crtfastmath.o`` to be linked with code. + Comment at: clang/doc

[PATCH] D133853: [AST] Add msvc-specific C++11 attributes

2022-09-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for the patch! I'm wondering what the goal is for these changes. We don't typically add attributes to Clang that don't have any effect unless there's a very compelling reason to do so. Are you intending to add semantics for these attributes in follow-up

[PATCH] D133807: Update Unicode to 15.0

2022-09-15 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added a comment. Structurally, these changes look like what I would expect. I didn't try to validate any of the code point ranges. Are there useful tests that could be modified or added in order to validate (probably on a spot check basis) Unicode 15 support for regression purposes?

[PATCH] D133934: [clang][Interp] Handle sizeof() expressions

2022-09-15 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:290 +return this->emitConst( +E, Ctx.getASTContext().getTypeSizeInChars(ArgType).getQuantity()); + } I notice that `HandleSizeof` special cases `void` and function typ

[PATCH] D133948: [clang][C++20] Fix clang/clangd assert/crash after compilation errors

2022-09-15 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin created this revision. DmitryPolukhin added reviewers: Tyker, rsmith, aaron.ballman. DmitryPolukhin added a project: clang. Herald added subscribers: kadircet, arphaman. Herald added a project: All. DmitryPolukhin requested review of this revision. Herald added subscribers: cfe-commi

[PATCH] D133945: [clang][ASTImporter] DeclContext::localUncachedLookup: Continue lookup into decl chain when regular lookup fails

2022-09-15 Thread Michael Buch via Phabricator via cfe-commits
Michael137 updated this revision to Diff 460429. Michael137 added a comment. - Undo incorrect previous change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133945/new/ https://reviews.llvm.org/D133945 Files: clang/lib/AST/DeclBase.cpp clang/un

[PATCH] D133945: [clang][ASTImporter] DeclContext::localUncachedLookup: Continue lookup into decl chain when regular lookup fails

2022-09-15 Thread Michael Buch via Phabricator via cfe-commits
Michael137 added inline comments. Comment at: clang/lib/AST/DeclBase.cpp:1781 if (Name && !hasLazyLocalLexicalLookups() && !hasLazyExternalLexicalLookups()) { if (StoredDeclsMap *Map = LookupPtr) { Michael137 wrote: > Could merge the two if-blocks

[PATCH] D133249: [libc++] Documents details of the pre-commit CI.

2022-09-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/www/hacking.html:279 + + Some changes in Clang affect https://libcxx.llvm.org";>libc++, + for example: ldionne wrote: > This follows my previous comment, but we really don't want to encourage Clang > folks

[PATCH] D133934: [clang][Interp] Handle sizeof() expressions

2022-09-15 Thread Erich Keane via Phabricator via cfe-commits
erichkeane requested changes to this revision. erichkeane added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:290 +return this->emitConst( +E, Ctx.getASTContext().getTypeSizeInChars(ArgType).getQua

[PATCH] D133934: [clang][Interp] Handle sizeof() expressions

2022-09-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:290 +return this->emitConst( +E, Ctx.getASTContext().getTypeSizeInChars(ArgType).getQuantity()); + } erichkeane wrote: > shafik wrote: > > I notice that `Handle

[PATCH] D133948: [clang][C++20] Fix clang/clangd assert/crash after compilation errors

2022-09-15 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin updated this revision to Diff 460437. DmitryPolukhin added a comment. clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133948/new/ https://reviews.llvm.org/D133948 Files: clang/lib/Sema/SemaExpr.cpp clang/test/SemaCXX/

[PATCH] D133583: [clang][ubsan] Fix __builtin_assume_aligned incorrect type descriptor and C++ object polymorphic address

2022-09-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D133583#3780460 , @yronglin wrote: > Hi, follow D133202 , should I both fix > alignment in this patch or in another separate patch? (this seems have > different behavior with gcc https

[PATCH] D133443: [RISCV][MC] Add support for experimental Zawrs extension

2022-09-15 Thread Alex Bradbury via Phabricator via cfe-commits
asb added a comment. I think the summary of our discussion on this was: - The versioning confusion is unfortunate - ideally there would be discussion elsewhere at RVI on improving the situation (either ELF attributes to indicate extensions are experimental, or making that unnecessary via never

[PATCH] D133443: [RISCV][MC] Add support for experimental Zawrs extension

2022-09-15 Thread Philip Reames via Phabricator via cfe-commits
reames added a comment. In D133443#3792627 , @asb wrote: > I think the summary of our discussion on this was: > > - The versioning confusion is unfortunate - ideally there would be discussion > elsewhere at RVI on improving the situation (either ELF attr

[PATCH] D133757: [clangd] Turn QueryDriverDatabase into a CompileCommandsAdjuster

2022-09-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Kadir and I discussed this a bunch today. FWIW I agree with this patch: sticking the query-driver step in the middle of the pipeline is the right way to solve these bugs. Putting it on the end and hoping to get away with it feels risky to me. Commen

[PATCH] D128440: [WebAssembly] Initial support for reference type funcref in clang

2022-09-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:954 10, // wasm_externref, +20, // wasm_funcref }; pmatos wrote: > aaron.ballman wrote: > > Where did this value come from? > Unsure what you mean here. This is th

[PATCH] D83015: [Driver] Add --ld-path= and deprecate -fuse-ld=/abs/path and -fuse-ld=rel/path

2022-09-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D83015#3792397 , @thakis wrote: > `LinkerIsLLD` isn't getting set when `--ld-path` is used. (It also isn't > getting set when using `-fuse-ld=` with an absolute path.) > > How do you imagine using an absolute path and telling c

[PATCH] D133954: [clang-format] Fix template arguments in macros

2022-09-15 Thread sstwcw via Phabricator via cfe-commits
sstwcw created this revision. sstwcw added reviewers: HazardyKnusperkeks, MyDeveloperDay, curdeius, owenpan. Herald added a project: All. sstwcw requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes https://github.com/llvm/llvm-project/issu

[PATCH] D133443: [RISCV][MC] Add support for experimental Zawrs extension

2022-09-15 Thread Philip Reames via Phabricator via cfe-commits
reames updated this revision to Diff 460447. reames added a comment. Add docs. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133443/new/ https://reviews.llvm.org/D133443 Files: clang/test/Preprocessor/riscv-target-features.c llvm/docs/RISCVUsage.rst llvm/lib/Support/RISCVISAInfo.

[PATCH] D122215: [WebAssembly] Initial support for reference type externref in clang

2022-09-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/AST/Type.h:1972-1973 + /// Check if this is a WebAssembly Reference Type. + bool isWebAssemblyReferenceType() const; + bool isWebAssemblyExternrefType() const; /// Determines if this is a sizeless type sup

  1   2   3   >