[clang] [clang][ScanDeps] Canonicalize -D and -U flags (PR #82298)

2024-02-21 Thread Michael Spencer via cfe-commits
Bigcheese wrote: Weird that it passes on macOS. Also weird that discord doesn't ping about build failures anymore, seems that merging on github now just blames all CI failures on noreply@​github.com. https://github.com/llvm/llvm-project/pull/82298

[clang] [clang][ScanDeps] Canonicalize -D and -U flags (PR #82298)

2024-02-20 Thread Nico Weber via cfe-commits
nico wrote: Also failing here https://lab.llvm.org/buildbot/#/builders/259/builds/126 and here https://lab.llvm.org/buildbot/#/builders/139/builds/59858 Given that the bots have been broken for a few hours now, I'll revert. https://github.com/llvm/llvm-project/pull/82298

[clang] [clang][ScanDeps] Canonicalize -D and -U flags (PR #82298)

2024-02-20 Thread Nico Weber via cfe-commits
nico wrote: The test is failing at least on my bot: http://45.33.8.238/linux/131314/step_7.txt I'm guessing this is some unicode/sed thing? It's a pretty vanilla linux machine. (It uses a non-standard non-supported build system, but at least from a distance that looks unrelated?)

[clang] [clang][ScanDeps] Canonicalize -D and -U flags (PR #82298)

2024-02-20 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese closed https://github.com/llvm/llvm-project/pull/82298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ScanDeps] Canonicalize -D and -U flags (PR #82298)

2024-02-20 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese updated https://github.com/llvm/llvm-project/pull/82298 >From b60972ed9183dd9e2deb3860f7732dc87bdfc84e Mon Sep 17 00:00:00 2001 From: Michael Spencer Date: Fri, 16 Feb 2024 22:05:25 -0800 Subject: [PATCH] Canonicalize -D and -U flags Canonicalize `-D` and `-U`

[clang] [clang][ScanDeps] Canonicalize -D and -U flags (PR #82298)

2024-02-20 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/82298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ScanDeps] Canonicalize -D and -U flags (PR #82298)

2024-02-20 Thread Jan Svoboda via cfe-commits
@@ -179,6 +179,73 @@ static void sanitizeDiagOpts(DiagnosticOptions ) { DiagOpts.IgnoreWarnings = true; } +// Clang implements -D and -U by splatting text into a predefines buffer. This +// allows constructs such as `-DFඞ=3 "-D F\u{0D9E} 4 3 2”` to be accepted and +//

[clang] [clang][ScanDeps] Canonicalize -D and -U flags (PR #82298)

2024-02-19 Thread Michael Spencer via cfe-commits
@@ -179,6 +179,73 @@ static void sanitizeDiagOpts(DiagnosticOptions ) { DiagOpts.IgnoreWarnings = true; } +// Clang implements -D and -U by splatting text into a predefines buffer. This +// allows constructs such as `-DFඞ=3 "-D F\u{0D9E} 4 3 2”` to be accepted and +//

[clang] [clang][ScanDeps] Canonicalize -D and -U flags (PR #82298)

2024-02-19 Thread Jan Svoboda via cfe-commits
@@ -179,6 +179,73 @@ static void sanitizeDiagOpts(DiagnosticOptions ) { DiagOpts.IgnoreWarnings = true; } +// Clang implements -D and -U by splatting text into a predefines buffer. This +// allows constructs such as `-DFඞ=3 "-D F\u{0D9E} 4 3 2”` to be accepted and +//

[clang] [clang][ScanDeps] Canonicalize -D and -U flags (PR #82298)

2024-02-19 Thread Jan Svoboda via cfe-commits
@@ -179,6 +179,73 @@ static void sanitizeDiagOpts(DiagnosticOptions ) { DiagOpts.IgnoreWarnings = true; } +// Clang implements -D and -U by splatting text into a predefines buffer. This +// allows constructs such as `-DFඞ=3 "-D F\u{0D9E} 4 3 2”` to be accepted and +//

[clang] [clang][ScanDeps] Canonicalize -D and -U flags (PR #82298)

2024-02-19 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 61ae7e498253d72422cef853798fc2bee1c731cf c89bcfd061066433c90b854ebb0bc369268797ee --

[clang] [clang][ScanDeps] Canonicalize -D and -U flags (PR #82298)

2024-02-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Michael Spencer (Bigcheese) Changes Canonicalize `-D` and `-U` flags by sorting them and only keeping the last instance of a given name. This optimization will only fire if all `-D` and `-U` flags start with a simple identifier that we

[clang] [clang][ScanDeps] Canonicalize -D and -U flags (PR #82298)

2024-02-19 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese created https://github.com/llvm/llvm-project/pull/82298 Canonicalize `-D` and `-U` flags by sorting them and only keeping the last instance of a given name. This optimization will only fire if all `-D` and `-U` flags start with a simple identifier that we can