[PATCH] D134267: [C++] [Modules] Support one phase compilation model for named modules

2022-10-10 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. @ChuanqiXu BTW, I think we (unfortunately) have some overlap in work in progress here; I have implemented a similar scheme to GCC's where C/BMIs can be produced "on demand" when the FE encounters the module keywords. The idea was to make it possible to have the same com

[clang-tools-extra] 1ae33bf - [clang-tidy] Add cppcoreguidelines-avoid-do-while check

2022-10-10 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2022-10-10T07:29:17Z New Revision: 1ae33bf42680b156fe0f5cd6163bf24ef45d8cd3 URL: https://github.com/llvm/llvm-project/commit/1ae33bf42680b156fe0f5cd6163bf24ef45d8cd3 DIFF: https://github.com/llvm/llvm-project/commit/1ae33bf42680b156fe0f5cd6163bf24ef45d8cd3.diff LOG:

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

2022-10-10 Thread Carlos Galvez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1ae33bf42680: [clang-tidy] Add cppcoreguidelines-avoid-do-while check (authored by carlosgalvezp). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132461/new/

[PATCH] D135433: [clang][Interp] Implement while and do-while loops

2022-10-10 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/loops.cpp:9 + +namespace WhileLoop { + constexpr int f() { shafik wrote: > infinite loop w/o a side effect are undefined behavior and so should be > ill-formed and generate a diagnostic e.g. `whil

[PATCH] D134267: [C++] [Modules] Support one phase compilation model for named modules

2022-10-10 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D134267#3846153 , @iains wrote: > @ChuanqiXu BTW, I think we (unfortunately) have some overlap in work in > progress here; > > I have implemented a similar scheme to GCC's where C/BMIs can be produced "on > demand" when the

[PATCH] D135508: [clangd] Heuristic to avoid desync if editors are confused about newline-at-eof

2022-10-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. i also would rather not have the workaround solely for an editor (we usually try to address these on editor/plugin side). i am also worried about the understanding of that inferred line afterwards (e.g. what if editor thinks that line doesn't have a trailing `\n` and s

[PATCH] D135422: [clang-format] Fix misattributing preprocessor directives to macros

2022-10-10 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:2986-2990 + verifyFormat("#define X " + "\\\n" + " case 0: break;\n" + "#include \"f\

[PATCH] D134267: [C++] [Modules] Support one phase compilation model for named modules

2022-10-10 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. In D134267#3846218 , @ChuanqiXu wrote: > In D134267#3846153 , @iains wrote: > >> @ChuanqiXu BTW, I think we (unfortunately) have some overlap in work in >> progress here; >> >> I have imple

[PATCH] D134303: [AST] Preserve more structure in UsingEnumDecl node.

2022-10-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. Modelling this as a `TypeLoc` for code reuse reasons gives me a pause too. However, I think we still accept this as keeping the clients simpler seems like the right trade-off to m

[PATCH] D70401: [RISCV] Complete RV32E/ilp32e implementation

2022-10-10 Thread Zixuan Wu via Phabricator via cfe-commits
zixuan-wu added inline comments. Comment at: llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp:106 +for (size_t Reg = RISCV::X16; Reg <= RISCV::X31; Reg++) + markSuperRegs(Reserved, Reg); + I am wondering whether we need construct another new RegisterClass for

[PATCH] D134303: [AST] Preserve more structure in UsingEnumDecl node.

2022-10-10 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. it looks good to me, just a few optional nits. Comment at: clang/include/clang/AST/DeclCXX.h:3618 + /// The source location of the 'enum' keyword. + SourceLocation EnumLoc; + /// 'qual::SomeEnum' as an EnumType, possibly

[PATCH] D134267: [C++] [Modules] Support one phase compilation model for named modules

2022-10-10 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D134267#3846264 , @iains wrote: > In D134267#3846218 , @ChuanqiXu > wrote: > >> In D134267#3846153 , @iains wrote: >> >>> @ChuanqiXu BTW, I

[PATCH] D134267: [C++] [Modules] Support one phase compilation model for named modules

2022-10-10 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. In D134267#3846264 , @iains wrote: > In D134267#3846218 , @ChuanqiXu > wrote: > >> In D134267#3846153 , @iains wrote: >> >>> @ChuanqiXu BTW, I thin

[PATCH] D134529: [C++20][Clang] P2468R2 The Equality Operator You Are Looking For

2022-10-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D134529#3845617 , @sberg wrote: > I just ran into newly-failing > It looks to me like this is correctly rejected now per P2468R2. Yes, this is intentional, the behavior of the code is the same as in C++17. > But it is r

[PATCH] D135461: [LLDB] Fix crash when printing a struct with a static wchar_t member

2022-10-10 Thread David Spickett via Phabricator via cfe-commits
DavidSpickett added a comment. You need to update the python file for the test as well. What does the output look like, do we actually print the character itself or it's value? (just curious, which one we do is probably out of scope for this change) Comment at: clang/lib/AST

[PATCH] D135508: [clangd] Heuristic to avoid desync if editors are confused about newline-at-eof

2022-10-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D135508#3846231 , @kadircet wrote: > i also would rather not have the workaround solely for an editor (we usually > try to address these on editor/plugin side). Yeah, for sure. My main concern is that in practice it won't g

[PATCH] D135067: [lit] RUN commands without stdin.

2022-10-10 Thread James Henderson via Phabricator via cfe-commits
jhenderson added inline comments. Comment at: llvm/utils/lit/tests/Inputs/shtest-stdin/print-stdin.py:6 +print(sys.stdin.read()) \ No newline at end of file Nit: add newline at EOF. Comment at: llvm/utils/lit/tests/shtest-stdin.py:28 +# CHECK-

[PATCH] D127403: [clangd] Implement semantic token modifier "definition"

2022-10-10 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler added a comment. So, is this okay to merge now? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127403/new/ https://reviews.llvm.org/D127403 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D129689: [limits.h] USHRT_MAX fix for 16 bit architectures

2022-10-10 Thread Sebastian Perta via Phabricator via cfe-commits
SebastianPerta added a comment. >>are you planning to update the patch Yes, sorry about the delay. I will update the patch before the end of the week. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129689/new/ https://reviews.llvm.org/D129689

[PATCH] D135366: [clang][Interp] Implement String- and CharacterLiterals

2022-10-10 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 466461. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135366/new/ https://reviews.llvm.org/D135366 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/test/AST/Interp/arrays.cpp Index: clang/test/AST/I

[PATCH] D135569: [clang][Interp] Don't run functions immediately after compiling them

2022-10-10 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. I'm not 100% sure why this was done in the first pl

[PATCH] D135397: [clang][dataflow] Add support for a Top value in boolean formulas.

2022-10-10 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h:156 + TopBoolValue &createTopBoolValue() { +return takeOwnership(std::make_unique()); Please add a comment. Comment at: clang

[PATCH] D135551: [clang] replace `assert(0)` with `llvm_unreachable` NFC

2022-10-10 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 466471. inclyc added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix CI issue Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135551/new/ https://reviews.llvm.org/D135551 Fil

[clang-tools-extra] 71b4bc1 - Fix clang-tools-extra Sphinx build

2022-10-10 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2022-10-10T07:55:26-04:00 New Revision: 71b4bc185f610ddac7c6334513392ff01820fd90 URL: https://github.com/llvm/llvm-project/commit/71b4bc185f610ddac7c6334513392ff01820fd90 DIFF: https://github.com/llvm/llvm-project/commit/71b4bc185f610ddac7c6334513392ff01820fd90.diff

[PATCH] D135097: Remove redundant option '-menable-unsafe-fp-math'.

2022-10-10 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 466474. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135097/new/ https://reviews.llvm.org/D135097 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Driver/Options.td clang/lib/CodeGen/CGCall.cpp clang/lib/Driver/ToolChains/Clang.cpp

[PATCH] D126907: Deferred Concept Instantiation Implementation Take 2

2022-10-10 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D126907#3844788 , @BertalanD wrote: > Hi @erichkeane, > > This change broke compilation of this program > (https://godbolt.org/z/KrWGvcf8h; reduced from > https://github.com/SerenityOS/ladybird): > > template > constex

[PATCH] D135551: [clang] replace `assert(0)` with `llvm_unreachable` NFC

2022-10-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I don't know if that discussion reached a conclusion to move forward with this change -- my reading of the conversation was that efforts would be better spend on fuzzing instead of changing policy about using unreachable vs assert(0). In general, I'm a bit hesitan

[PATCH] D135341: [clang] adds `__reference_constructs_from_temporary`

2022-10-10 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/include/clang/Basic/DiagnosticCommonKinds.td:397 +def err_reserved_identifier_for_future_use : Error< + "%0 is a compiler-reserved identifier for a future feature">; } I don't think we should diagnose this for

[PATCH] D135177: [clang] adds `__is_scoped_enum`, `__is_nullptr`, and `__is_referenceable`

2022-10-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/SemaCXX/type-traits.cpp:822 + + { int a[F(__is_referenceable(void))]; } +} aaron.ballman wrote: > I think we should have test cases for the following: > ``` > struct incomplete; > > __is_referenceable(

[PATCH] D135551: [clang] replace `assert(0)` with `llvm_unreachable` NFC

2022-10-10 Thread YingChi Long via Phabricator via cfe-commits
inclyc added a comment. In D135551#3846592 , @aaron.ballman wrote: > I don't know if that discussion reached a conclusion to move forward with > this change -- my reading of the conversation was that efforts would be > better spend on fuzzing instead o

[PATCH] D135366: [clang][Interp] Implement String- and CharacterLiterals

2022-10-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a subscriber: cor3ntin. aaron.ballman added inline comments. Comment at: clang/test/AST/Interp/arrays.cpp:135 + static_assert(u32[1] == U'b', ""); +}; + shafik wrote: > tbaeder wrote: > > aaron.ballman wrote: > > > I think you need a more cov

[clang] 6685e56 - Disallow dereferencing of void* in C++.

2022-10-10 Thread Erich Keane via cfe-commits
Author: Erich Keane Date: 2022-10-10T07:11:46-07:00 New Revision: 6685e56ceddf7c88eb3c39e838a8164941aade05 URL: https://github.com/llvm/llvm-project/commit/6685e56ceddf7c88eb3c39e838a8164941aade05 DIFF: https://github.com/llvm/llvm-project/commit/6685e56ceddf7c88eb3c39e838a8164941aade05.diff L

[PATCH] D135287: Disallow dereferencing of void* in C++.

2022-10-10 Thread Erich Keane 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 rG6685e56ceddf: Disallow dereferencing of void* in C++. (authored by erichkeane). Herald added a project: clang. Changed prior to commit: https://re

[PATCH] D135500: [Clang] reject bit-fields as instruction operands in Microsoft style inline asm blocks.

2022-10-10 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. This revision is now accepted and ready to land. 1 nit, otherwise LGTM. Comment at: clang/lib/Sema/SemaStmtAsm.cpp:937 for (uint64_t I = 0; I < NumOutputs + NumInputs; ++I) { -if (Exprs[I]->getType()->isBitIn

[PATCH] D131858: [clang] Track the templated entity in type substitution.

2022-10-10 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. This LGTM, but please give @davrec time (a few days?) to do another review before merging. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131858/new/ https://reviews.llvm.org/D131858 _

[PATCH] D127403: [clangd] Implement semantic token modifier "definition"

2022-10-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. Thanks! Sorry for letting this drop. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:79 + if (auto *Var = dyn_cast(Decl)) +return !isa(Var) && Var->isThisDeclarationADefinition(); + return isa(Decl

[clang] 4baa5ae - Possibly fix sphinx regression from 6685e56ceddf

2022-10-10 Thread Erich Keane via cfe-commits
Author: Erich Keane Date: 2022-10-10T07:22:41-07:00 New Revision: 4baa5aec79aadce13c7b876eb487be13a3c88d48 URL: https://github.com/llvm/llvm-project/commit/4baa5aec79aadce13c7b876eb487be13a3c88d48 DIFF: https://github.com/llvm/llvm-project/commit/4baa5aec79aadce13c7b876eb487be13a3c88d48.diff L

[PATCH] D135555: [libclang] CIndex: Visit UsingTypeLoc as TypeRef

2022-10-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang/unittests/libclang/TestUtils.h:85 } + static std::string from_CXString(CXString cx_string) { +std::string string{clang_getCString(cx_strin

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

2022-10-10 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki updated this revision to Diff 466504. yusuke-kadowaki added a comment. Implment trailing comments Leave option There is two options, I think, when leaving comments exceeds the column limit. 1. Just format the trailing comments 2. Ignore the column limit for that line. This imple

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

2022-10-10 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki marked an inline comment as done. yusuke-kadowaki added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:865 + + * ``TCAS_DontAlign`` (in configuration: ``DontAlign``) +Don't align trailing comments. HazardyKnusperkeks wrot

[PATCH] D135366: [clang][Interp] Implement String- and CharacterLiterals

2022-10-10 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/AST/Interp/arrays.cpp:135 + static_assert(u32[1] == U'b', ""); +}; + aaron.ballman wrote: > shafik wrote: > > tbaeder wrote: > > > aaron.ballman wrote: > > > > I think you need a more coverage for character

[PATCH] D127403: [clangd] Implement semantic token modifier "definition"

2022-10-10 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler updated this revision to Diff 466510. ckandeler marked 2 inline comments as done. ckandeler added a comment. Use modifier also for parameters, Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127403/new/ https://reviews.llvm.org/D127403 Fil

[PATCH] D133066: fix a typo in comment of AddConversionCandidate

2022-10-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D133066#3845136 , @zhouyizhou wrote: > After 4 weeks' study, I think the comment didn't need to be changed, sorry to > have bring your so much trouble. No worries at all, there was no trouble here! > During this valua

[PATCH] D135500: [Clang] reject bit-fields as instruction operands in Microsoft style inline asm blocks.

2022-10-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM as well with a diagnostic wording suggestion; please also add a release note for the fix. Comment at: clang/include/clang/Basic/DiagnosticCommonKinds.td:283 + def err_ms_asm_bitfield_unsupported : Error

[clang] b62f5fb - [Clang][Sema] Narrow inline namespace filtration for unqualified friend declarations

2022-10-10 Thread Troy Johnson via cfe-commits
Author: Troy Johnson Date: 2022-10-10T08:34:14-07:00 New Revision: b62f5fb64edec7f5917a233bf0a9a30e1e4b70f0 URL: https://github.com/llvm/llvm-project/commit/b62f5fb64edec7f5917a233bf0a9a30e1e4b70f0 DIFF: https://github.com/llvm/llvm-project/commit/b62f5fb64edec7f5917a233bf0a9a30e1e4b70f0.diff

[PATCH] D135370: Narrow inline namespace filtration for unqualified friend declarations

2022-10-10 Thread Troy Johnson 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 rGb62f5fb64ede: [Clang][Sema] Narrow inline namespace filtration for unqualified friend… (authored by troyj). Repository: rG LLVM Github Monorepo C

[PATCH] D135595: [HLSL] Add utility to convert environment to stage

2022-10-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: aaron.ballman, MaskRay, klimek, python3kgae, pow2clk. Herald added subscribers: Anastasia, StephenFan. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. We had a bunch of places in the code where

[PATCH] D135551: [clang] replace `assert(0)` with `llvm_unreachable` NFC

2022-10-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D135551#3846603 , @inclyc wrote: > In D135551#3846592 , @aaron.ballman > wrote: > >> I don't know if that discussion reached a conclusion to move forward with >> this change --

[PATCH] D131963: [libc++] Add custom clang-tidy checks

2022-10-10 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. In D131963#3845092 , @philnik wrote: > In D131963#3831786 , @smeenai wrote: > >> In D131963#3811811 , @ldionne >> wrote: >> >>> I'd be fine with

[PATCH] D135422: [clang-format] Fix misattributing preprocessor directives to macros

2022-10-10 Thread Jacob Abraham via Phabricator via cfe-commits
jacob-abraham updated this revision to Diff 466522. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135422/new/ https://reviews.llvm.org/D135422 Files: clang/lib/Format/UnwrappedLineFormatter.cpp clang/unittests/Format/FormatTest.cpp Index: clang/unittests/Format/FormatTest.cpp =

[PATCH] D135422: [clang-format] Fix misattributing preprocessor directives to macros

2022-10-10 Thread Jacob Abraham via Phabricator via cfe-commits
jacob-abraham added a comment. I do not have commit access, can someone make this commit on my behalf? Thank you! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135422/new/ https://reviews.llvm.org/D135422 ___ cfe-commits mailing list cfe-com

[PATCH] D135595: [HLSL] Add utility to convert environment to stage

2022-10-10 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. Backend needs the same thing. Is it possible to move this to llvm and share it between frontend and backend? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135595/new/ https://reviews.llvm.org/D135595 __

[clang] ec32386 - [Clang] Support constexpr builtin fmin

2022-10-10 Thread Evgeny Shulgin via cfe-commits
Author: Evgeny Shulgin Date: 2022-10-10T16:06:23Z New Revision: ec32386404409b65d21fdf916110c08912335926 URL: https://github.com/llvm/llvm-project/commit/ec32386404409b65d21fdf916110c08912335926 DIFF: https://github.com/llvm/llvm-project/commit/ec32386404409b65d21fdf916110c08912335926.diff LOG

[PATCH] D135493: [Clang] Support constexpr builtin fmin

2022-10-10 Thread Evgeny Shulgin via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGec3238640440: [Clang] Support constexpr builtin fmin (authored by Izaron). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135493/new/ https://reviews.llvm.or

[PATCH] D135595: [HLSL] Add utility to convert environment to stage

2022-10-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D135595#3847056 , @python3kgae wrote: > Backend needs the same thing. > Is it possible to move this to llvm and share it between frontend and backend? This translates the triple to a clang-defined enum... so strictly speaking n

[PATCH] D133668: [HLSL] Use _BitInt(16) for int16_t to avoid promote to int.

2022-10-10 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Sure, but it's extremely easy to unpromote that arithmetic for most operators, and I'm sure LLVM already has a pass that will do that. The only thing that blocks unpromotion is when you feed a promoted result into something that's sensitive to working on a wider value

[PATCH] D135595: [HLSL] Add utility to convert environment to stage

2022-10-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. Worth noting, we do have a similar set of static_asserts in Triple.cpp to validate the ordering of enum cases and that the subtraction results in the appropriate values: https://github.com/llvm/llvm-project/blob/main/llvm/lib/Support/Triple.cpp#L1942 Repository: rG LL

[PATCH] D118511: Add a warning for not packing non-POD members in packed structs

2022-10-10 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:2029-2036 // The align if the field is not packed. This is to check if the attribute // was unnecessary (-Wpacked). CharUnits UnpackedFieldAlign = !DefaultsToAIXPowerAlignment ? Fiel

[PATCH] D135433: [clang][Interp] Implement while and do-while loops

2022-10-10 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/test/AST/Interp/loops.cpp:9 + +namespace WhileLoop { + constexpr int f() { tbaeder wrote: > shafik wrote: > > infinite loop w/o a side effect are undefined behavior and so should be > > ill-formed and generate a d

[PATCH] D135341: [clang] adds `__reference_constructs_from_temporary`

2022-10-10 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/include/clang/Basic/DiagnosticCommonKinds.td:397 +def err_reserved_identifier_for_future_use : Error< + "%0 is a compiler-reserved identifier for a future feature">; } erichkeane wrote: > I don't think we should dia

[PATCH] D135177: [clang] adds `__is_scoped_enum`, `__is_nullptr`, and `__is_referenceable`

2022-10-10 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/lib/Parse/ParseExpr.cpp:1071 REVERTIBLE_TYPE_TRAIT(__is_base_of); + REVERTIBLE_TYPE_TRAIT(__is_bounded_array); REVERTIBLE_TYPE_TRAIT(__is_class); erichkeane wrote: > Can you just put thi

[PATCH] D135551: [clang] replace `assert(0)` with `llvm_unreachable` NFC

2022-10-10 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 466539. inclyc added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135551/new/ https://reviews.llvm.org/D135551 Files: clang/include/clang/AST/Redeclarable.h clang/include/clang/

[PATCH] D135551: [clang] replace `assert(0)` with `llvm_unreachable` NFC

2022-10-10 Thread YingChi Long via Phabricator via cfe-commits
inclyc added a comment. > I've left some comments in the review about examples of my concerns (it's not > an exhaustive review). Thanks @aaron.ballman ! I didn't quite understand the original meaning of this code here (e.g. libclang), and I have now removed the relevant changes. I think this p

[PATCH] D127403: [clangd] Implement semantic token modifier "definition"

2022-10-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Just realized ParmVarDecls (and template args) are maybe more complicated than I thought: I suppose they're only really definitions if the function/template has a body (i.e. is itself a

[PATCH] D135177: [clang] adds `__is_scoped_enum`, `__is_nullptr`, and `__is_referenceable`

2022-10-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM Comment at: clang/test/SemaCXX/type-traits.cpp:822 + + { int a[F(__is_referenceable(void))]; } +} aaron.ballman wrote: > cjdb wrote: > > aaron.ballman wrote: > > > I think we should have

[PATCH] D130325: [ODRHash] Hash `ObjCMethodDecl` and diagnose discovered mismatches.

2022-10-10 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130325/new/ https://reviews.llvm.org/D130325 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D129443: [clang-format] Add option for aligning requires clause body

2022-10-10 Thread Emilia Dreamer via Phabricator via cfe-commits
rymiel updated this revision to Diff 466551. rymiel added a comment. Flip the default and note that in the Release Notes Sorry, I did not realize I was mentioned. I think the default option will always be the first option? So I swapped them around. Note that I didn't change the LLVM config, whic

Re: [clang-tools-extra] 5d2d527 - [clangd] Avoid scanning up to end of file on each comment!

2022-10-10 Thread David Blaikie via cfe-commits
Could the underlying API be made more robust to handle StringRefs rather than null terminated char* in the first place? (like SourceManager::getCharacterData could return StringRef? Presumably at some layer it already knows how long the file is - the underlying MemoryBuffer, in this case) On Thu,

[clang] 9ced729 - Repair a confusing standards reference; NFC

2022-10-10 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2022-10-10T14:10:39-04:00 New Revision: 9ced729c2c77b19932966891566e4e2f01112f91 URL: https://github.com/llvm/llvm-project/commit/9ced729c2c77b19932966891566e4e2f01112f91 DIFF: https://github.com/llvm/llvm-project/commit/9ced729c2c77b19932966891566e4e2f01112f91.diff

[PATCH] D119209: [clang] Add cc1 option -fctor-dtor-return-this

2022-10-10 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. I was rather hoping we could have a more general "floating ABI" flag that we can lump in anything that we'd like to have otherwise but can't break ABI for - so users like Fuschia that know they're compiling everything with the same version of Clang can opt into the flo

Re: [clang-tools-extra] 5d2d527 - [clangd] Avoid scanning up to end of file on each comment!

2022-10-10 Thread Sam McCall via cfe-commits
On Mon, 10 Oct 2022, 19:57 David Blaikie, wrote: > Could the underlying API be made more robust to handle StringRefs > rather than null terminated char* in the first place? (like > SourceManager::getCharacterData could return StringRef? Presumably at > some layer it already knows how long the fil

[clang] 231fc00 - [clang-format][docs][NFC] Fix invalid syntax in ShortLambdaStyle examples.

2022-10-10 Thread Emilia Dreamer via cfe-commits
Author: Emilia Dreamer Date: 2022-10-10T21:13:07+03:00 New Revision: 231fc00cebc127badb6df6e8902727e893335a58 URL: https://github.com/llvm/llvm-project/commit/231fc00cebc127badb6df6e8902727e893335a58 DIFF: https://github.com/llvm/llvm-project/commit/231fc00cebc127badb6df6e8902727e893335a58.diff

[PATCH] D129156: Add -fpass-plugin option to Flang

2022-10-10 Thread Tarun Prabhu via Phabricator via cfe-commits
tarunprabhu updated this revision to Diff 466561. tarunprabhu added a comment. Added `examples` to `REQUIRES` in `test/Driver/pass-plugin.f90. I still cannot reproduce the build failure on my end. @MatsPetersson tested this patch and the tests passed. Could someone else test this on their build

[PATCH] D134267: [C++] [Modules] Support one phase compilation model for named modules

2022-10-10 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. FAOD: I think this should not be about "who's patches" - but about the compilation model and command lines that we want to end up with. I am concerned that with the current scheme (with or without the change in this review) we could end up with three process launches per

[PATCH] D135608: Update implementation status of P2468R2

2022-10-10 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 created this revision. Herald added a project: All. usaxena95 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/D135608 Files: clang/www/cxx_status.html Index: cla

[PATCH] D134529: [C++20][Clang] P2468R2 The Equality Operator You Are Looking For

2022-10-10 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 added a comment. Sent out https://reviews.llvm.org/D135608 to update implementation status. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134529/new/ https://reviews.llvm.org/D134529 ___ cfe-co

[PATCH] D135551: [clang] replace `assert(0)` with `llvm_unreachable` NFC

2022-10-10 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. I thought this was settled quite a while ago and enshrined in the style guide: https://llvm.org/docs/CodingStandards.html#assert-liberally `assert(0)` should not be used if something is reachable. We shouldn't have a "this violates an invariant, but if you don't have a

[PATCH] D135608: Update implementation status of P2468R2

2022-10-10 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Thanks for working on this Comment at: clang/www/cxx_status.html:1435 https://wg21.link/P2468R2";>P2468R2 - No + Clang 16 Should be "unreleased" Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D135490: [clang/Sema] Follow-up for fix of non-deterministic order of `-Wunused-variable` diagnostic

2022-10-10 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added a comment. I don't know too much about this. I guess have a DiagReceiver to force the emitting order is a good thing but it is kind of weird to have this just for unused warning. I am guessing my suspect of removing decl from the scope is the cause of the slow down. Maybe we ju

[PATCH] D135551: [clang] replace `assert(0)` with `llvm_unreachable` NFC

2022-10-10 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Can't seem to find an llvm-dev/commits discussion for r166821, but I remember discussing it several times before, perhaps this one happened on IRC and so we may not have any record of it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D135433: [clang][Interp] Implement while and do-while loops

2022-10-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Comment at: clang/lib/AST/Interp/ByteCodeStmtGen.cpp:293 + LabelTy CondLabel = this->getLabel(); // Label before the condition. + LabelTy EndLabel = thi

[PATCH] D135490: [clang/Sema] Follow-up for fix of non-deterministic order of `-Wunused-variable` diagnostic

2022-10-10 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi added a comment. In D135490#3847454 , @steven_wu wrote: > I don't know too much about this. I guess have a DiagReceiver to force the > emitting order is a good thing but it is kind of weird to have this just for > unused warning. > > I am guessi

[PATCH] D135608: Update implementation status of P2468R2

2022-10-10 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 466571. usaxena95 marked an inline comment as done. usaxena95 added a comment. addressed comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135608/new/ https://reviews.llvm.org/D135608 Files: clang/www

[PATCH] D135608: Update implementation status of P2468R2

2022-10-10 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin accepted this revision. cor3ntin added a comment. This revision is now accepted and ready to land. LGTM, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135608/new/ https://reviews.llvm.org/D135608 __

[PATCH] D135569: [clang][Interp] Don't run functions immediately after compiling them

2022-10-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This function is testing whether something is potentially a constant expression. Something might not be a valid constant expression for two reasons: 1) it uses some prohibited language construct, 2) it hit undefined behavior. You don't know if you hit undefined be

[clang] 6c49d5d - Fix unused variable warning from D134529

2022-10-10 Thread Erich Keane via cfe-commits
Author: Erich Keane Date: 2022-10-10T11:42:43-07:00 New Revision: 6c49d5db30227d21e929bb12dc046c36ede67fad URL: https://github.com/llvm/llvm-project/commit/6c49d5db30227d21e929bb12dc046c36ede67fad DIFF: https://github.com/llvm/llvm-project/commit/6c49d5db30227d21e929bb12dc046c36ede67fad.diff L

[PATCH] D135545: [clang] Mention -Werror changes revived for Clang 16

2022-10-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. Whoops, I thought I had already added those release notes, but I didn't! Thank you for catching that! LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D135341: [clang] adds `__reference_constructs_from_temporary`

2022-10-10 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added inline comments. Comment at: clang/docs/LanguageExtensions.rst:1476 is false. Note this trait will also return false when the initialization of ``T`` from ``U`` is ill-formed. +* ``__reference_constructs_from_temporary(T, U)`` (C++) We sho

[clang] 9d69c60 - Fix a typo in the Release Notes; NFC

2022-10-10 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2022-10-10T14:45:38-04:00 New Revision: 9d69c60357c8349774cbb592742593fb459c1a47 URL: https://github.com/llvm/llvm-project/commit/9d69c60357c8349774cbb592742593fb459c1a47 DIFF: https://github.com/llvm/llvm-project/commit/9d69c60357c8349774cbb592742593fb459c1a47.diff

Re: [clang-tools-extra] 5d2d527 - [clangd] Avoid scanning up to end of file on each comment!

2022-10-10 Thread David Blaikie via cfe-commits
On Mon, Oct 10, 2022 at 11:13 AM Sam McCall wrote: > > On Mon, 10 Oct 2022, 19:57 David Blaikie, wrote: >> >> Could the underlying API be made more robust to handle StringRefs >> rather than null terminated char* in the first place? (like >> SourceManager::getCharacterData could return StringRef?

[clang] e66cfb6 - Update implementation status of P2468R2

2022-10-10 Thread Utkarsh Saxena via cfe-commits
Author: Utkarsh Saxena Date: 2022-10-10T20:56:42+02:00 New Revision: e66cfb63ceed769f6ba61c733b9137fdc6acb1e0 URL: https://github.com/llvm/llvm-project/commit/e66cfb63ceed769f6ba61c733b9137fdc6acb1e0 DIFF: https://github.com/llvm/llvm-project/commit/e66cfb63ceed769f6ba61c733b9137fdc6acb1e0.diff

[PATCH] D135608: Update implementation status of P2468R2

2022-10-10 Thread Utkarsh Saxena 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 rGe66cfb63ceed: Update implementation status of P2468R2 (authored by usaxena95). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D129156: Add -fpass-plugin option to Flang

2022-10-10 Thread Tarun Prabhu via Phabricator via cfe-commits
tarunprabhu added a comment. I tried an out-of-tree flang build. check-flang passes in that case too. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129156/new/ https://reviews.llvm.org/D129156 ___ cfe-commits mailing list cfe-commits@lists.ll

[PATCH] D135551: [clang] replace `assert(0)` with `llvm_unreachable` NFC

2022-10-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D135551#3847444 , @dblaikie wrote: > I thought this was settled quite a while ago and enshrined in the style > guide: https://llvm.org/docs/CodingStandards.html#assert-liberally > > `assert(0)` should not be used if some

[PATCH] D135551: [clang] replace `assert(0)` with `llvm_unreachable` NFC

2022-10-10 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. I would think we could convert every assert(0) to either `llvm::report_fatal_error` (guaranteed trap) or `llvm_unreachable()` (trap or optimize, depending on CMAKE configuration). The C API usage checks seem like good candidates for the former. Also, not sure if eve

[PATCH] D135545: [clang] Mention -Werror changes revived for Clang 16

2022-10-10 Thread Michał Górny via Phabricator via cfe-commits
mgorny accepted this revision. mgorny added a comment. Thanks for doing this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135545/new/ https://reviews.llvm.org/D135545 ___ cfe-commits mailing list cfe-c

[PATCH] D135500: [Clang] reject bit-fields as instruction operands in Microsoft style inline asm blocks.

2022-10-10 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann updated this revision to Diff 466589. tahonermann added a comment. Rebased and addressed code review feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135500/new/ https://reviews.llvm.org/D135500 Files: clang/docs/ReleaseNotes.

[PATCH] D135370: Narrow inline namespace filtration for unqualified friend declarations

2022-10-10 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. > LGTM! Should we also add a release note or do we think this isn't enough of a > compile-time performance improvement to warrant that? Good point @aaron.ballman, given we have only observed in a few corner case large TUs I'd say it's probably not that normally perceiva

[clang] 2bb86b6 - [clang] Mention -Werror changes revived for Clang 16

2022-10-10 Thread Michał Górny via cfe-commits
Author: Sam James Date: 2022-10-10T21:44:30+02:00 New Revision: 2bb86b67447661077e30674eab7b8a27f8234b3f URL: https://github.com/llvm/llvm-project/commit/2bb86b67447661077e30674eab7b8a27f8234b3f DIFF: https://github.com/llvm/llvm-project/commit/2bb86b67447661077e30674eab7b8a27f8234b3f.diff LOG

[PATCH] D135545: [clang] Mention -Werror changes revived for Clang 16

2022-10-10 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2bb86b674476: [clang] Mention -Werror changes revived for Clang 16 (authored by thesamesam, committed by mgorny). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

  1   2   >