[Lldb-commits] [PATCH] D151683: [clang] Enable C++11-style attributes in all language modes

2023-08-07 Thread Evgeny Eltsin via Phabricator via lldb-commits
eaeltsin added a comment.

Hi,

Is it a known issue, that clang doesn't compile `void foo(char *argv[] 
[[maybe_unused]]) {}` ?

https://godbolt.org/z/r9E81cWxh - clang fails, but gcc doesn't.

It looks like there is a lot of oss code of the form `void foo(char *argv[] 
ATTRIBUTE_UNUSED)`, where `ATTRIBUTE_UNUSED` was configured to 
`__attribute__((unused))` before this change (thus compiled ok) and to 
`[[maybe_unused]]` after this change (thus started to break).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151683/new/

https://reviews.llvm.org/D151683

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


[Lldb-commits] [PATCH] D131858: [clang] Track the templated entity in type substitution.

2022-10-21 Thread Evgeny Eltsin via Phabricator via lldb-commits
eaeltsin added a comment.

Heads-up - I'm seeing the compilation failure that reduces to this commit. I 
didn't get a reproducer of the reasonable size yet :(

The problem occurs when using modules only.

The module has code like:

  template 
  class A {
   public:
T x;
template 
friend H Helper(H h, const A& a) {
  return H::foo(std::move(h), a.x);
}
  };

Then, when the module client uses `Helper`, we get an error:

  header.h:46:12: error: inline function 'Helper' is not defined 
[-Werror,-Wundefined-inline]

If I move `Helper` definition out of friend declaration:

  template 
  class A {
   public:
T x;
template 
friend H Helper(H h, const A& a);
  };
  
  template 
  H Helper(H h, const A& a) {
return H::foo(std::move(h), a.x);
  }

things compile ok.

Without modules, both versions compile ok.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131858/new/

https://reviews.llvm.org/D131858

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