[clang] [Driver] Support using toolchain libc and libc++ for baremetal (PR #96736)

2024-06-26 Thread Nick Desaulniers via cfe-commits
@@ -296,6 +300,47 @@ void BareMetal::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, return; const Driver &D = getDriver(); + std::string Target = getTripleString(); + + auto AddCXXIncludePath = [&](StringRef Path) { nickdesaulniers wrote: Is

[clang] [Driver] Support using toolchain libc and libc++ for baremetal (PR #96736)

2024-06-26 Thread Nick Desaulniers via cfe-commits
@@ -296,6 +300,47 @@ void BareMetal::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, return; const Driver &D = getDriver(); + std::string Target = getTripleString(); + + auto AddCXXIncludePath = [&](StringRef Path) { +std::string Version = detectLibcxxVers

[clang] [Driver] Support using toolchain libc and libc++ for baremetal (PR #96736)

2024-06-26 Thread Nick Desaulniers via cfe-commits
@@ -296,6 +300,47 @@ void BareMetal::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, return; const Driver &D = getDriver(); + std::string Target = getTripleString(); + + auto AddCXXIncludePath = [&](StringRef Path) { +std::string Version = detectLibcxxVers

[clang] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-27 Thread Nick Desaulniers via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf

[clang] [libunwind] [llvm] Replace documentation mentions of IRC with Discord (PR #114276)

2024-11-07 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: LGTM https://github.com/llvm/llvm-project/pull/114276 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] Reapply "Deprecate the `-fbasic-block-sections=labels` option." (PR #110039)

2024-11-07 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: Cross referencing this with an LKML thread: https://lore.kernel.org/all/CAF1bQ=TNOs7shXMbgY3UYzDZyF3ge=6hudfejvhv4loo--t...@mail.gmail.com/ https://github.com/llvm/llvm-project/pull/110039 ___ cfe-commits mailing list cfe-commit

[clang] [Clang][C++23] Core language changes from P1467R9 extended floating-point types and standard names. (PR #78503)

2024-10-17 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: Hi @codemzs are you still working on this PR? If not, please consider closing it. https://github.com/llvm/llvm-project/pull/78503 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [clang][ARM] disable frame pointers by default for bare metal ARM targets (PR #117140)

2024-12-02 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers approved this pull request. https://github.com/llvm/llvm-project/pull/117140 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [libc] remove references to LIBC_HDRGEN_ONLY (PR #118670)

2024-12-04 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers created https://github.com/llvm/llvm-project/pull/118670 Further cleanups from old hdrgen removal. I didn't realize there were cmake variables related to old hdrgen spread out throughout more of the source tree. Link: #117220 Link: #117208 >From ebb64d56b041

[clang] [llvm] [libc] remove references to LIBC_HDRGEN_ONLY (PR #118670)

2024-12-04 Thread Nick Desaulniers via cfe-commits
@@ -69,8 +69,8 @@ function(llvm_create_cross_target project_name target_name toolchain buildtype) "-DLLVM_EXTERNAL_${name}_SOURCE_DIR=${LLVM_EXTERNAL_${name}_SOURCE_DIR}") endforeach() - if("libc" IN_LIST LLVM_ENABLE_PROJECTS AND NOT LIBC_HDRGEN_EXE) -set(lib

[clang] [llvm] [libc] remove references to LIBC_HDRGEN_ONLY (PR #118670)

2024-12-04 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers updated https://github.com/llvm/llvm-project/pull/118670 >From ebb64d56b04182104f90783b86cf30e74ab00c3c Mon Sep 17 00:00:00 2001 From: Nick Desaulniers Date: Wed, 4 Dec 2024 09:20:01 -0800 Subject: [PATCH 1/2] [libc] remove references to LIBC_HDRGEN_ONLY Furt

[clang] [llvm] [libc] remove references to LIBC_HDRGEN_ONLY (PR #118670)

2024-12-04 Thread Nick Desaulniers via cfe-commits
@@ -69,8 +69,8 @@ function(llvm_create_cross_target project_name target_name toolchain buildtype) "-DLLVM_EXTERNAL_${name}_SOURCE_DIR=${LLVM_EXTERNAL_${name}_SOURCE_DIR}") endforeach() - if("libc" IN_LIST LLVM_ENABLE_PROJECTS AND NOT LIBC_HDRGEN_EXE) -set(lib

[clang] [libc] [libc] Support baremetal libc on aarch64 (PR #118691)

2024-12-04 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers approved this pull request. https://github.com/llvm/llvm-project/pull/118691 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread Safety Analysis: Support warning on obtaining address of guarded variables (PR #123063)

2025-02-04 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: Can any of the members in the structs be reorganized to put the mutex member declaration BEFORE the members they guard? Probably not always, but perhaps that's possible for most structures? https://github.com/llvm/llvm-project/pull/123063

[clang] Thread Safety Analysis: Support warning on obtaining address of guarded variables (PR #123063)

2025-02-04 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: > > Doesn't `counted_by` have the same requirements? If not, why does > > guarded_by? > > It does, AFAIK. But counted_by _isn't_ using `-fexperimental-late-parse-attributes` IIUC. Do they have the same problem then of needing to reorder member declarations? cc @kees @i

[clang] Thread Safety Analysis: Support warning on obtaining address of guarded variables (PR #123063)

2025-02-04 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: Looks like the kernel patches [use](https://github.com/google/kernel-sanitizers/commit/81883e1fa377d866c288192b6eb8334bcf10f38f) `-fexperimental-late-parse-attributes`? :( https://github.com/llvm/llvm-project/pull/123063 ___ cf

[clang] [clang][ARM] disable frame pointers by default for bare metal ARM targets (PR #117140)

2024-11-21 Thread Nick Desaulniers via cfe-commits
@@ -151,6 +152,10 @@ static bool useFramePointerForTargetByDefault(const llvm::opt::ArgList &Args, } } + if (toolchains::isARMBareMetal(Triple)) { +return false; + } nickdesaulniers wrote: https://llvm.org/docs/CodingStandards.html#don-t-use-brac

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-27 Thread Nick Desaulniers via cfe-commits
@@ -1060,236 +1061,362 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-27 Thread Nick Desaulniers via cfe-commits
@@ -1049,236 +1050,362 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-27 Thread Nick Desaulniers via cfe-commits
@@ -1060,236 +1061,362 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-27 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers edited https://github.com/llvm/llvm-project/pull/122198 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-27 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers approved this pull request. Thanks, I appreciate the comments about common usage patterns; they help make it easier to understand (subjectively) the 4 cases you handle in code. I still think we may need to triple check how this extension behaves with count fi

[clang] [llvm] [Clang] Cleanup docs and comments relating to -fextend-variable-liveness (PR #124767)

2025-01-28 Thread Nick Desaulniers via cfe-commits
@@ -4352,19 +4352,11 @@ def stack_usage_file : Separate<["-"], "stack-usage-file">, def fextend_variable_liveness_EQ : Joined<["-"], "fextend-variable-liveness=">, Group, Visibility<[ClangOption, CC1Option]>, HelpText<"Extend the liveness of user variables through optimiza

[clang] [llvm] [Clang] Cleanup docs and comments relating to -fextend-variable-liveness (PR #124767)

2025-01-28 Thread Nick Desaulniers via cfe-commits
@@ -4352,19 +4352,11 @@ def stack_usage_file : Separate<["-"], "stack-usage-file">, def fextend_variable_liveness_EQ : Joined<["-"], "fextend-variable-liveness=">, Group, Visibility<[ClangOption, CC1Option]>, HelpText<"Extend the liveness of user variables through optimiza

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-14 Thread Nick Desaulniers via cfe-commits
@@ -1060,238 +1061,348 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-14 Thread Nick Desaulniers via cfe-commits
@@ -1060,238 +1061,348 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-14 Thread Nick Desaulniers via cfe-commits
@@ -1060,238 +1061,348 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-14 Thread Nick Desaulniers via cfe-commits
@@ -1060,238 +1061,348 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-15 Thread Nick Desaulniers via cfe-commits
@@ -1060,236 +1061,355 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-15 Thread Nick Desaulniers via cfe-commits
@@ -1060,236 +1061,355 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-15 Thread Nick Desaulniers via cfe-commits
@@ -1060,236 +1061,355 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-15 Thread Nick Desaulniers via cfe-commits
@@ -1060,236 +1061,355 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-15 Thread Nick Desaulniers via cfe-commits
@@ -1060,238 +1061,348 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-15 Thread Nick Desaulniers via cfe-commits
@@ -1060,236 +1061,355 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-15 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers edited https://github.com/llvm/llvm-project/pull/122198 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-15 Thread Nick Desaulniers via cfe-commits
@@ -1060,236 +1061,355 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-15 Thread Nick Desaulniers via cfe-commits
@@ -1060,238 +1061,348 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-15 Thread Nick Desaulniers via cfe-commits
@@ -1060,238 +1061,348 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-15 Thread Nick Desaulniers via cfe-commits
@@ -1060,238 +1061,348 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-15 Thread Nick Desaulniers via cfe-commits
@@ -1060,238 +1061,348 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-15 Thread Nick Desaulniers via cfe-commits
@@ -1060,238 +1061,348 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-15 Thread Nick Desaulniers via cfe-commits
@@ -1060,238 +1061,348 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2025-03-18 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: For the life of me, I cannot figure out how the hell to get `ExcludeHeaderFilterRegex` in a `.clang-tidy` file to work... Trying to exclude more than one file. @justincady help! https://github.com/llvm/llvm-project/pull/91400

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2025-03-19 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: hmm...thanks for testing it out. I think something else must be going wrong for me. I'm running clang-tidy via bazel via [bazel_clang_tidy](https://github.com/erenon/bazel_clang_tidy) which is perhaps complicating things. It seems to be running on my .h files itself(?)

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2025-03-19 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: Looks like I can add `tags = ["noclangtidy"],` to my bazel rules for my headers I'm trying to exclude. That works for me! https://github.com/llvm/llvm-project/pull/91400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2025-03-18 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: > Sadly no, this does not exist yet and the linked issue is for tracking that > feature. @5chmidti #52959 is marked closed and the commit that closed it doesn't look related. https://github.com/llvm/llvm-project/pull/91400 ___

<    1   2   3   4   5