[PATCH] D150450: Add C++26 compile flags.

2023-05-12 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 521661. erichkeane added a comment. Update based on @cor3ntin s feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150450/new/ https://reviews.llvm.org/D150450 Files: clang/docs/CommandGuide/clang.rst clang/docs/ReleaseNotes.rst

[PATCH] D149562: [clang-format] Stop comment disrupting indentation of Verilog ports

2023-05-12 Thread sstwcw via Phabricator via cfe-commits
sstwcw added a comment. > I agree if the brace doesn't start a block, but clang-format sometimes got it > wrong and misannotates a block as a braced list. (See > https://github.com/llvm/llvm-project/issues/33891 for an example.) This patch isn't affected by the problem. The Verilog port list

[PATCH] D150450: Add C++26 compile flags.

2023-05-12 Thread Erich Keane via Phabricator via cfe-commits
erichkeane marked 4 inline comments as done. erichkeane added a subscriber: Mordante. erichkeane added a comment. In D150450#4337858 , @cor3ntin wrote: > Similar PR here https://reviews.llvm.org/D149875 Ah! I'd not noticed that one (or maybe someone

[PATCH] D144654: [Lex] Warn when defining or undefining any builtin macro

2023-05-12 Thread John Brawn via Phabricator via cfe-commits
john.brawn planned changes to this revision. john.brawn added a comment. The clang-tidy failures in pre-merge are because - clang-tidy tests use the compile database from building llvm (though you have to manually copy it otherwise the tests silently pass without actually running the test,

[PATCH] D150452: [clang-format] Recognize nested blocks

2023-05-12 Thread sstwcw via Phabricator via cfe-commits
sstwcw created this revision. Herald added projects: All, clang, clang-format. Herald added a subscriber: cfe-commits. Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay. sstwcw requested review of this revision. Now a block gets recognized as a block if it contains a

[PATCH] D150258: [clang][parser] Fix namespace dropping after malformed declarations

2023-05-12 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! Do you need me to commit on your behalf? If so, what name and email address would you like used for patch attribution? Comment at:

[PATCH] D145343: [AMDGPU] Emit predefined macro `__AMDGCN_CUMODE__`

2023-05-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:121-123 +def warn_drv_unsupported_option_for_processor : Warning< + "ignoring '%0' option as it is not currently supported for processor '%1'">, + InGroup; arsenm

[PATCH] D146054: [RISCV] Add --print-supported-extensions and -march=help support

2023-05-12 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng added a comment. GCC ins't implement yet, but planed, so add it later I think? @4vtomat already drop -march=help, @MaskRay did you mind take a look again? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146054/new/

[PATCH] D150450: Add C++26 compile flags.

2023-05-12 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Frontend/InitPreprocessor.cpp:456 + // FIXME: Use correct value for C++26. + Builder.defineMacro("__cplusplus", "202102L"); +// FIXME: Use correct value for C++23, and update C++26 to be 'one more'.

[PATCH] D150450: Add C++26 compile flags.

2023-05-12 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Similar PR here https://reviews.llvm.org/D149875 Comment at: clang/docs/ReleaseNotes.rst:114 +^ +- Compiler flags -std=c++2c and -std=gnu++2c have been added for experimental C++26 implementation work. + This

[PATCH] D145343: [AMDGPU] Emit predefined macro `__AMDGCN_CUMODE__`

2023-05-12 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:121-123 +def warn_drv_unsupported_option_for_processor : Warning< + "ignoring '%0' option as it is not currently supported for processor '%1'">, + InGroup; I'm

[PATCH] D150450: Add C++26 compile flags.

2023-05-12 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/include/clang/Basic/DiagnosticGroups.td:310 DiagGroup<"pre-c++23-compat-pedantic", [CXXPre23Compat]>; +def CXXPre26Compat : DiagGroup<"pre-c++26-compat">; +def CXXPre26CompatPedantic : Aaron: note the names

[PATCH] D150450: Add C++26 compile flags.

2023-05-12 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added reviewers: clang-language-wg, aaron.ballman. Herald added a project: All. erichkeane requested review of this revision. Herald added a subscriber: MaskRay. Now that we've updated to C++23, we need to add C++26/C++2c command line flags, as

[PATCH] D149550: [clang][Interp] Fix compound assign operator evaluation order

2023-05-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149550/new/ https://reviews.llvm.org/D149550 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D144164: [clang][Interp] Handle PtrMemOps

2023-05-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144164/new/ https://reviews.llvm.org/D144164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D149133: [clang][Interp] BaseToDerived casts

2023-05-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149133/new/ https://reviews.llvm.org/D149133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D150364: [clang][Interp] Add 'Invalid' opcode and use it for throw/asm stmts

2023-05-12 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/test/AST/Interp/records.cpp:341 + +/// FIXME: Wrong source location below. +return 12; // expected-note {{in call to

[PATCH] D150191: [clang][Diagnostics] Provide a source range for 'use of undeclared identifier' diagnostics

2023-05-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:2187 else - SemaRef.Diag(TypoLoc, DiagnosticID) << Typo; + SemaRef.Diag(TypoRange.getEnd(), DiagnosticID) << Typo; return; tbaeder wrote: > aaron.ballman wrote: > >

[PATCH] D148094: [clang][CodeGen] Break up TargetInfo.cpp [8/8]

2023-05-12 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 updated this revision to Diff 521642. barannikov88 added a comment. Undo reformatting in arch-specific files This should help in resolving merge conflicts downstream Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148094/new/

[PATCH] D150446: [analyzer] Check ArraySubscriptExprs in ArrayBoundCheckerV2

2023-05-12 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy updated this revision to Diff 521640. donat.nagy added a comment. //(Re-uploaded patch to apply clang-format changes and remove a stray temporary comment.)// Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150446/new/

[PATCH] D150446: [analyzer] Check ArraySubscriptExprs in ArrayBoundCheckerV2

2023-05-12 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy added a comment. After some thinking and internal discussion I decided that it'd be better to replace the callback used by this checker. This is a clean but rough draft of this concept; for a final version I'd consider: - adding a secondary callback that handles `*ptr` equivalently

[PATCH] D149986: AMDGPU: Force sc0 and sc1 on stores for gfx940 and gfx941

2023-05-12 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: llvm/lib/TargetParser/TargetParser.cpp:330-332 case GK_GFX940: + Features["force-store-sc0-sc1"] = true; + [[fallthrough]]; I don't see a reason to set this here. There's no need to expose this to the IR.

[PATCH] D150446: [analyzer] Check ArraySubscriptExprs in ArrayBoundCheckerV2

2023-05-12 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy created this revision. donat.nagy added reviewers: dkrupp, gamesh411, steakhal. Herald added subscribers: manas, ASDenysPetrov, martong, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All.

[PATCH] D149997: [clang] [test] Narrow down MSVC specific behaviours from "any windows" to only MSVC/clang-cl

2023-05-12 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a subscriber: rnk. mstorsjo added a comment. So, the reason why this failed, is that when invoked as `%clang_cc1` in a MSVC/clang-cl style build, `_MSC_VER` isn't predefined, while `_WIN32` is. When invoked via the Clang driver instead of directly going at `-cc1`, `_MSC_VER`

[PATCH] D150258: [clang][parser] Fix namespace dropping after malformed declarations

2023-05-12 Thread Alejandro Álvarez Ayllón via Phabricator via cfe-commits
alejandro-alvarez-sonarsource added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:2306-2310 // Otherwise things are very confused and we skip to recover. if (!isDeclarationSpecifier(ImplicitTypenameContext::No)) { - SkipUntil(tok::r_brace, StopAtSemi

[PATCH] D150258: [clang][parser] Fix namespace dropping after malformed declarations

2023-05-12 Thread Alejandro Álvarez Ayllón via Phabricator via cfe-commits
alejandro-alvarez-sonarsource updated this revision to Diff 521625. alejandro-alvarez-sonarsource added a comment. Applied suggested changes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150258/new/ https://reviews.llvm.org/D150258 Files: clang/docs/ReleaseNotes.rst

[PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names and introduce Bfloat16 arithmetic type.

2023-05-12 Thread Ties Stuij via Phabricator via cfe-commits
stuij added a comment. I made a comment on the RFC to understand if we really need/want a new bfloat16 type. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149573/new/

[PATCH] D149838: [clang][dataflow] Eliminate `SkipPast::ReferenceThenPointer`.

2023-05-12 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked an inline comment as done. mboehme added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp:840 +return nullptr; + } else { +return cast(Loc); ymandel wrote: > nit: no need for `else` since `if` branch

[PATCH] D149838: [clang][dataflow] Eliminate `SkipPast::ReferenceThenPointer`.

2023-05-12 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 521607. mboehme added a comment. Eliminate unnecessary `else`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149838/new/ https://reviews.llvm.org/D149838 Files:

[PATCH] D150352: [clang][dataflow] Don't analyze templated declarations.

2023-05-12 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked an inline comment as done. mboehme added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/ControlFlowContext.h:36 + /// `S` resides. `D.isTemplated()` must be false. + static llvm::Expected build(const Decl , Stmt , +

[PATCH] D150352: [clang][dataflow] Don't analyze templated declarations.

2023-05-12 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 521603. mboehme added a comment. Changes in response to review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150352/new/ https://reviews.llvm.org/D150352 Files:

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-05-12 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. I posted a pure crash fix here - https://reviews.llvm.org/D150435 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147626/new/ https://reviews.llvm.org/D147626 ___ cfe-commits

[PATCH] D150435: [clang] Fix crash on attempt to initialize union with flexible array member

2023-05-12 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon created this revision. Herald added a project: All. Fznamznon requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Due to missing check on union, there was a null expression added to init list that caused crash later. Fixes

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-05-12 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. > Well that's... a bit shorter... than I would have expected that union to be. > (I'm not apologizing for the pun.) In clang `union x { short x[]; }; static_assert(sizeof(x)==2);` evaluates to '0 == 2'. That is even shorter, I guess? This is also the reason why

[PATCH] D150291: [Clang] Rename internal type identifier(s) for __bf16 to BF16Ty

2023-05-12 Thread Ties Stuij via Phabricator via cfe-commits
stuij accepted this revision. stuij added a comment. Regarding this particular change, we at Arm are happy with the name change. I saw BFloat16 instead of BF16 as tech debt that we didn't get round to fixing. I do wonder if we need two bfloat implementations, but for that I'll leave a comment

[PATCH] D150191: [clang][Diagnostics] Provide a source range for 'use of undeclared identifier' diagnostics

2023-05-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:2187 else - SemaRef.Diag(TypoLoc, DiagnosticID) << Typo; + SemaRef.Diag(TypoRange.getEnd(), DiagnosticID) << Typo; return; aaron.ballman wrote: > tbaeder wrote: > > I'm

[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-05-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/Interp.h:1560 + // is the furthest we might go up in the hierarchy. + ThisPtr = ThisPtr.getDeclPtr(); +} Just so I don't forget: The assignment to `ThisPtr` here is dead. Repository:

[PATCH] D148381: [WIP][Clang] Add element_count attribute

2023-05-12 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added reviewers: rapidsna, fcloutier. fhahn added a comment. Adding a few people who have been working on `-fbounds-safety` proposal (https://llvm.swoogo.com/2023eurollvm/session/1414468/keynote-“-fbounds-safety”-enforcing-bounds-safety-for-production-c-code) Repository: rG LLVM Github

[PATCH] D150354: [OpenMP][MLIR][Flang][bbc][Driver] Add fopenmp-version and generate corresponding MLIR attribute

2023-05-12 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. All in all LGTM, but I'm not sure whether Flang should be defaulting to OpenMP 5.0. AFAIK, that's not supported yet. Comment at: clang/lib/Driver/ToolChains/Flang.cpp:34 + Args.AddAllArgs(CmdArgs, {options::OPT_ffixed_form, +

[PATCH] D103930: [clang][HeaderSearch] Fix implicit module when using header maps

2023-05-12 Thread Ivan Murashko via Phabricator via cfe-commits
ivanmurashko updated this revision to Diff 521580. ivanmurashko added a comment. typo fixed + rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103930/new/ https://reviews.llvm.org/D103930 Files: clang/lib/Lex/HeaderSearch.cpp

[PATCH] D150430: Implement BufferOverlap check for sprint/snprintf

2023-05-12 Thread Arnaud Bienner via Phabricator via cfe-commits
ArnaudBienner created this revision. Herald added subscribers: steakhal, martong. Herald added a reviewer: NoQ. Herald added a project: All. ArnaudBienner edited the summary of this revision. ArnaudBienner added a subscriber: dergachev.a. ArnaudBienner published this revision for review. Herald

[PATCH] D150124: [index][clangd] Consider labels when indexing function bodies

2023-05-12 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler updated this revision to Diff 521577. ckandeler marked 2 inline comments as done. ckandeler added a comment. Addressed review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150124/new/ https://reviews.llvm.org/D150124 Files:

[PATCH] D144943: [clang][Interp] Implement bitcasts (WIP)

2023-05-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 521574. tbaeder marked 3 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144943/new/ https://reviews.llvm.org/D144943 Files: clang/lib/AST/Interp/Boolean.h clang/lib/AST/Interp/ByteCodeExprGen.cpp

[PATCH] D149158: [clang][analyzer] Cleanup tests of StdCLibraryFunctionsChecker (NFC)

2023-05-12 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG80a21ea8006f: [clang][analyzer] Cleanup tests of StdCLibraryFunctionsChecker (NFC) (authored by balazske). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 80a21ea - [clang][analyzer] Cleanup tests of StdCLibraryFunctionsChecker (NFC)

2023-05-12 Thread Balázs Kéri via cfe-commits
Author: Balázs Kéri Date: 2023-05-12T09:54:01+02:00 New Revision: 80a21ea8006fe7bc7ae2b1c9381625aa69b4dace URL: https://github.com/llvm/llvm-project/commit/80a21ea8006fe7bc7ae2b1c9381625aa69b4dace DIFF: https://github.com/llvm/llvm-project/commit/80a21ea8006fe7bc7ae2b1c9381625aa69b4dace.diff

[PATCH] D128612: RISC-V big-endian support implementation

2023-05-12 Thread Djordje Todorovic via Phabricator via cfe-commits
djtodoro added a comment. Herald added a subscriber: luke. Hi! I wondering if someone knows what is the status of this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128612/new/ https://reviews.llvm.org/D128612

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-12 Thread Jun Zhang via Phabricator via cfe-commits
junaire marked 10 inline comments as done. junaire added inline comments. Comment at: clang/include/clang/Interpreter/Value.h:160-162 + // Interpreter, QualType are stored as void* to reduce dependencies. + void *Interp = nullptr; + void *OpaqueType = nullptr;

[PATCH] D149912: [clangd] downgrade missing-includes diagnostic to Information level

2023-05-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks, lgtm! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149912/new/ https://reviews.llvm.org/D149912

[PATCH] D150124: [index][clangd] Consider labels when indexing function bodies

2023-05-12 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler added a comment. In D150124#4329163 , @ilya-biryukov wrote: > In `clangd` we also have `findExplicitReferences` and `targetDecl` functions > that seem to handle the `GoToStmt`. According to the commit message of the patch that added this, it

[PATCH] D150364: [clang][Interp] Add 'Invalid' opcode and use it for throw/asm stmts

2023-05-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/records.cpp:341 + +/// FIXME: Wrong source location below. +return 12; // expected-note {{in call to '{}->~S()'}} aaron.ballman wrote: > Oh interesting -- does the old constexpr interpreter

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-05-12 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH created this revision. vikramRH added reviewers: sameerds, b-sumner, yaxunl, arsenm. Herald added subscribers: hoy, kerbowa, hiraditya, Anastasia, tpr, dstuttard, jvesely, kzhuravl. Herald added a project: All. vikramRH requested review of this revision. Herald added subscribers:

[clang] cf47e9f - [Serialization] Don't try to complete the redeclaration chain in

2023-05-12 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-05-12T14:28:58+08:00 New Revision: cf47e9fe86aa65b74b0476a5ad4d036dd7463bfb URL: https://github.com/llvm/llvm-project/commit/cf47e9fe86aa65b74b0476a5ad4d036dd7463bfb DIFF: https://github.com/llvm/llvm-project/commit/cf47e9fe86aa65b74b0476a5ad4d036dd7463bfb.diff

[PATCH] D150364: [clang][Interp] Add 'Unsupported' opcode and use it for throw stmts

2023-05-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 521568. tbaeder marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150364/new/ https://reviews.llvm.org/D150364 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h

[PATCH] D150364: [clang][Interp] Add 'Unsupported' opcode and use it for throw stmts

2023-05-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D150364#4335282 , @aaron.ballman wrote: > In D150364#4335261 , @tbaeder wrote: > >> In D150364#4335221 , >> @aaron.ballman wrote: >> >>>

[PATCH] D136436: [Clang][LoongArch] Add GPR alias handling without `$` prefix

2023-05-12 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n accepted this revision. xen0n added a comment. This revision is now accepted and ready to land. LGTM now, thanks for updating this patch! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136436/new/ https://reviews.llvm.org/D136436

<    1   2