[clang] [clang-format] NEVER allow && to be an unary operator. (PR #78852)

2024-01-20 Thread S. B. Tam via cfe-commits

cpplearner wrote:

Unary `&&` is a GCC extension to get the address of a label. See 
https://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html

Does this PR change the formatting of reasonable code that uses unary `&&`, 
e.g. `void *ptr; /* … */ ptr = &&foo;` in a function body?

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


[clang] [clang][Sema] Don't emit 'declared here' note for builtin functions with no decl in source (PR #93394)

2024-05-28 Thread S. B. Tam via cfe-commits


@@ -5,7 +5,6 @@ void similar() { // expected-note {{'similar' declared here}}
   if constexpr (similer<>) {} // expected-error {{use of undeclared identifier 
'similer'; did you mean 'similar'?}}
 }
 void a() { if constexpr (__adl_swap<>) {}} // expected-error{{use of 
undeclared identifier '__adl_swap'; did you mean '__sync_swap'?}} \

cpplearner wrote:

```suggestion
void a() { if constexpr (__adl_swap<>) {}} // expected-error{{use of undeclared 
identifier '__adl_swap'; did you mean '__sync_swap'?}}
```

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