[clang] [clang][deps] Properly capture the global module and '\n' for all module directives (PR #148685)

2025-07-16 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth edited https://github.com/llvm/llvm-project/pull/148685 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Recognize 'module;' in dependency directive scanner (PR #148685)

2025-07-16 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/148685 >From 7a759271c54b78eb940bf12274bcc535a3df22e3 Mon Sep 17 00:00:00 2001 From: Naveen Seth Hanig Date: Mon, 14 Jul 2025 19:17:10 +0200 Subject: [PATCH 1/3] [clang][deps] Recognize 'module;' in dependency dire

[clang] [clang][deps] Fix dependency scanner misidentifying 'import::' as module partition (PR #148674)

2025-07-14 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth closed https://github.com/llvm/llvm-project/pull/148674 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Remove code related to trigraphs (PR #148640)

2025-07-14 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth commented: Hi, I've requested the reviewers of [#147156](https://github.com/llvm/llvm-project/pull/147156) for this since I don't understand this topic all too well. https://github.com/llvm/llvm-project/pull/148640 ___

[clang] [clang][deps] Recognize 'module;' in dependency directive scanner (PR #148685)

2025-07-14 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/148685 >From 7a759271c54b78eb940bf12274bcc535a3df22e3 Mon Sep 17 00:00:00 2001 From: Naveen Seth Hanig Date: Mon, 14 Jul 2025 19:17:10 +0200 Subject: [PATCH 1/2] [clang][deps] Recognize 'module;' in dependency dire

[clang] [clang][deps] Recognize 'module;' in dependency directive scanner (PR #148685)

2025-07-14 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth edited https://github.com/llvm/llvm-project/pull/148685 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Recognize 'module;' in dependency directive scanner (PR #148685)

2025-07-14 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth created https://github.com/llvm/llvm-project/pull/148685 With this change, the dependency directive scanner now properly identifies "module;" as a directive, as per P1857R3. Previously, the global module fragment was not recognized by the scanner. >From 7a759271c

[clang] [clang][deps] Fix dependency scanner misidentifying 'import::' as module partition (PR #148674)

2025-07-14 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/148674 >From bb1c20a40fa8635b8987733708979729d54aa02e Mon Sep 17 00:00:00 2001 From: Naveen Seth Hanig Date: Mon, 14 Jul 2025 18:44:01 +0200 Subject: [PATCH 1/2] [clang][deps] Fix dependency scanner misidentifying

[clang] [clang][deps] Fix dependency scanner misidentifying 'import::' as module partition (PR #148674)

2025-07-14 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth created https://github.com/llvm/llvm-project/pull/148674 The dependency directive scanner was incorrectly classifying namespaces such as `import::inner xi` as directives. According to [P1857R3](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1857r3.html

[clang] Reland [clang][modules-driver] Add scanner to detect C++20 module presence (PR #147630)

2025-07-08 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/147630 >From 6b440de2ed76a6095c4b68ba1301dfbd19f9a285 Mon Sep 17 00:00:00 2001 From: Naveen Seth Hanig Date: Fri, 13 Jun 2025 09:19:21 +0200 Subject: [PATCH 1/2] Reland [clang][modules-driver] Add scanner to detect

[clang] Reland [clang][modules-driver] Add scanner to detect C++20 module presence (PR #147630)

2025-07-08 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth created https://github.com/llvm/llvm-project/pull/147630 This patch is part of a series to natively support C++20 module usage from the Clang driver (without requiring an external build system). This introduces a new scanner that detects C++20 module usage in sou

[clang] Revert "[clang][modules-driver] Add scanner to detect C++20 module presence" (PR #147286)

2025-07-07 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth approved this pull request. https://github.com/llvm/llvm-project/pull/147286 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules-driver] Add scanner to detect C++20 module presence (PR #145220)

2025-07-07 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth closed https://github.com/llvm/llvm-project/pull/145220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules-driver] Add scanner to detect C++20 module presence (PR #145220)

2025-07-04 Thread Naveen Seth Hanig via cfe-commits
naveen-seth wrote: Done. For the regression test, I've updated it to use `--allow-empty` instead of forcing output using `clang -v` (+formatting & removed duplicate flags). Thank you for the reviews. https://github.com/llvm/llvm-project/pull/145220 _

[clang] [clang][modules-driver] Add scanner to detect C++20 module presence (PR #145220)

2025-07-04 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/145220 >From 2574e28fd8dd33d4042f169576d9927ae0649ff5 Mon Sep 17 00:00:00 2001 From: Naveen Seth Hanig Date: Fri, 13 Jun 2025 09:19:21 +0200 Subject: [PATCH 1/7] [clang][modules-driver] Add scanner to detect C++20

[clang] [clang][modules-driver] Add scanner to detect C++20 module presence (PR #145220)

2025-07-03 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/145220 >From 2574e28fd8dd33d4042f169576d9927ae0649ff5 Mon Sep 17 00:00:00 2001 From: Naveen Seth Hanig Date: Fri, 13 Jun 2025 09:19:21 +0200 Subject: [PATCH 1/5] [clang][modules-driver] Add scanner to detect C++20

[clang] [clang][modules-driver] Add scanner to detect C++20 module presence (PR #145220)

2025-07-03 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/145220 >From 2574e28fd8dd33d4042f169576d9927ae0649ff5 Mon Sep 17 00:00:00 2001 From: Naveen Seth Hanig Date: Fri, 13 Jun 2025 09:19:21 +0200 Subject: [PATCH 1/4] [clang][modules-driver] Add scanner to detect C++20

[clang] [clang][modules-driver] Add scanner to detect C++20 module presence (PR #145220)

2025-07-03 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/145220 >From 2574e28fd8dd33d4042f169576d9927ae0649ff5 Mon Sep 17 00:00:00 2001 From: Naveen Seth Hanig Date: Fri, 13 Jun 2025 09:19:21 +0200 Subject: [PATCH 1/3] [clang][modules-driver] Add scanner to detect C++20

[clang] [clang][modules-driver] Add scanner to detect C++20 module presence (PR #145220)

2025-07-03 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/145220 >From 2574e28fd8dd33d4042f169576d9927ae0649ff5 Mon Sep 17 00:00:00 2001 From: Naveen Seth Hanig Date: Fri, 13 Jun 2025 09:19:21 +0200 Subject: [PATCH 1/3] [clang][modules-driver] Add scanner to detect C++20

[clang] [clang-scan-deps] Fix "unterminated conditional directive" bug (PR #146645)

2025-07-02 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth edited https://github.com/llvm/llvm-project/pull/146645 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-scan-deps] Fix "unterminated conditional directive" bug (PR #146645)

2025-07-02 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth edited https://github.com/llvm/llvm-project/pull/146645 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-scan-deps] Fix "unterminated conditional directive" bug (PR #146645)

2025-07-02 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth edited https://github.com/llvm/llvm-project/pull/146645 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-scan-deps] Fix "unterminated conditional directive" bug (PR #146645)

2025-07-02 Thread Naveen Seth Hanig via cfe-commits
@@ -393,7 +393,7 @@ static bool isQuoteCppDigitSeparator(const char *const Start, } void Scanner::skipLine(const char *&First, const char *const End) { naveen-seth wrote: My bad! The bug was introduced because I initialized `char LastNonWhitespace = ' ';` o

[clang] [clang-scan-deps] Fix "unterminated conditional directive" bug (PR #146645)

2025-07-02 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth commented: I realized that I probably should have also removed the following code in #143950: https://github.com/llvm/llvm-project/blob/2b03efc7fba813bb0c52b7016867f200a91c2d34/clang/lib/Lex/DependencyDirectivesScanner.cpp#L445-L451 The logic added in #143950 als

[clang] [clang][modules-driver] Add scanner to detect C++20 module presence (PR #145220)

2025-06-30 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/145220 >From cc92d075db7e9b0cd4c8187e9dc8e20bf4151fdc Mon Sep 17 00:00:00 2001 From: Naveen Seth Hanig Date: Fri, 13 Jun 2025 09:19:21 +0200 Subject: [PATCH 1/2] [clang][modules-driver] Add scanner to detect C++20

[clang] [clang-scan-deps] Enable test P1689.cppm on Windows (PR #145857)

2025-06-26 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth closed https://github.com/llvm/llvm-project/pull/145857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-scan-deps] Enable test P1689.cppm on Windows (PR #145857)

2025-06-26 Thread Naveen Seth Hanig via cfe-commits
naveen-seth wrote: I also checked the other tests in `test/ClangScanDeps`. This is currently the only test where Windows is disabled only because of the path seperator difference. https://github.com/llvm/llvm-project/pull/145857 ___ cfe-commits maili

[clang] [clang-scan-deps] Enable test P1689.cppm on Windows (PR #145857)

2025-06-26 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth created https://github.com/llvm/llvm-project/pull/145857 The test `test/ClangScanDeps/P1689.cppm` was previously not supported on Windows due to the differences in path separators between Windows and Linux. This normalizes the paths, allowing this test to run on

[clang] [clang-format] Handle Trailing Whitespace After Line Continuation (P2223R2) (PR #145243)

2025-06-25 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth edited https://github.com/llvm/llvm-project/pull/145243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle Trailing Whitespace After Line Continuation (P2223R2) (PR #145243)

2025-06-25 Thread Naveen Seth Hanig via cfe-commits
@@ -1295,13 +1305,18 @@ FormatToken *FormatTokenLexer::getNextToken() { case '/': // The text was entirely whitespace when this loop was entered. Thus // this has to be an escape sequence. -assert(Text.substr(i, 2) == "\\\r" || Text.substr(i, 2) ==

[clang] [clang-format] Handle Trailing Whitespace After Line Continuation (P2223R2) (PR #145243)

2025-06-24 Thread Naveen Seth Hanig via cfe-commits
@@ -1295,13 +1305,18 @@ FormatToken *FormatTokenLexer::getNextToken() { case '/': // The text was entirely whitespace when this loop was entered. Thus // this has to be an escape sequence. -assert(Text.substr(i, 2) == "\\\r" || Text.substr(i, 2) ==

[clang] [clang-format] Handle Trailing Whitespace After Line Continuation (P2223R2) (PR #145243)

2025-06-24 Thread Naveen Seth Hanig via cfe-commits
@@ -25768,6 +25768,29 @@ TEST_F(FormatTest, OperatorPassedAsAFunctionPtr) { verifyFormat("foo(operator, , -42);", Style); } +TEST_F(FormatTest, LineSpliceWithTrailingWhitespace) { + // Test that each sequence of a backslash (\) immediately followed by zero or + // more hor

[clang] [clang-format] Handle Trailing Whitespace After Line Continuation (P2223R2) (PR #145243)

2025-06-24 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth edited https://github.com/llvm/llvm-project/pull/145243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle Trailing Whitespace After Line Continuation (P2223R2) (PR #145243)

2025-06-24 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth edited https://github.com/llvm/llvm-project/pull/145243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][clang-scan-deps] Add named modules to format 'experimental-full' (PR #145221)

2025-06-24 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth edited https://github.com/llvm/llvm-project/pull/145221 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][clang-scan-deps] Add named modules to format 'experimental-full' (PR #145221)

2025-06-24 Thread Naveen Seth Hanig via cfe-commits
@@ -0,0 +1,347 @@ +// This checks that clang-scan-deps properly outputs named module dependencies +// when using the the scanning output format 'experimental-full'. +// +// See commit 72304. +// UNSUPPORTED: target={{.*}}-aix{{.*}} +// +// The slash direction in linux and windows

[clang] [clang][clang-scan-deps] Add named modules to format 'experimental-full' (PR #145221)

2025-06-24 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/145221 >From 981742eea871868d58293e9a2b58fb3ef2569e7c Mon Sep 17 00:00:00 2001 From: Naveen Seth Hanig Date: Sat, 21 Jun 2025 18:54:38 +0200 Subject: [PATCH 1/7] [clang][clang-scan-deps] Add named modules to format

[clang] [clang-format] Handle Trailing Whitespace After Line Continuation (P2223R2) (PR #145243)

2025-06-24 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth edited https://github.com/llvm/llvm-project/pull/145243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle Trailing Whitespace After Line Continuation (P2223R2) (PR #145243)

2025-06-24 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth edited https://github.com/llvm/llvm-project/pull/145243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle Trailing Whitespace After Line Continuation (P2223R2) (PR #145243)

2025-06-24 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/145243 >From 8cee6b33c54aca0ea69b3ad291287464523a3d7a Mon Sep 17 00:00:00 2001 From: Naveen Seth Hanig Date: Sun, 22 Jun 2025 18:06:07 +0200 Subject: [PATCH 1/4] [clang-format] Handle Trailing Whitespace After Line

[clang] [clang-format] Handle Trailing Whitespace After Line Continuation (P2223R2) (PR #145243)

2025-06-22 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth edited https://github.com/llvm/llvm-project/pull/145243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle Trailing Whitespace After Line Continuation (P2223R2) (PR #145243)

2025-06-22 Thread Naveen Seth Hanig via cfe-commits
@@ -0,0 +1,14 @@ +// RUN: grep -Ev "// *[A-Z-]+:" %s \ naveen-seth wrote: Sorry, I misunderstood that! Implemented as unit tests now. https://github.com/llvm/llvm-project/pull/145243 ___ cfe-commits mailing list cfe-co

[clang] [clang-format] Handle Trailing Whitespace After Line Continuation (P2223R2) (PR #145243)

2025-06-22 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/145243 >From 8cee6b33c54aca0ea69b3ad291287464523a3d7a Mon Sep 17 00:00:00 2001 From: Naveen Seth Hanig Date: Sun, 22 Jun 2025 18:06:07 +0200 Subject: [PATCH 1/3] [clang-format] Handle Trailing Whitespace After Line

[clang] [clang-format] Handle Trailing Whitespace After Line Continuation (P2223R2) (PR #145243)

2025-06-22 Thread Naveen Seth Hanig via cfe-commits
@@ -0,0 +1,14 @@ +// RUN: grep -Ev "// *[A-Z-]+:" %s \ naveen-seth wrote: Fixed. https://github.com/llvm/llvm-project/pull/145243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [clang-format] Handle Trailing Whitespace After Line Continuation (P2223R2) (PR #145243)

2025-06-22 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/145243 >From 8cee6b33c54aca0ea69b3ad291287464523a3d7a Mon Sep 17 00:00:00 2001 From: Naveen Seth Hanig Date: Sun, 22 Jun 2025 18:06:07 +0200 Subject: [PATCH 1/2] [clang-format] Handle Trailing Whitespace After Line

[clang] [clang-format] Handle Trailing Whitespace After Line Continuation (P2223R2) (PR #145243)

2025-06-22 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth edited https://github.com/llvm/llvm-project/pull/145243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle Trailing Whitespace After Line Continuation (P2… (PR #145243)

2025-06-22 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth edited https://github.com/llvm/llvm-project/pull/145243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle Trailing Whitespace After Line Continuation (P2… (PR #145243)

2025-06-22 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth created https://github.com/llvm/llvm-project/pull/145243 …223R2) Fixes #145226. Implement [P2223R2](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2223r2.pdf) in clang-format to correctly handle cases where a backslash '\\' is followed by trailing w

[clang] [clang][modules-driver] Add scanner to detect C++20 module presence (PR #145220)

2025-06-22 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/145220 >From cc92d075db7e9b0cd4c8187e9dc8e20bf4151fdc Mon Sep 17 00:00:00 2001 From: Naveen Seth Hanig Date: Fri, 13 Jun 2025 09:19:21 +0200 Subject: [PATCH] [clang][modules-driver] Add scanner to detect C++20 modu

[clang] [clang][modules-driver] Add scanner to detect C++20 module presence (PR #145220)

2025-06-22 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth created https://github.com/llvm/llvm-project/pull/145220 This PR is part of a series aimed at implementing native support for explicit module builds from the Clang driver. This introduces a new scanner that detects C++20 module usage in source files without using

[clang] [clang][clang-scan-deps] Add named modules to format 'experimental-full' (PR #145221)

2025-06-22 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth created https://github.com/llvm/llvm-project/pull/145221 This adds standard C++ named modules to the scanning output format 'experimental-full'. This is motivated by an effort to provide native support for explicit module builds from the Clang driver. The driver

[clang] [clang-scan-deps] Implement P2223R2 for DependencyDirectiveScanner.cpp (PR #143950)

2025-06-12 Thread Naveen Seth Hanig via cfe-commits
naveen-seth wrote: Hi @hyp, @Bigcheese, would you be available to review this? https://github.com/llvm/llvm-project/pull/143950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-scan-deps] Implement P2223R2 for DependencyDirectiveScanner.cpp (PR #143950)

2025-06-12 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth created https://github.com/llvm/llvm-project/pull/143950 P2223R2 allows the line-continuation slash `\` to be followed by additional whitespace. The Clang lexer already follows this behavior, also for versions prior to C++23. The dependency directive scanner howe

[clang] [C2y] Handle FP-suffixes on prefixed octals (#141230) (PR #141695)

2025-06-05 Thread Naveen Seth Hanig via cfe-commits
naveen-seth wrote: Thanks for the review. In case the changes get approved, please also merge it on my behalf since I don't have commit access yet. Thank you! https://github.com/llvm/llvm-project/pull/141695 ___ cfe-commits mailing list cfe-commits@l

[clang] [C2y] Handle FP-suffixes on prefixed octals (#141230) (PR #141695)

2025-06-04 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/141695 >From 8556e25c43fff5525501113f38dc0f3b48203f5c Mon Sep 17 00:00:00 2001 From: Naveen Seth Hanig Date: Wed, 28 May 2025 02:26:54 +0200 Subject: [PATCH 1/4] [C2y] Correctly handle FP-suffixes on prefixed octal

[clang] [C2y] Handle FP-suffixes on prefixed octals (#141230) (PR #141695)

2025-06-04 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/141695 >From 8556e25c43fff5525501113f38dc0f3b48203f5c Mon Sep 17 00:00:00 2001 From: Naveen Seth Hanig Date: Wed, 28 May 2025 02:26:54 +0200 Subject: [PATCH 1/3] [C2y] Correctly handle FP-suffixes on prefixed octal

[clang] [C2y] Handle FP-suffixes on prefixed octals (#141230) (PR #141695)

2025-06-04 Thread Naveen Seth Hanig via cfe-commits
naveen-seth wrote: Ping https://github.com/llvm/llvm-project/pull/141695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][clang] Move argument handling: Driver::BuildActions -> handleArguments (PR #142455)

2025-06-02 Thread Naveen Seth Hanig via cfe-commits
naveen-seth wrote: Hi @Bigcheese, can I tag you for review? https://github.com/llvm/llvm-project/pull/142455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][clang] Move argument handling: Driver::BuildActions -> handleArguments (PR #142455)

2025-06-02 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth created https://github.com/llvm/llvm-project/pull/142455 This simply moves code for diagnosing misuse of arguments `/Fo`, `/Fa`, and `/o` from `Driver::BuildActions` into `Driver::handleArguments`, following the intention of 740f69b. This change better aligns wi

[clang] [C2y] Handle FP-suffixes on prefixed octals (#141230) (PR #141695)

2025-05-28 Thread Naveen Seth Hanig via cfe-commits
@@ -1432,14 +1432,26 @@ void NumericLiteralParser::ParseNumberStartingWithZero(SourceLocation TokLoc) { Diags.Report(TokLoc, DiagId); ++s; DigitsBegin = s; -SawOctalPrefix = true; +radix = 8; naveen-seth wrote: I don't think the octal digi

[clang] [clang] Enforce 1-based indexing for command line source locations (PR #139457)

2025-05-15 Thread Naveen Seth Hanig via cfe-commits
naveen-seth wrote: Yes, please. https://github.com/llvm/llvm-project/pull/139457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Enforce 1-based indexing for command line source locations (PR #139457)

2025-05-15 Thread Naveen Seth Hanig via cfe-commits
naveen-seth wrote: Thank you for reviewing! (And apologies for the formatting and coding-standard issues on my end!) https://github.com/llvm/llvm-project/pull/139457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [clang] Enforce 1-based indexing for command line source locations (PR #139457)

2025-05-15 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/139457 >From 5f246435b9784113ada3f82328433487391f40ab Mon Sep 17 00:00:00 2001 From: naveen-seth Date: Sun, 11 May 2025 14:24:00 + Subject: [PATCH 1/8] [clang] Enforce 1-based indexing for command line source

[clang] [clang] Enforce 1-based indexing for command line source locations (PR #139457)

2025-05-14 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/139457 >From 5f246435b9784113ada3f82328433487391f40ab Mon Sep 17 00:00:00 2001 From: naveen-seth Date: Sun, 11 May 2025 14:24:00 + Subject: [PATCH 1/7] [clang] Enforce 1-based indexing for command line source

[clang] [clang] Enforce 1-based indexing for command line source locations (PR #139457)

2025-05-14 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/139457 >From 5f246435b9784113ada3f82328433487391f40ab Mon Sep 17 00:00:00 2001 From: naveen-seth Date: Sun, 11 May 2025 14:24:00 + Subject: [PATCH 1/7] [clang] Enforce 1-based indexing for command line source

[clang] [clang] Enforce 1-based indexing for command line source locations (PR #139457)

2025-05-14 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/139457 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sa

[clang] [clang] Enforce 1-based indexing for command line source locations (PR #139457)

2025-05-14 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/139457 >From 5f246435b9784113ada3f82328433487391f40ab Mon Sep 17 00:00:00 2001 From: naveen-seth Date: Sun, 11 May 2025 14:24:00 + Subject: [PATCH 1/6] [clang] Enforce 1-based indexing for command line source

[clang] [clang] Enforce 1-based indexing for command line source locations (PR #139457)

2025-05-14 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/139457 >From 5f246435b9784113ada3f82328433487391f40ab Mon Sep 17 00:00:00 2001 From: naveen-seth Date: Sun, 11 May 2025 14:24:00 + Subject: [PATCH 1/3] [clang] Enforce 1-based indexing for command line source

[clang] [clang] Enforce 1-based indexing for command line source locations (PR #139457)

2025-05-13 Thread Naveen Seth Hanig via cfe-commits
@@ -0,0 +1,6 @@ +// RUN: not %clang_cc1 -fsyntax-only -code-completion-at=%s:0:1 %s -o - +// RUN: not %clang_cc1 -fsyntax-only -code-completion-at=%s:1:0 %s -o - + +// Related to #139375 +// Clang uses 1-based indexing for source locations given from the command-line. +// Verify

[clang] [clang] Enforce 1-based indexing for command line source locations (PR #139457)

2025-05-13 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/139457 >From 5f246435b9784113ada3f82328433487391f40ab Mon Sep 17 00:00:00 2001 From: naveen-seth Date: Sun, 11 May 2025 14:24:00 + Subject: [PATCH 1/2] [clang] Enforce 1-based indexing for command line source

[clang] [clang] Enforce 1-based indexing for command line source locations (PR #139457)

2025-05-11 Thread Naveen Seth Hanig via cfe-commits
naveen-seth wrote: > Thanks for working on that. I think it might better to do that check where > `ParsedSourceLocation::FromString` is called, so that we can have a proper > front-end diagnostics for it (search for `err_fe_invalid_code_complete_file` > and `OPT_code_completion_at`) Thank you

[clang] [clang] Enforce 1-based indexing for command line source locations (PR #139457)

2025-05-11 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth created https://github.com/llvm/llvm-project/pull/139457 Fixes #139375 Clang expects command line source locations to be provided using 1-based indexing. Currently, Clang does not reject zero as invalid argument for column or line number, which can cause Clang t

[clang] [clang][modules] Validate input file format for GenerateModuleInterfaceAction (#132692) (PR #137711)

2025-04-28 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth created https://github.com/llvm/llvm-project/pull/137711 Fixes #132692. `clang -cc1` crashes when generating a module interface with `emit-module-interface` or `emit-reduced-module-interface` using an input file which is already a precompiled module (`.pcm`) fil

[clang] [clang][modules] Guard against bad -fmodule-file mappings (#132059) (PR #133462)

2025-04-07 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/133462 >From 957a45312767a40b513bfd4f545c23fda9c4866f Mon Sep 17 00:00:00 2001 From: naveen-seth Date: Tue, 8 Apr 2025 00:56:14 + Subject: [PATCH] [clang][modules] Guard against bad -fmodule-file mappings (#13

[clang] [clang][modules] Guard against bad -fmodule-file mappings (#132059) (PR #133462)

2025-04-05 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/133462 >From a23ba4d51332180ff5d1b5bc9de2d0c6c04cbf66 Mon Sep 17 00:00:00 2001 From: naveen-seth Date: Fri, 28 Mar 2025 06:59:06 +0100 Subject: [PATCH] [clang][modules] Guard against bad -fmodule-file mappings (#1

[clang] [clang][modules] Guard against bad -fmodule-file mappings (#132059) (PR #133462)

2025-04-05 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth created https://github.com/llvm/llvm-project/pull/133462 When using -fmodule-file== with incorrect inputs, the compiler crashes in two scenarios: 1. A module is mapped to the right BMI file but one of its transitively exported module dependencies is also mapped

[clang] [clang][modules] Guard against bad -fmodule-file mappings (#132059) (PR #133462)

2025-04-01 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth edited https://github.com/llvm/llvm-project/pull/133462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Guard against bad -fmodule-file mappings (#132059) (PR #133462)

2025-04-01 Thread Naveen Seth Hanig via cfe-commits
naveen-seth wrote: Hi, sorry! I left a comment earlier but noticed that a large part of the explanation was incorrect and deleted it. Here is the fixed comment: At first I thought that the issue can be fixed by just checking for duplicates while parsing the command-line arguments, but that doe

[clang] [clang][modules] Guard against bad -fmodule-file mappings (#132059) (PR #133462)

2025-04-01 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/133462 >From 74ace4fd3c71ff59f2d89680c0f1382d0f9933f4 Mon Sep 17 00:00:00 2001 From: naveen-seth Date: Fri, 28 Mar 2025 06:59:06 +0100 Subject: [PATCH 1/2] [clang][modules] Guard against bad -fmodule-file mappings

[clang] [clang][modules] Guard against bad -fmodule-file mappings (#132059) (PR #133462)

2025-03-31 Thread Naveen Seth Hanig via cfe-commits
naveen-seth wrote: Hi @ChuanqiXu9, @mpark, @shafik, For context, here is how this PR would change clang's behavior when replicating the original crash in #132059: The original crash, where the module `hello` wasn’t mapped to any BMI file, would now display the following: ```bash clang++ -fmo

[clang] [clang][modules] Guard against bad -fmodule-file mappings (#132059) (PR #133462)

2025-03-30 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/133462 >From 74ace4fd3c71ff59f2d89680c0f1382d0f9933f4 Mon Sep 17 00:00:00 2001 From: naveen-seth Date: Fri, 28 Mar 2025 06:59:06 +0100 Subject: [PATCH] [clang][modules] Guard against bad -fmodule-file mappings (#1

[clang] [clang][modules] Guard against bad -fmodule-file mappings (#132059) (PR #133462)

2025-03-30 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth edited https://github.com/llvm/llvm-project/pull/133462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Guard against bad -fmodule-file mappings (#132059) (PR #133462)

2025-03-28 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/133462 >From 804617c3083935d10f98b10e86f965e7508eb587 Mon Sep 17 00:00:00 2001 From: naveen-seth Date: Fri, 28 Mar 2025 06:59:06 +0100 Subject: [PATCH] [clang][modules] Guard against bad -fmodule-file mappings (#1

[clang] [clang][modules] Guard against bad -fmodule-file mappings (#132059) (PR #133462)

2025-03-28 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth edited https://github.com/llvm/llvm-project/pull/133462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Guard against bad -fmodule-file mappings (#132059) (PR #133462)

2025-03-28 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/133462 >From cfbc14d381b5daed70ca812daac9ceed0039b5f6 Mon Sep 17 00:00:00 2001 From: naveen-seth Date: Fri, 28 Mar 2025 06:59:06 +0100 Subject: [PATCH] [clang][modules] Guard against bad -fmodule-file mappings (#1

[clang] [clang][modules] Guard against bad -fmodule-file mappings (#132059) (PR #133462)

2025-03-28 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth reopened https://github.com/llvm/llvm-project/pull/133462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Guard against bad -fmodule-file mappings (#132059) (PR #133462)

2025-03-28 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth edited https://github.com/llvm/llvm-project/pull/133462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Guard against bad -fmodule-file mappings (#132059) (PR #133462)

2025-03-28 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth edited https://github.com/llvm/llvm-project/pull/133462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Guard against bad -fmodule-file mappings (#132059) (PR #133462)

2025-03-28 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth closed https://github.com/llvm/llvm-project/pull/133462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits