[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2023-11-11 Thread Robin Caloudis via cfe-commits

robincaloudis wrote:

Ping

https://github.com/llvm/llvm-project/pull/71313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtainig Clang" section (PR #71313)

2023-11-05 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis created 
https://github.com/llvm/llvm-project/pull/71313

The documentation is written relatively to `clang-llvm`, not the root 
repository directory. Therefore, the `llvm-project` repo needs to be cloned 
into the existing directory `clang-llvm`. As cloning into an existing directory 
is only allowed if the directory is empty, I added `mkdir ~/clang-llvm` to make 
the intent of creating an empty directory explicit.

>From 85d6cfbcebc97e3893f79d1cd39b1718f6e928d4 Mon Sep 17 00:00:00 2001
From: Robin Caloudis <53619127+robincalou...@users.noreply.github.com>
Date: Sun, 5 Nov 2023 13:34:29 +0100
Subject: [PATCH] [clang][docs] Improve "Obtainig Clang" section

The documentation is written relatively to `clang-llvm`, not the root 
repository directory. Therefore, the `llvm-project` repo needs to be cloned 
into the existing directory `clang-llvm`. As cloning into an existing directory 
is only allowed if the directory is empty, I added `mkdir ~/clang-llvm` to make 
the intent of creating an empty directory explicit.
---
 clang/docs/LibASTMatchersTutorial.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/clang/docs/LibASTMatchersTutorial.rst 
b/clang/docs/LibASTMatchersTutorial.rst
index 37c9f178fa8df31..2a3f052f2e9ce15 100644
--- a/clang/docs/LibASTMatchersTutorial.rst
+++ b/clang/docs/LibASTMatchersTutorial.rst
@@ -22,8 +22,8 @@ started guide `_.
 
 .. code-block:: console
 
-  cd ~/clang-llvm
-  git clone https://github.com/llvm/llvm-project.git
+  mkdir ~/clang-llvm && cd ~/clang-llvm
+  git clone https://github.com/llvm/llvm-project.git .
 
 Next you need to obtain the CMake build system and Ninja build tool.
 

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2023-11-05 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/71313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2023-11-05 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis updated 
https://github.com/llvm/llvm-project/pull/71313

>From a2862b11889a0ce5ad696c6397a1a557f72c2191 Mon Sep 17 00:00:00 2001
From: Robin Caloudis <53619127+robincalou...@users.noreply.github.com>
Date: Sun, 5 Nov 2023 13:34:29 +0100
Subject: [PATCH] [clang][docs] Improve "Obtaining Clang" section

The documentation is written relatively to
`clang-llvm`, not the root repository directory.
Therefore, the `llvm-project` repo needs to be
cloned into the existing directory `clang-llvm`.
As cloning into an existing directory is only
allowed if the directory is empty, I added
`mkdir ~/clang-llvm` to make the intent of
creating an empty directory explicit.
---
 clang/docs/LibASTMatchersTutorial.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/clang/docs/LibASTMatchersTutorial.rst 
b/clang/docs/LibASTMatchersTutorial.rst
index 37c9f178fa8df31..2a3f052f2e9ce15 100644
--- a/clang/docs/LibASTMatchersTutorial.rst
+++ b/clang/docs/LibASTMatchersTutorial.rst
@@ -22,8 +22,8 @@ started guide `_.
 
 .. code-block:: console
 
-  cd ~/clang-llvm
-  git clone https://github.com/llvm/llvm-project.git
+  mkdir ~/clang-llvm && cd ~/clang-llvm
+  git clone https://github.com/llvm/llvm-project.git .
 
 Next you need to obtain the CMake build system and Ninja build tool.
 

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2023-11-06 Thread Robin Caloudis via cfe-commits

robincaloudis wrote:

 @r4nt, could you please review? Thank you.

https://github.com/llvm/llvm-project/pull/71313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2023-12-14 Thread Robin Caloudis via cfe-commits

robincaloudis wrote:

Ping.

https://github.com/llvm/llvm-project/pull/71313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2023-12-14 Thread Robin Caloudis via cfe-commits

robincaloudis wrote:

Ping

https://github.com/llvm/llvm-project/pull/71313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [HLSL] Remove double pow intrinsics (PR #86407)

2024-03-23 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis created 
https://github.com/llvm/llvm-project/pull/86407

This change removes the pow intrinsics with parameters of type double as it is 
not available in the DCX (trunk) compiler.

Introduced during 
https://github.com/llvm/llvm-project/commit/df5137e984a607248cd31ed67aa3822e8ac2a083.

Documentation for HLSL pow function is available here: 
https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-pow#parameters

Closes https://github.com/llvm/llvm-project/issues/86181

>From 119a7efc998c04b3ad9354999112f669a333ca37 Mon Sep 17 00:00:00 2001
From: Robin Caloudis 
Date: Sat, 23 Mar 2024 19:12:08 +0100
Subject: [PATCH] [HLSL] Remove double pow intrinsics

This change removes the pow intrinsics with parameters of type double as it is 
not available in the DCX (trunk) compiler.

Introduced during 
https://github.com/llvm/llvm-project/commit/df5137e984a607248cd31ed67aa3822e8ac2a083.

Documentation for HLSL pow function is available here:
https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-pow#parameters
---
 clang/lib/Headers/hlsl/hlsl_intrinsics.h |  9 -
 clang/test/CodeGenHLSL/builtins/pow.hlsl | 13 -
 2 files changed, 22 deletions(-)

diff --git a/clang/lib/Headers/hlsl/hlsl_intrinsics.h 
b/clang/lib/Headers/hlsl/hlsl_intrinsics.h
index 5e703772b7ee4f..0d6baccd7c0ac9 100644
--- a/clang/lib/Headers/hlsl/hlsl_intrinsics.h
+++ b/clang/lib/Headers/hlsl/hlsl_intrinsics.h
@@ -1174,15 +1174,6 @@ float3 pow(float3, float3);
 _HLSL_BUILTIN_ALIAS(__builtin_elementwise_pow)
 float4 pow(float4, float4);
 
-_HLSL_BUILTIN_ALIAS(__builtin_elementwise_pow)
-double pow(double, double);
-_HLSL_BUILTIN_ALIAS(__builtin_elementwise_pow)
-double2 pow(double2, double2);
-_HLSL_BUILTIN_ALIAS(__builtin_elementwise_pow)
-double3 pow(double3, double3);
-_HLSL_BUILTIN_ALIAS(__builtin_elementwise_pow)
-double4 pow(double4, double4);
-
 
//===--===//
 // reversebits builtins
 
//===--===//
diff --git a/clang/test/CodeGenHLSL/builtins/pow.hlsl 
b/clang/test/CodeGenHLSL/builtins/pow.hlsl
index e996ca2f336410..057cd7215aa5af 100644
--- a/clang/test/CodeGenHLSL/builtins/pow.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/pow.hlsl
@@ -39,16 +39,3 @@ float3 test_pow_float3(float3 p0, float3 p1) { return 
pow(p0, p1); }
 // CHECK: define noundef <4 x float> @"?test_pow_float4
 // CHECK: call <4 x float> @llvm.pow.v4f32
 float4 test_pow_float4(float4 p0, float4 p1) { return pow(p0, p1); }
-
-// CHECK: define noundef double @"?test_pow_double@@YANNN@Z"(
-// CHECK: call double @llvm.pow.f64(
-double test_pow_double(double p0, double p1) { return pow(p0, p1); }
-// CHECK: define noundef <2 x double> 
@"?test_pow_double2@@YAT?$__vector@N$01@__clang@@T12@0@Z"(
-// CHECK: call <2 x double> @llvm.pow.v2f64
-double2 test_pow_double2(double2 p0, double2 p1) { return pow(p0, p1); }
-// CHECK: define noundef <3 x double> 
@"?test_pow_double3@@YAT?$__vector@N$02@__clang@@T12@0@Z"(
-// CHECK: call <3 x double> @llvm.pow.v3f64
-double3 test_pow_double3(double3 p0, double3 p1) { return pow(p0, p1); }
-// CHECK: define noundef <4 x double> 
@"?test_pow_double4@@YAT?$__vector@N$03@__clang@@T12@0@Z"(
-// CHECK: call <4 x double> @llvm.pow.v4f64
-double4 test_pow_double4(double4 p0, double4 p1) { return pow(p0, p1); }

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [HLSL] Remove double pow intrinsics (PR #86407)

2024-03-23 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/86407
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [HLSL] Remove double pow intrinsics (PR #86407)

2024-03-23 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/86407
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [HLSL] Remove double pow intrinsics (PR #86407)

2024-03-23 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/86407
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [HLSL] Remove double pow intrinsics (PR #86407)

2024-03-23 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/86407
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [HLSL] Remove double pow intrinsics (PR #86407)

2024-03-23 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/86407
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] WIP: Metadirective uses default for non-const user condition (PR #86457)

2024-03-24 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis created 
https://github.com/llvm/llvm-project/pull/86457

As reported in https://github.com/llvm/llvm-project/issues/82754, 
Metadirectives uses default for non-const user condition. This is unexpected as 
the OpenMP specification 5.1 allows dynamic `condition` selector within 
Metadirectives. In contrast static `condition` selector work.

### Example:
```c++
int non_const_val = 1; // A non const value makes the `condition` selector 
dynamic; a const value makes it static
#pragma omp metadirective \
when( user= {condition(non_const_val > 0)} : parallel num_threads( 
num_threads ) ) \
default()
{
#pragma omp single
assert( num_threads == omp_get_num_threads() );
} 
```
where as `user` is called _selector set_ and `condition` is called _selector_ 
(must evaluate to true for the selector to be true). 

## Background informations
### As of OpenMP 5.1, dynamic `condition` selectors seem to be allowed
"[...] Any non-constant expression that is evaluated to determine the 
suitability of a variant is evaluated according to the data state trait in the 
dynamic trait set of the OpenMP context. The user selector set is dynamic if 
the _condition selector_ is present and the expression in the condition 
selector is not a constant expression; otherwise, it is static. [...]"

### Assembled grammar (copied from OpenMP 5.1. specification on 
[Metadirectives](https://www.openmp.org/spec-html/5.1/openmpsu28.html#x45-440002.3.4)
 and [Context 
Selectors](https://www.openmp.org/spec-html/5.1/openmpsu26.html#x43-420002.3.2)):
There is a change that wrong semantics (meaning) are attached against the 
`trait-selector` when it is a dynamic condition selector
```c++
#pragma omp metadirective [clause[ [,] clause] ... ] new-line
// where clause is one of the following:  
when(context-selector-specification: [directive-variant]) 
default([directive-variant])
// where context-selector-specification is
context-selector-specification: 
   trait-set-selector[,trait-set-selector[,...]] 
 // where trait-set-selector is
trait-set-selector: 
   trait-set-selector-name={trait-selector[, trait-selector[, ...]]} 
```
Specification of 
[Metadirectives](https://www.openmp.org/spec-html/5.1/openmpsu26.html#x43-420002.3.2)
 in OpenMP 5.1

Issue: https://github.com/llvm/llvm-project/issues/82754

>From bc962815d5587ffb16a178b4b766ffe36ee1c8a0 Mon Sep 17 00:00:00 2001
From: Robin Caloudis 
Date: Sun, 24 Mar 2024 21:37:33 +0100
Subject: [PATCH] Reproduce reported issue

---
 clang/test/OpenMP/metadirective_ast_print.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/clang/test/OpenMP/metadirective_ast_print.c 
b/clang/test/OpenMP/metadirective_ast_print.c
index d9ff7e76452160..afc150610f197b 100644
--- a/clang/test/OpenMP/metadirective_ast_print.c
+++ b/clang/test/OpenMP/metadirective_ast_print.c
@@ -77,6 +77,11 @@ void foo(void) {
: parallel) default(nothing)
   for (int i = 0; i < 16; i++)
 ;
+
+  int non_const_val = 1;
+#pragma omp metadirective when(user = {condition(non_const_val > 0)} \
+   : parallel) default(nothing)
+  bar();
 }
 
 // CHECK: void bar(void);
@@ -107,5 +112,8 @@ void foo(void) {
 // CHECK-AMDGCN-NEXT: for (int i = 0; i < 100; i++)
 // CHECK: for (int i = 0; i < 16; i++)
 // CHECK: for (int i = 0; i < 16; i++)
+// CHECK: int non_const_val = 1;
+// CHECK-NEXT: #pragma omp parallel
+// CHECK-NEXT: bar()
 
 #endif

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] WIP: Metadirective uses default for non-const user condition (PR #86457)

2024-03-24 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis converted_to_draft 
https://github.com/llvm/llvm-project/pull/86457
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] WIP: Allow dynamic `condition` selector in Metadirective (PR #86457)

2024-03-24 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/86457
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] WIP: Allow dynamic `condition` selector in Metadirective (PR #86457)

2024-03-24 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/86457
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] WIP: Allow dynamic `condition` selector in Metadirective (PR #86457)

2024-03-24 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/86457
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] WIP: Allow dynamic `condition` selector in Metadirective (PR #86457)

2024-03-24 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/86457
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] WIP: Allow dynamic `condition` selector in Metadirective (PR #86457)

2024-03-24 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/86457
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] WIP: Allow dynamic `condition` selector in Metadirective (PR #86457)

2024-03-24 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/86457
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] WIP: Allow dynamic `condition` selector in Metadirective (PR #86457)

2024-03-24 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/86457
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] WIP: Allow dynamic `condition` selector in Metadirective (PR #86457)

2024-03-24 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/86457
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] WIP: Allow dynamic `condition` selector in Metadirective (PR #86457)

2024-03-24 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/86457
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] WIP: Allow dynamic `condition` selector in Metadirective (PR #86457)

2024-03-24 Thread Robin Caloudis via cfe-commits

robincaloudis wrote:

>From what I understood, I'd say that there is a chance that wrong semantics 
>are attached against the `trait-selector` when it is a dynamic condition 
>selector, i.e. `condition(non_const_val > 0)`. I'd base my argumentation on 
>the fact that static condition selector do work. @shiltian, what do you think? 
>Any other idea?

Code where `selector-set` (i.e. `user={}`) is parsed: 
https://github.com/llvm/llvm-project/blob/main/clang/lib/Parse/ParseOpenMP.cpp#L2649-L2657

Code where `selector`(i.e. `condition(non_const_val > 0)`) is parsed: 
https://github.com/llvm/llvm-project/blob/main/clang/lib/Parse/ParseOpenMP.cpp#L1185-L1225

https://github.com/llvm/llvm-project/pull/86457
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] WIP: Allow dynamic `condition` selector in Metadirective (PR #86457)

2024-03-24 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/86457
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow dynamic `condition` selector in Metadirective (PR #86457)

2024-03-24 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/86457
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow dynamic `condition` selector in Metadirective (PR #86457)

2024-03-24 Thread Robin Caloudis via cfe-commits


@@ -107,5 +112,8 @@ void foo(void) {
 // CHECK-AMDGCN-NEXT: for (int i = 0; i < 100; i++)
 // CHECK: for (int i = 0; i < 16; i++)
 // CHECK: for (int i = 0; i < 16; i++)
+// CHECK: int non_const_val = 1;
+// CHECK-NEXT: #pragma omp parallel

robincaloudis wrote:

`#pragma omp parallel` will not be written as the default for non-const user 
condition is used

https://github.com/llvm/llvm-project/pull/86457
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow dynamic `condition` selector in Metadirective (PR #86457)

2024-03-25 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/86457
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow dynamic `condition` selector in Metadirective (PR #86457)

2024-03-25 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/86457
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [HLSL] Remove double pow intrinsics (PR #86407)

2024-03-25 Thread Robin Caloudis via cfe-commits

robincaloudis wrote:

@llvm-beanz, thanks for the review. I miss write access. Can you merge the PR? 
Thanks.

https://github.com/llvm/llvm-project/pull/86407
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis updated 
https://github.com/llvm/llvm-project/pull/71313

>From 2cf3b28661ca28f4858bda0e933c48a71b3125ba Mon Sep 17 00:00:00 2001
From: Robin Caloudis <53619127+robincalou...@users.noreply.github.com>
Date: Sun, 5 Nov 2023 13:34:29 +0100
Subject: [PATCH] [clang][docs] Improve "Obtaining Clang" section

The documentation is written relatively to
`clang-llvm`, not the root repository directory.
Therefore, the `llvm-project` repo needs to be
cloned into the existing directory `clang-llvm`.
I added `mkdir ~/clang-llvm` to make the intent
of creating an empty directory explicit.
Furthermore, additional steps have been modified
accordingly.
---
 clang/docs/LibASTMatchersTutorial.rst | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/clang/docs/LibASTMatchersTutorial.rst 
b/clang/docs/LibASTMatchersTutorial.rst
index 37c9f178fa8df3..e49ca5f0d61104 100644
--- a/clang/docs/LibASTMatchersTutorial.rst
+++ b/clang/docs/LibASTMatchersTutorial.rst
@@ -22,7 +22,7 @@ started guide `_.
 
 .. code-block:: console
 
-  cd ~/clang-llvm
+  mkdir ~/clang-llvm && cd ~/clang-llvm
   git clone https://github.com/llvm/llvm-project.git
 
 Next you need to obtain the CMake build system and Ninja build tool.
@@ -33,11 +33,11 @@ Next you need to obtain the CMake build system and Ninja 
build tool.
   git clone https://github.com/martine/ninja.git
   cd ninja
   git checkout release
-  ./bootstrap.py
+  ./configure.py
   sudo cp ninja /usr/bin/
 
   cd ~/clang-llvm
-  git clone git://cmake.org/stage/cmake.git
+  git clone https://gitlab.kitware.com/cmake/cmake.git
   cd cmake
   git checkout next
   ./bootstrap
@@ -50,7 +50,7 @@ Okay. Now we'll build Clang!
 
   cd ~/clang-llvm
   mkdir build && cd build
-  cmake -G Ninja ../llvm -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" 
-DLLVM_BUILD_TESTS=ON  # Enable tests; default is off.
+  cmake -G Ninja ../llvm-project/llvm -DCMAKE_BUILD_TYPE=Debug 
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DLLVM_BUILD_TESTS=ON  # 
Enable tests; default is off.
   ninja
   ninja check   # Test LLVM only.
   ninja clang-test  # Test Clang only.
@@ -65,7 +65,7 @@ Finally, we want to set Clang as its own compiler.
 .. code-block:: console
 
   cd ~/clang-llvm/build
-  ccmake ../llvm
+  ccmake ../llvm-project/llvm
 
 The second command will bring up a GUI for configuring Clang. You need
 to set the entry for ``CMAKE_CXX_COMPILER``. Press ``'t'`` to turn on
@@ -89,7 +89,7 @@ live in the ``clang-tools-extra`` repository.
 
 .. code-block:: console
 
-  cd ~/clang-llvm
+  cd ~/clang-llvm/llvm-project
   mkdir clang-tools-extra/loop-convert
   echo 'add_subdirectory(loop-convert)' >> clang-tools-extra/CMakeLists.txt
   vim clang-tools-extra/loop-convert/CMakeLists.txt
@@ -314,7 +314,7 @@ handiwork:
 
 .. code-block:: console
 
-  cd ~/clang-llvm/llvm/llvm_build/
+  cd ~/clang-llvm/build/
   ninja loop-convert
   vim ~/test-files/simple-loops.cc
   bin/loop-convert ~/test-files/simple-loops.cc

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/71313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/71313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/71313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/71313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/71313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits


@@ -22,8 +22,8 @@ started guide `_.
 
 .. code-block:: console
 
-  cd ~/clang-llvm
-  git clone https://github.com/llvm/llvm-project.git
+  mkdir ~/clang-llvm && cd ~/clang-llvm
+  git clone https://github.com/llvm/llvm-project.git .

robincaloudis wrote:

Thanks for the review @jrtc27. Indeed, having the `llvm-project` subdirectory 
is much cleaner. I updated all required steps. Found some more outdated 
details. Please re-review. Thank you.

https://github.com/llvm/llvm-project/pull/71313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis updated 
https://github.com/llvm/llvm-project/pull/71313

>From 78dba920a2a714461c054b83554230b3d73c9e28 Mon Sep 17 00:00:00 2001
From: Robin Caloudis <53619127+robincalou...@users.noreply.github.com>
Date: Sun, 5 Nov 2023 13:34:29 +0100
Subject: [PATCH] [clang][docs] Improve "Obtaining Clang" section

The documentation is written relatively to
`clang-llvm`, not the root repository directory.
Therefore, the `llvm-project` repo needs to be
cloned into the existing directory `clang-llvm`.
I added `mkdir ~/clang-llvm` to make the intent
of creating an empty directory explicit.
Furthermore, additional steps have been modified
accordingly.
---
 clang/docs/LibASTMatchersTutorial.rst | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/clang/docs/LibASTMatchersTutorial.rst 
b/clang/docs/LibASTMatchersTutorial.rst
index 37c9f178fa8df31..a333040686a4562 100644
--- a/clang/docs/LibASTMatchersTutorial.rst
+++ b/clang/docs/LibASTMatchersTutorial.rst
@@ -22,7 +22,7 @@ started guide `_.
 
 .. code-block:: console
 
-  cd ~/clang-llvm
+  mkdir ~/clang-llvm && cd ~/clang-llvm
   git clone https://github.com/llvm/llvm-project.git
 
 Next you need to obtain the CMake build system and Ninja build tool.
@@ -33,11 +33,11 @@ Next you need to obtain the CMake build system and Ninja 
build tool.
   git clone https://github.com/martine/ninja.git
   cd ninja
   git checkout release
-  ./bootstrap.py
+  ./configure.py
   sudo cp ninja /usr/bin/
 
   cd ~/clang-llvm
-  git clone git://cmake.org/stage/cmake.git
+  git clone https://gitlab.kitware.com/cmake/cmake.git
   cd cmake
   git checkout next
   ./bootstrap
@@ -50,7 +50,7 @@ Okay. Now we'll build Clang!
 
   cd ~/clang-llvm
   mkdir build && cd build
-  cmake -G Ninja ../llvm -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" 
-DLLVM_BUILD_TESTS=ON  # Enable tests; default is off.
+  cmake -G Ninja ../llvm-project/llvm 
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DLLVM_BUILD_TESTS=ON  # 
Enable tests; default is off.
   ninja
   ninja check   # Test LLVM only.
   ninja clang-test  # Test Clang only.
@@ -65,7 +65,7 @@ Finally, we want to set Clang as its own compiler.
 .. code-block:: console
 
   cd ~/clang-llvm/build
-  ccmake ../llvm
+  ccmake ../llvm-project/llvm
 
 The second command will bring up a GUI for configuring Clang. You need
 to set the entry for ``CMAKE_CXX_COMPILER``. Press ``'t'`` to turn on
@@ -89,7 +89,7 @@ live in the ``clang-tools-extra`` repository.
 
 .. code-block:: console
 
-  cd ~/clang-llvm
+  cd ~/clang-llvm/llvm-project
   mkdir clang-tools-extra/loop-convert
   echo 'add_subdirectory(loop-convert)' >> clang-tools-extra/CMakeLists.txt
   vim clang-tools-extra/loop-convert/CMakeLists.txt
@@ -314,7 +314,7 @@ handiwork:
 
 .. code-block:: console
 
-  cd ~/clang-llvm/llvm/llvm_build/
+  cd ~/clang-llvm/build/
   ninja loop-convert
   vim ~/test-files/simple-loops.cc
   bin/loop-convert ~/test-files/simple-loops.cc

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis updated 
https://github.com/llvm/llvm-project/pull/71313

>From 1f9e58d79dd25a2ddeb1252a53950ae4cee961a2 Mon Sep 17 00:00:00 2001
From: Robin Caloudis <53619127+robincalou...@users.noreply.github.com>
Date: Sun, 5 Nov 2023 13:34:29 +0100
Subject: [PATCH] [clang][docs] Improve "Obtaining Clang" section

The documentation is written relatively to
`clang-llvm`, not the root repository directory.
Therefore, the `llvm-project` repo needs to be
cloned into the existing directory `clang-llvm`.
I added `mkdir ~/clang-llvm` to make the intent
of creating an empty directory explicit.
Furthermore, additional steps have been modified
accordingly.
---
 clang/docs/LibASTMatchersTutorial.rst | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/clang/docs/LibASTMatchersTutorial.rst 
b/clang/docs/LibASTMatchersTutorial.rst
index 37c9f178fa8df3..7947d46e04f86e 100644
--- a/clang/docs/LibASTMatchersTutorial.rst
+++ b/clang/docs/LibASTMatchersTutorial.rst
@@ -22,7 +22,7 @@ started guide `_.
 
 .. code-block:: console
 
-  cd ~/clang-llvm
+  mkdir ~/clang-llvm && cd ~/clang-llvm
   git clone https://github.com/llvm/llvm-project.git
 
 Next you need to obtain the CMake build system and Ninja build tool.
@@ -33,11 +33,11 @@ Next you need to obtain the CMake build system and Ninja 
build tool.
   git clone https://github.com/martine/ninja.git
   cd ninja
   git checkout release
-  ./bootstrap.py
+  ./configure.py
   sudo cp ninja /usr/bin/
 
   cd ~/clang-llvm
-  git clone git://cmake.org/stage/cmake.git
+  git clone https://gitlab.kitware.com/cmake/cmake.git
   cd cmake
   git checkout next
   ./bootstrap
@@ -50,7 +50,7 @@ Okay. Now we'll build Clang!
 
   cd ~/clang-llvm
   mkdir build && cd build
-  cmake -G Ninja ../llvm -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" 
-DLLVM_BUILD_TESTS=ON  # Enable tests; default is off.
+  cmake -G Ninja ../llvm-project/llvm 
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DCMAKE_BUILD_TYPE=Release 
-DLLVM_BUILD_TESTS=ON
   ninja
   ninja check   # Test LLVM only.
   ninja clang-test  # Test Clang only.
@@ -65,7 +65,7 @@ Finally, we want to set Clang as its own compiler.
 .. code-block:: console
 
   cd ~/clang-llvm/build
-  ccmake ../llvm
+  ccmake ../llvm-project/llvm
 
 The second command will bring up a GUI for configuring Clang. You need
 to set the entry for ``CMAKE_CXX_COMPILER``. Press ``'t'`` to turn on
@@ -89,7 +89,7 @@ live in the ``clang-tools-extra`` repository.
 
 .. code-block:: console
 
-  cd ~/clang-llvm
+  cd ~/clang-llvm/llvm-project
   mkdir clang-tools-extra/loop-convert
   echo 'add_subdirectory(loop-convert)' >> clang-tools-extra/CMakeLists.txt
   vim clang-tools-extra/loop-convert/CMakeLists.txt
@@ -314,7 +314,7 @@ handiwork:
 
 .. code-block:: console
 
-  cd ~/clang-llvm/llvm/llvm_build/
+  cd ~/clang-llvm/build/
   ninja loop-convert
   vim ~/test-files/simple-loops.cc
   bin/loop-convert ~/test-files/simple-loops.cc

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [clang-tools-extra] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis updated 
https://github.com/llvm/llvm-project/pull/71313

>From 1f9e58d79dd25a2ddeb1252a53950ae4cee961a2 Mon Sep 17 00:00:00 2001
From: Robin Caloudis <53619127+robincalou...@users.noreply.github.com>
Date: Sun, 5 Nov 2023 13:34:29 +0100
Subject: [PATCH] [clang][docs] Improve "Obtaining Clang" section

The documentation is written relatively to
`clang-llvm`, not the root repository directory.
Therefore, the `llvm-project` repo needs to be
cloned into the existing directory `clang-llvm`.
I added `mkdir ~/clang-llvm` to make the intent
of creating an empty directory explicit.
Furthermore, additional steps have been modified
accordingly.
---
 clang/docs/LibASTMatchersTutorial.rst | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/clang/docs/LibASTMatchersTutorial.rst 
b/clang/docs/LibASTMatchersTutorial.rst
index 37c9f178fa8df31..7947d46e04f86e5 100644
--- a/clang/docs/LibASTMatchersTutorial.rst
+++ b/clang/docs/LibASTMatchersTutorial.rst
@@ -22,7 +22,7 @@ started guide `_.
 
 .. code-block:: console
 
-  cd ~/clang-llvm
+  mkdir ~/clang-llvm && cd ~/clang-llvm
   git clone https://github.com/llvm/llvm-project.git
 
 Next you need to obtain the CMake build system and Ninja build tool.
@@ -33,11 +33,11 @@ Next you need to obtain the CMake build system and Ninja 
build tool.
   git clone https://github.com/martine/ninja.git
   cd ninja
   git checkout release
-  ./bootstrap.py
+  ./configure.py
   sudo cp ninja /usr/bin/
 
   cd ~/clang-llvm
-  git clone git://cmake.org/stage/cmake.git
+  git clone https://gitlab.kitware.com/cmake/cmake.git
   cd cmake
   git checkout next
   ./bootstrap
@@ -50,7 +50,7 @@ Okay. Now we'll build Clang!
 
   cd ~/clang-llvm
   mkdir build && cd build
-  cmake -G Ninja ../llvm -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" 
-DLLVM_BUILD_TESTS=ON  # Enable tests; default is off.
+  cmake -G Ninja ../llvm-project/llvm 
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DCMAKE_BUILD_TYPE=Release 
-DLLVM_BUILD_TESTS=ON
   ninja
   ninja check   # Test LLVM only.
   ninja clang-test  # Test Clang only.
@@ -65,7 +65,7 @@ Finally, we want to set Clang as its own compiler.
 .. code-block:: console
 
   cd ~/clang-llvm/build
-  ccmake ../llvm
+  ccmake ../llvm-project/llvm
 
 The second command will bring up a GUI for configuring Clang. You need
 to set the entry for ``CMAKE_CXX_COMPILER``. Press ``'t'`` to turn on
@@ -89,7 +89,7 @@ live in the ``clang-tools-extra`` repository.
 
 .. code-block:: console
 
-  cd ~/clang-llvm
+  cd ~/clang-llvm/llvm-project
   mkdir clang-tools-extra/loop-convert
   echo 'add_subdirectory(loop-convert)' >> clang-tools-extra/CMakeLists.txt
   vim clang-tools-extra/loop-convert/CMakeLists.txt
@@ -314,7 +314,7 @@ handiwork:
 
 .. code-block:: console
 
-  cd ~/clang-llvm/llvm/llvm_build/
+  cd ~/clang-llvm/build/
   ninja loop-convert
   vim ~/test-files/simple-loops.cc
   bin/loop-convert ~/test-files/simple-loops.cc

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis updated 
https://github.com/llvm/llvm-project/pull/71313

>From a23a5aa4027a8b98c71b0d42c14789d8f0c0b33e Mon Sep 17 00:00:00 2001
From: Robin Caloudis <53619127+robincalou...@users.noreply.github.com>
Date: Sun, 5 Nov 2023 13:34:29 +0100
Subject: [PATCH] [clang][docs] Improve "Obtaining Clang" section

The documentation is written relatively to
`clang-llvm`, not the root repository directory.
Therefore, the `llvm-project` repo needs to be
cloned into the existing directory `clang-llvm`.
I added `mkdir ~/clang-llvm` to make the intent
of creating an empty directory explicit.
Furthermore, additional steps have been modified
accordingly.
---
 clang/docs/LibASTMatchersTutorial.rst | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/clang/docs/LibASTMatchersTutorial.rst 
b/clang/docs/LibASTMatchersTutorial.rst
index 2a58502a8de4e75..7947d46e04f86e5 100644
--- a/clang/docs/LibASTMatchersTutorial.rst
+++ b/clang/docs/LibASTMatchersTutorial.rst
@@ -22,7 +22,7 @@ started guide `_.
 
 .. code-block:: console
 
-  cd ~/clang-llvm
+  mkdir ~/clang-llvm && cd ~/clang-llvm
   git clone https://github.com/llvm/llvm-project.git
 
 Next you need to obtain the CMake build system and Ninja build tool.
@@ -33,11 +33,11 @@ Next you need to obtain the CMake build system and Ninja 
build tool.
   git clone https://github.com/martine/ninja.git
   cd ninja
   git checkout release
-  ./bootstrap.py
+  ./configure.py
   sudo cp ninja /usr/bin/
 
   cd ~/clang-llvm
-  git clone git://cmake.org/stage/cmake.git
+  git clone https://gitlab.kitware.com/cmake/cmake.git
   cd cmake
   git checkout next
   ./bootstrap
@@ -50,7 +50,7 @@ Okay. Now we'll build Clang!
 
   cd ~/clang-llvm
   mkdir build && cd build
-  cmake -G Ninja ../llvm -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" 
-DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_TESTS=ON
+  cmake -G Ninja ../llvm-project/llvm 
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DCMAKE_BUILD_TYPE=Release 
-DLLVM_BUILD_TESTS=ON
   ninja
   ninja check   # Test LLVM only.
   ninja clang-test  # Test Clang only.
@@ -65,7 +65,7 @@ Finally, we want to set Clang as its own compiler.
 .. code-block:: console
 
   cd ~/clang-llvm/build
-  ccmake ../llvm
+  ccmake ../llvm-project/llvm
 
 The second command will bring up a GUI for configuring Clang. You need
 to set the entry for ``CMAKE_CXX_COMPILER``. Press ``'t'`` to turn on
@@ -89,7 +89,7 @@ live in the ``clang-tools-extra`` repository.
 
 .. code-block:: console
 
-  cd ~/clang-llvm
+  cd ~/clang-llvm/llvm-project
   mkdir clang-tools-extra/loop-convert
   echo 'add_subdirectory(loop-convert)' >> clang-tools-extra/CMakeLists.txt
   vim clang-tools-extra/loop-convert/CMakeLists.txt
@@ -314,7 +314,7 @@ handiwork:
 
 .. code-block:: console
 
-  cd ~/clang-llvm/llvm/llvm_build/
+  cd ~/clang-llvm/build/
   ninja loop-convert
   vim ~/test-files/simple-loops.cc
   bin/loop-convert ~/test-files/simple-loops.cc

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/71313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/71313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis updated 
https://github.com/llvm/llvm-project/pull/71313

>From 5e9e94d33342fb8aec1b7b864f2344790e392d4a Mon Sep 17 00:00:00 2001
From: Robin Caloudis <53619127+robincalou...@users.noreply.github.com>
Date: Sun, 5 Nov 2023 13:34:29 +0100
Subject: [PATCH] [clang][docs] Improve "Obtaining Clang" section

The documentation is written relatively to
`clang-llvm`, not the root repository directory.
Therefore, the `llvm-project` repo needs to be
cloned into the existing directory `clang-llvm`.
I added `mkdir ~/clang-llvm` to make the intent
of creating an empty directory explicit.
Furthermore, additional steps have been modified
accordingly.
---
 clang/docs/LibASTMatchersTutorial.rst | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/clang/docs/LibASTMatchersTutorial.rst 
b/clang/docs/LibASTMatchersTutorial.rst
index 2a58502a8de4e7..d2883688ebfacc 100644
--- a/clang/docs/LibASTMatchersTutorial.rst
+++ b/clang/docs/LibASTMatchersTutorial.rst
@@ -22,7 +22,7 @@ started guide `_.
 
 .. code-block:: console
 
-  cd ~/clang-llvm
+  mkdir ~/clang-llvm && cd ~/clang-llvm
   git clone https://github.com/llvm/llvm-project.git
 
 Next you need to obtain the CMake build system and Ninja build tool.
@@ -33,11 +33,11 @@ Next you need to obtain the CMake build system and Ninja 
build tool.
   git clone https://github.com/martine/ninja.git
   cd ninja
   git checkout release
-  ./bootstrap.py
+  ./configure.py --bootstrap
   sudo cp ninja /usr/bin/
 
   cd ~/clang-llvm
-  git clone git://cmake.org/stage/cmake.git
+  git clone https://gitlab.kitware.com/cmake/cmake.git
   cd cmake
   git checkout next
   ./bootstrap
@@ -50,7 +50,7 @@ Okay. Now we'll build Clang!
 
   cd ~/clang-llvm
   mkdir build && cd build
-  cmake -G Ninja ../llvm -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" 
-DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_TESTS=ON
+  cmake -G Ninja ../llvm-project/llvm 
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DCMAKE_BUILD_TYPE=Release 
-DLLVM_BUILD_TESTS=ON
   ninja
   ninja check   # Test LLVM only.
   ninja clang-test  # Test Clang only.
@@ -65,7 +65,7 @@ Finally, we want to set Clang as its own compiler.
 .. code-block:: console
 
   cd ~/clang-llvm/build
-  ccmake ../llvm
+  ccmake ../llvm-project/llvm
 
 The second command will bring up a GUI for configuring Clang. You need
 to set the entry for ``CMAKE_CXX_COMPILER``. Press ``'t'`` to turn on
@@ -89,7 +89,7 @@ live in the ``clang-tools-extra`` repository.
 
 .. code-block:: console
 
-  cd ~/clang-llvm
+  cd ~/clang-llvm/llvm-project
   mkdir clang-tools-extra/loop-convert
   echo 'add_subdirectory(loop-convert)' >> clang-tools-extra/CMakeLists.txt
   vim clang-tools-extra/loop-convert/CMakeLists.txt
@@ -314,7 +314,7 @@ handiwork:
 
 .. code-block:: console
 
-  cd ~/clang-llvm/llvm/llvm_build/
+  cd ~/clang-llvm/build/
   ninja loop-convert
   vim ~/test-files/simple-loops.cc
   bin/loop-convert ~/test-files/simple-loops.cc

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/71313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/71313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/71313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/71313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/71313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/71313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits

robincaloudis wrote:

> Though please make sure to update the PR message (which will become the 
> commit message) before merging, as it's no longer accurate

Thanks. Description is updated ๐Ÿ‘ 

https://github.com/llvm/llvm-project/pull/71313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/71313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/71313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/71313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits

robincaloudis wrote:

@jrtc27, I do not have write access. All checks passed. Can you merge the PR? 
Thanks. 

https://github.com/llvm/llvm-project/pull/71313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-format] Add space after a word token (PR #92741)

2024-05-20 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis created 
https://github.com/llvm/llvm-project/pull/92741

Closes https://github.com/llvm/llvm-project/issues/92688

>From 9e8c360029fb6789360ad4296e2f14098db76dd6 Mon Sep 17 00:00:00 2001
From: Robin Caloudis 
Date: Mon, 20 May 2024 13:21:32 +0200
Subject: [PATCH 1/2] Test binary after unary operator

---
 clang/unittests/Format/FormatTest.cpp | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/clang/unittests/Format/FormatTest.cpp 
b/clang/unittests/Format/FormatTest.cpp
index 6f57f10e12e88..ca0edd7b22630 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -24545,6 +24545,13 @@ TEST_F(FormatTest, STLWhileNotDefineChed) {
"#endif // while");
 }
 
+TEST_F(FormatTest, BinaryOperatorAfterUnaryOperator) {
+  verifyFormat("void test(void) {\n"
+   "  static void (*xor)(uint8_t *, size_t, uint8_t);\n"
+   "  xor = resolve_xor_x86();\n"
+   "}");
+}
+
 TEST_F(FormatTest, OperatorSpacing) {
   FormatStyle Style = getLLVMStyle();
   Style.PointerAlignment = FormatStyle::PAS_Right;

>From 76e17eee617ee4ec9fb2562579a38c60cce0f76a Mon Sep 17 00:00:00 2001
From: Robin Caloudis 
Date: Mon, 20 May 2024 13:21:54 +0200
Subject: [PATCH 2/2] Support binary after unary operator

---
 clang/lib/Format/TokenAnnotator.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/clang/lib/Format/TokenAnnotator.cpp 
b/clang/lib/Format/TokenAnnotator.cpp
index 7c4c76a91f2c5..7786b85e8a1fc 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -5280,7 +5280,8 @@ bool TokenAnnotator::spaceRequiredBefore(const 
AnnotatedLine &Line,
 // handled.
 if (Left.is(tok::amp) && Right.is(tok::r_square))
   return Style.SpacesInSquareBrackets;
-return Style.SpaceAfterLogicalNot && Left.is(tok::exclaim);
+return (Style.SpaceAfterLogicalNot && Left.is(tok::exclaim)) ||
+   Right.is(TT_BinaryOperator);
   }
 
   // If the next token is a binary operator or a selector name, we have

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-format] Add space after a word token (PR #92741)

2024-05-20 Thread Robin Caloudis via cfe-commits

robincaloudis wrote:

Even though this PR gives us the correct behavior, I do not think it is good. 

Since I am by no means an expert on Clang, a few questions arose
* Why is `xor` tokenized as unary operator even though it's a word token in C?
* How to properly distinguish between keyword difference in the C and C++ 
language? 

https://github.com/llvm/llvm-project/pull/92741
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-format] Add space after a word token (PR #92741)

2024-05-20 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis ready_for_review 
https://github.com/llvm/llvm-project/pull/92741
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-format] Add space after a word token (PR #92741)

2024-05-22 Thread Robin Caloudis via cfe-commits

robincaloudis wrote:

Thanks @owenca, @mydeveloperday and @HazardyKnusperkeks for the explanation and 
insights! I'm closing this issue as @owenca found a much better solution.

https://github.com/llvm/llvm-project/pull/92741
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-format] Add space after a word token (PR #92741)

2024-05-22 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis closed 
https://github.com/llvm/llvm-project/pull/92741
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Update CSymbolMap (PR #139107)

2025-05-08 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis created 
https://github.com/llvm/llvm-project/pull/139107

None



  



Rate limit ยท GitHub


  body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe 
UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;
font-size: 14px;
line-height: 1.5;
margin: 0;
  }

  .container { margin: 50px auto; max-width: 600px; text-align: center; 
padding: 0 24px; }

  a { color: #0366d6; text-decoration: none; }
  a:hover { text-decoration: underline; }

  h1 { line-height: 60px; font-size: 48px; font-weight: 300; margin: 0px; 
text-shadow: 0 1px 0 #fff; }
  p { color: rgba(0, 0, 0, 0.5); margin: 20px 0 40px; }

  ul { list-style: none; margin: 25px 0; padding: 0; }
  li { display: table-cell; font-weight: bold; width: 1%; }

  .logo { display: inline-block; margin-top: 35px; }
  .logo-img-2x { display: none; }
  @media
  only screen and (-webkit-min-device-pixel-ratio: 2),
  only screen and (   min--moz-device-pixel-ratio: 2),
  only screen and ( -o-min-device-pixel-ratio: 2/1),
  only screen and (min-device-pixel-ratio: 2),
  only screen and (min-resolution: 192dpi),
  only screen and (min-resolution: 2dppx) {
.logo-img-1x { display: none; }
.logo-img-2x { display: inline-block; }
  }

  #suggestions {
margin-top: 35px;
color: #ccc;
  }
  #suggestions a {
color: #66;
font-weight: 200;
font-size: 14px;
margin: 0 10px;
  }


  
  



  Whoa there!
  You have exceeded a secondary rate limit.
Please wait a few minutes before you try again;
in some cases this may take up to an hour.
  
  
https://support.github.com/contact";>Contact Support โ€”
https://githubstatus.com";>GitHub Status โ€”
https://twitter.com/githubstatus";>@githubstatus
  

  

  

  

  

  


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix tests of lookup table generator (PR #139463)

2025-05-11 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/139463
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Provide qualified symbol as argument (PR #139463)

2025-05-11 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis created 
https://github.com/llvm/llvm-project/pull/139463

None

>From 6b842dfb2e81a0438f380b86fc4392bf0316f31c Mon Sep 17 00:00:00 2001
From: Robin Caloudis 
Date: Sun, 11 May 2025 21:36:59 +0200
Subject: [PATCH] Provide qualified symbol as argument

---
 clang/tools/include-mapping/test.py | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/clang/tools/include-mapping/test.py 
b/clang/tools/include-mapping/test.py
index eef328381f2bb..cff8862e6e026 100755
--- a/clang/tools/include-mapping/test.py
+++ b/clang/tools/include-mapping/test.py
@@ -52,7 +52,7 @@ def testParseSymbolPage_SingleHeader(self):
   
 
 """
-self.assertEqual(_ParseSymbolPage(html, "foo"), set([""]))
+self.assertEqual(_ParseSymbolPage(html, "foo", "foo"), 
set([""]))
 
 def testParseSymbolPage_MulHeaders(self):
 #  Defined in header 
@@ -92,7 +92,7 @@ def testParseSymbolPage_MulHeaders(self):
   
 
 """
-self.assertEqual(_ParseSymbolPage(html, "foo"), set(["", 
""]))
+self.assertEqual(_ParseSymbolPage(html, "foo", "foo"), 
set(["", ""]))
 
 def testParseSymbolPage_MulHeadersInSameDiv(self):
 # Multile  blocks in a Div.
@@ -118,7 +118,7 @@ def testParseSymbolPage_MulHeadersInSameDiv(self):
 
 """
 self.assertEqual(
-_ParseSymbolPage(html, "foo"), set(["", ""])
+_ParseSymbolPage(html, "foo", "foo"), set(["", 
""])
 )
 
 def testParseSymbolPage_MulSymbolsInSameTd(self):
@@ -142,8 +142,8 @@ def testParseSymbolPage_MulSymbolsInSameTd(self):
 
 
 """
-self.assertEqual(_ParseSymbolPage(html, "int8_t"), set([""]))
-self.assertEqual(_ParseSymbolPage(html, "int16_t"), set([""]))
+self.assertEqual(_ParseSymbolPage(html, "int8_t", "int8_t"), 
set([""]))
+self.assertEqual(_ParseSymbolPage(html, "int16_t", "int16_t"), 
set([""]))
 
 
 if __name__ == "__main__":

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix tests of lookup table generator (PR #139463)

2025-05-11 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis updated 
https://github.com/llvm/llvm-project/pull/139463



  



Rate limit ยท GitHub


  body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe 
UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;
font-size: 14px;
line-height: 1.5;
margin: 0;
  }

  .container { margin: 50px auto; max-width: 600px; text-align: center; 
padding: 0 24px; }

  a { color: #0366d6; text-decoration: none; }
  a:hover { text-decoration: underline; }

  h1 { line-height: 60px; font-size: 48px; font-weight: 300; margin: 0px; 
text-shadow: 0 1px 0 #fff; }
  p { color: rgba(0, 0, 0, 0.5); margin: 20px 0 40px; }

  ul { list-style: none; margin: 25px 0; padding: 0; }
  li { display: table-cell; font-weight: bold; width: 1%; }

  .logo { display: inline-block; margin-top: 35px; }
  .logo-img-2x { display: none; }
  @media
  only screen and (-webkit-min-device-pixel-ratio: 2),
  only screen and (   min--moz-device-pixel-ratio: 2),
  only screen and ( -o-min-device-pixel-ratio: 2/1),
  only screen and (min-device-pixel-ratio: 2),
  only screen and (min-resolution: 192dpi),
  only screen and (min-resolution: 2dppx) {
.logo-img-1x { display: none; }
.logo-img-2x { display: inline-block; }
  }

  #suggestions {
margin-top: 35px;
color: #ccc;
  }
  #suggestions a {
color: #66;
font-weight: 200;
font-size: 14px;
margin: 0 10px;
  }


  
  



  Whoa there!
  You have exceeded a secondary rate limit.
Please wait a few minutes before you try again;
in some cases this may take up to an hour.
  
  
https://support.github.com/contact";>Contact Support โ€”
https://githubstatus.com";>GitHub Status โ€”
https://twitter.com/githubstatus";>@githubstatus
  

  

  

  

  

  


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix tests of lookup table generator (PR #139463)

2025-05-11 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/139463
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix tests of lookup table generator (PR #139463)

2025-05-11 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis edited 
https://github.com/llvm/llvm-project/pull/139463
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix tests of lookup table generator (PR #139463)

2025-05-11 Thread Robin Caloudis via cfe-commits

https://github.com/robincaloudis ready_for_review 
https://github.com/llvm/llvm-project/pull/139463
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix tests of lookup table generator (PR #139463)

2025-05-27 Thread Robin Caloudis via cfe-commits

robincaloudis wrote:

@kadircet, can you merge this PR? I lack write access. Thank you.

https://github.com/llvm/llvm-project/pull/139463
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix tests of lookup table generator (PR #139463)

2025-05-26 Thread Robin Caloudis via cfe-commits

robincaloudis wrote:

@owenca and @ MyDeveloperDay, do you mind to take a look when you find some 
time? Thanks in advance.

https://github.com/llvm/llvm-project/pull/139463
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits