[clang] [CIR] Upstream support for switch statements case kinds (PR #138003)

2025-04-30 Thread Bruno Cardoso Lopes via cfe-commits
@@ -428,6 +429,52 @@ mlir::LogicalResult CIRGenFunction::emitBreakStmt(const clang::BreakStmt &s) { return mlir::success(); } +const CaseStmt *CIRGenFunction::foldCaseStmt(const clang::CaseStmt &s, + mlir::Type condType, +

[clang] [clang] Make `-ftime-report` and `-ftime-report-json` honor `-info-output-file` (PR #138035)

2025-04-30 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. https://github.com/llvm/llvm-project/pull/138035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Fix some clang-format mistakes (PR #138036)

2025-04-30 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions cpp -- clang/lib/CodeGen/CGCall.cpp `` View the

[clang] 69327c1 - [clang] Make `-ftime-report` and `-ftime-report-json` honor `-info-output-file` (#138035)

2025-04-30 Thread via cfe-commits
Author: Alan Zhao Date: 2025-04-30T14:48:17-07:00 New Revision: 69327c16d17b13cb2bc27968a557276bd82eef9a URL: https://github.com/llvm/llvm-project/commit/69327c16d17b13cb2bc27968a557276bd82eef9a DIFF: https://github.com/llvm/llvm-project/commit/69327c16d17b13cb2bc27968a557276bd82eef9a.diff LOG

[clang] [clang] Make `-ftime-report` and `-ftime-report-json` honor `-info-output-file` (PR #138035)

2025-04-30 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 closed https://github.com/llvm/llvm-project/pull/138035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Fix some clang-format mistakes (PR #138036)

2025-04-30 Thread Nick Sarnie via cfe-commits
sarnex wrote: Ignoring clang-format CI result https://github.com/llvm/llvm-project/pull/138036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Fix some clang-format mistakes (PR #138036)

2025-04-30 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex ready_for_review https://github.com/llvm/llvm-project/pull/138036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream pointer arithmetic support (PR #138041)

2025-04-30 Thread Erich Keane via cfe-commits
@@ -1152,8 +1169,72 @@ getUnwidenedIntegerType(const ASTContext &astContext, const Expr *e) { static mlir::Value emitPointerArithmetic(CIRGenFunction &cgf, const BinOpInfo &op, bool isSubtraction

[clang] [CIR] Upstream pointer arithmetic support (PR #138041)

2025-04-30 Thread Erich Keane via cfe-commits
@@ -0,0 +1,73 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s + +// Should generate basic pointer arithmetics. +void foo(int *iptr, char *cptr, unsigned ustride) { + iptr + 2; + // CHECK: %[[#STR

[clang] [CIR] Upstream pointer arithmetic support (PR #138041)

2025-04-30 Thread Erich Keane via cfe-commits
@@ -1152,8 +1169,72 @@ getUnwidenedIntegerType(const ASTContext &astContext, const Expr *e) { static mlir::Value emitPointerArithmetic(CIRGenFunction &cgf, const BinOpInfo &op, bool isSubtraction

[clang] [CIR] Upstream pointer arithmetic support (PR #138041)

2025-04-30 Thread Erich Keane via cfe-commits
@@ -1152,8 +1169,72 @@ getUnwidenedIntegerType(const ASTContext &astContext, const Expr *e) { static mlir::Value emitPointerArithmetic(CIRGenFunction &cgf, const BinOpInfo &op, bool isSubtraction

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-04-30 Thread Richard Smith via cfe-commits
zygoloid wrote: For what it's worth, the existing "keyword from language you're not using" warnings [already fire for analogous Objective-C++ cases](https://godbolt.org/z/3K6835PPK)... which in those cases is correct, since Clang does *not* accept C++11-onwards keywords as selector names in th

[clang] [CIR] Upstream pointer arithmetic support (PR #138041)

2025-04-30 Thread Andy Kaylor via cfe-commits
@@ -1152,8 +1169,72 @@ getUnwidenedIntegerType(const ASTContext &astContext, const Expr *e) { static mlir::Value emitPointerArithmetic(CIRGenFunction &cgf, const BinOpInfo &op, bool isSubtraction

[clang] [flang] [llvm] Add IR Profile-Guided Optimization (IR PGO) support to the Flang compiler (PR #136098)

2025-04-30 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,39 @@ +! Tests for -fprofile-generate and -fprofile-use flag compatibility. These two +! flags behave similarly to their GCC counterparts: +! +! -fprofile-generate Generates the profile file ./default.profraw +! -fprofile-use=/file Uses the profile file /file

[clang] [CIR] Upstream pointer arithmetic support (PR #138041)

2025-04-30 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,73 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s + +// Should generate basic pointer arithmetics. +void foo(int *iptr, char *cptr, unsigned ustride) { + iptr + 2; + // CHECK: %[[#STR

[clang] [CIR] Upstream pointer arithmetic support (PR #138041)

2025-04-30 Thread Andy Kaylor via cfe-commits
@@ -1152,8 +1169,72 @@ getUnwidenedIntegerType(const ASTContext &astContext, const Expr *e) { static mlir::Value emitPointerArithmetic(CIRGenFunction &cgf, const BinOpInfo &op, bool isSubtraction

[clang] [flang] [llvm] Add IR Profile-Guided Optimization (IR PGO) support to the Flang compiler (PR #136098)

2025-04-30 Thread Tarun Prabhu via cfe-commits
@@ -36,6 +37,15 @@ enum class VectorLibrary { TargetLibraryInfoImpl *createTLII(const llvm::Triple &TargetTriple, VectorLibrary Veclib); +enum ProfileInstrKind { tarunprabhu wrote: Nit: It may be better to move this above the

[clang] [flang] [llvm] Add IR Profile-Guided Optimization (IR PGO) support to the Flang compiler (PR #136098)

2025-04-30 Thread Tarun Prabhu via cfe-commits
@@ -8,8 +8,14 @@ #include "llvm/Frontend/Driver/CodeGenOptions.h" #include "llvm/Analysis/TargetLibraryInfo.h" +#include "llvm/ProfileData/InstrProfCorrelator.h" #include "llvm/TargetParser/Triple.h" +namespace llvm { +extern llvm::cl::opt DebugInfoCorrelate; +extern llvm::

[clang] [flang] [llvm] Add IR Profile-Guided Optimization (IR PGO) support to the Flang compiler (PR #136098)

2025-04-30 Thread Tarun Prabhu via cfe-commits
@@ -13,6 +13,7 @@ #ifndef LLVM_FRONTEND_DRIVER_CODEGENOPTIONS_H #define LLVM_FRONTEND_DRIVER_CODEGENOPTIONS_H +#include tarunprabhu wrote: An empty line should separate the last include and the namespace below https://github.com/llvm/llvm-project/pull/13609

[clang] [flang] [llvm] Add IR Profile-Guided Optimization (IR PGO) support to the Flang compiler (PR #136098)

2025-04-30 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu edited https://github.com/llvm/llvm-project/pull/136098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream initial support for union type (PR #137501)

2025-04-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-remote-linux-ubuntu` running on `as-builder-9` while building `clang` at step 16 "test-check-lldb-api". Full details are available at: https://lab.llvm.org/buildbot/#/builders/195/builds/8376 Here is the relevant piece

[clang-tools-extra] [clang-doc] Track Descriptions and TypeDeclaration for types (PR #138058)

2025-04-30 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/138058 Split from #133161. This patch allows Typedefs to now track both their declarations and full descriptions. Subsequent patches will leverage the additional fields in the representation. Co-authored-by: Peter Chou

[clang] [webkit.UncountedLambdaCapturesChecker] Treat a copy capture of a CheckedPtr object as safe (PR #138068)

2025-04-30 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/138068 Allow copy capture of a reference to a CheckedPtr capable object since such a capture will copy the said object instead of keeping a dangling reference to the object. Rate limit ยท GitHub

[clang-tools-extra] [clang-doc] Track Descriptions and TypeDeclaration for types (PR #138058)

2025-04-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Paul Kirth (ilovepi) Changes Split from #133161. This patch allows Typedefs to now track both their declarations and full descriptions. Subsequent patches will leverage the additional fields in the representation. Co-authored-b

[clang] [WebKit checkers] Treat std::bit_cast as a pointer conversion (PR #137476)

2025-04-30 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: Thanks for the review! https://github.com/llvm/llvm-project/pull/137476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Track Descriptions and TypeDeclaration for types (PR #138058)

2025-04-30 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi ready_for_review https://github.com/llvm/llvm-project/pull/138058 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Add scoped enum support to `StreamingDiagnostic` (PR #138089)

2025-04-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This patch adds templated `operator<<` for diagnostics that pass scoped enums, saving people from `llvm::to_underlying()` clutter on the side of emitting the diagnostic. This eliminates 80 out of 220 u

[clang] [llvm] [clang] Add scoped enum support to `StreamingDiagnostic` (PR #138089)

2025-04-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/138089 This patch adds templated `operator<<` for diagnostics that pass scoped enums, saving people from `llvm::to_underlying()` clutter on the side of emitting the diagnostic. This eliminates 80 out of 220 usages of

<    1   2   3   4   5   6