owenca wrote:
> Because if this code was in a .h and not a .c you wouldn't know what language
> you were in
This would be addressed by #128287 and #128122.
https://github.com/llvm/llvm-project/pull/92741
___
cfe-commits mailing list
cfe-commits@lists
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
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
owenca wrote:
See #92880.
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
HazardyKnusperkeks wrote:
> > Since I am by no means an expert on Clang, a few questions arose
> >
> > * As Clang formats the code correctly (no code changes necessary) when
> > instead of `xor` a different function name e.g. `xooor` is used, I wonder
> > why `xor` is tokenized as Unary operat
mydeveloperday wrote:
I thought we had some code like this around using a variable called "try"
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-
mydeveloperday wrote:
Because if this code was in a .h and not a .c you wouldn't know what language
you were in
https://github.com/llvm/llvm-project/pull/92741
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mail
@@ -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);
+retu
owenca wrote:
> Since I am by no means an expert on Clang, a few questions arose
>
> * As Clang formats the code correctly (no code changes necessary) when
> instead of `xor` a different function name e.g. `xooor` is used, I wonder why
> `xor` is tokenized as Unary operator in the first place
llvmbot wrote:
@llvm/pr-subscribers-clang-format
Author: Robin Caloudis (robincaloudis)
Changes
Closes https://github.com/llvm/llvm-project/issues/92688
---
Full diff: https://github.com/llvm/llvm-project/pull/92741.diff
2 Files Affected:
- (modified) clang/lib/Format/TokenAnnotator.cp
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
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 differ
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
13 matches
Mail list logo