[llvm-bugs] [Bug 39927] New: [InstCombine] Attempt to replace MOVMSK with zext (bitcast to iX) to i32

2018-12-09 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=39927

Bug ID: 39927
   Summary: [InstCombine] Attempt to replace MOVMSK with zext
(bitcast  to iX) to i32
   Product: libraries
   Version: trunk
  Hardware: PC
OS: Windows NT
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Backend: X86
  Assignee: unassignedb...@nondot.org
  Reporter: llvm-...@redking.me.uk
CC: craig.top...@gmail.com, llvm-bugs@lists.llvm.org,
llvm-...@redking.me.uk, spatel+l...@rotateright.com

https://godbolt.org/z/SvH3do

Very similar to what we do with SSE BLENDV cases from a comparison+sext that
can be replaced with a select, we should now be able to replace MOVMSK
intrinsics with bitcasts from the comparison result.

PMOVMSKB 
MOVMSKPS 
MOVMSKPD 

declare i32 @llvm.x86.sse2.pmovmskb.128(<16 x i8>)

define i32 @movmsk_16i8(<16 x i8>, <16 x i8>) {
  %3 = icmp sgt <16 x i8> %0, %1
  %4 = sext <16 x i1> %3 to <16 x i8>
  %5 = tail call i32 @llvm.x86.sse2.pmovmskb.128(<16 x i8> %4)
  ret i32 %5
}

define i32 @movmsk_16i8_select(<16 x i8>, <16 x i8>) {
  %3 = icmp sgt <16 x i8> %0, %1
  %4 = bitcast <16 x i1> %3 to i16
  %5 = zext i16 %4 to i32
  ret i32 %5
}

Cases where the comparison arguments don't match the MOVMSK arguments are
trickier, but this is what I've managed so far (depending on what we do with
the MOVMSK scalar result we should be able to do a lot better):

define i32 @movmsk_8i16(<8 x i16>, <8 x i16>) {
  %3 = icmp sgt <8 x i16> %0, %1
  %4 = sext <8 x i1> %3 to <8 x i16>
  %5 = bitcast <8 x i16> %4 to <16 x i8>
  %6 = tail call i32 @llvm.x86.sse2.pmovmskb.128(<16 x i8> %5)
  ret i32 %6
}

define i32 @movmsk_8i16_select(<8 x i16>, <8 x i16>) {
  %3 = icmp sgt <8 x i16> %0, %1
  %4 = sext <8 x i1> %3 to <8 x i16>
  %5 = bitcast <8 x i16> %4 to <16 x i8>
  %6 = icmp slt <16 x i8> %5, zeroinitializer
  %7 = bitcast <16 x i1> %6 to i16
  %8 = zext i16 %7 to i32
  ret i32 %8
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 11790 in oss-fuzz: llvm/llvm-opt-fuzzer--x86_64-simplifycfg: Out-of-memory in llvm_llvm-opt-fuzzer--x86_64-simplifycfg

2018-12-09 Thread ClusterFuzz-External via monorail via llvm-bugs

Status: New
Owner: 
CC: k...@google.com, masc...@google.com, jdevlieg...@apple.com,  
igm...@gmail.com, eney...@google.com, llvm-b...@lists.llvm.org,  
j...@chromium.org, v...@apple.com, mitchphi...@outlook.com,  
xpl...@gmail.com, akils...@apple.com
Labels: ClusterFuzz Reproducible Engine-libfuzzer Proj-llvm  
Reported-2018-12-09

Type: Bug

New issue 11790 by ClusterFuzz-External:  
llvm/llvm-opt-fuzzer--x86_64-simplifycfg: Out-of-memory in  
llvm_llvm-opt-fuzzer--x86_64-simplifycfg

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11790

Detailed report: https://oss-fuzz.com/testcase?key=5644353557495808

Project: llvm
Fuzzer: libFuzzer_llvm_llvm-opt-fuzzer--x86_64-simplifycfg
Fuzz target binary: llvm-opt-fuzzer--x86_64-simplifycfg
Job Type: libfuzzer_asan_llvm
Platform Id: linux

Crash Type: Out-of-memory (exceeds 2048 MB)
Crash Address:
Crash State:
  llvm_llvm-opt-fuzzer--x86_64-simplifycfg

Sanitizer: address (ASAN)

Regressed:  
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=201801260659:201801270655


Reproducer Testcase:  
https://oss-fuzz.com/download?testcase_id=5644353557495808


Issue filed automatically.

See https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md for  
more information.


When you fix this bug, please
  * mention the fix revision(s).
  * state whether the bug was a short-lived regression or an old bug in any  
stable releases.

  * add any other useful information.
This information can help downstream consumers.

If you need to contact the OSS-Fuzz team with a question, concern, or any  
other feedback, please file an issue at  
https://github.com/google/oss-fuzz/issues.


--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 39928] New: Fails to detect redefinition of struct when nesting in C11 program.

2018-12-09 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=39928

Bug ID: 39928
   Summary: Fails to detect redefinition of struct when nesting in
C11 program.
   Product: clang
   Version: trunk
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P
 Component: -New Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: anders.granlun...@gmail.com
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
neeil...@live.com, richard-l...@metafoo.co.uk

Consider the following C11 program (prog.c):

  int main()
  { 
struct S { struct S { int a; } b; };
  }

It was compiled with the following command line:

  clang prog.c -std=c11 -pedantic-errors "-w"

The expected behaviour was to get an error about redefinition of the struct S,
but no errors are given. The two struct definitions are in the same scope
(block scope) so they should conflict. There are no struct scopes in C11.

Note that gcc gives the expected error.

Online compiler link: https://wandbox.org/permlink/JeT9d5XpZLOxJLuj

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 39929] New: Problem when declaring enum constant with old style function parameter declaration in C11.

2018-12-09 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=39929

Bug ID: 39929
   Summary: Problem when declaring enum constant with old style
function parameter declaration in C11.
   Product: clang
   Version: trunk
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P
 Component: -New Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: anders.granlun...@gmail.com
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
neeil...@live.com, richard-l...@metafoo.co.uk

Consider the following C11 program (prog.c):

  void f(e)
enum { x } e;
  {
x;
  }

  int main()
  { 
  }

I was compiling this program with:

  clang prog.c -std=c11 -pedantic-errors "-w"

The expected behaviour is that it should work, but I get the following error:

  error: use of undeclared identifier 'x'

Note that it works fine when using the new style of declaring function
parameters.

Also note that it works fine in gcc.

Link to online compiler:

  https://wandbox.org/permlink/CGczhD2xFRJkUzTs

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 36994] [llvm-exegesis] Add support for AMD CPUs

2018-12-09 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=36994

Simon Pilgrim  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED
 Fixed By Commit(s)||348617, 348721

--- Comment #4 from Simon Pilgrim  ---
Resolving - we now have 'basic' (cycle/uops) counter coverage for most AMD CPUs
going back well over a decade, and FPU perf counters for btver/bdver/znver
targets (annoyingly AMD's perf counters for other ALUs is awful).

Even if the CPU doesn't have a scheduler model, llvm-exegesis will report the
counters we now specify, which should help anyone that wants to create the
missing models.

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 11776 in oss-fuzz: llvm/clang-fuzzer: Stack-overflow in GetFullTypeForDeclarator

2018-12-09 Thread ClusterFuzz-External via monorail via llvm-bugs


Comment #1 on issue 11776 by ClusterFuzz-External: llvm/clang-fuzzer:  
Stack-overflow in GetFullTypeForDeclarator

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11776#c1

ClusterFuzz has detected this issue as fixed in range  
201812080235:201812090231.


Detailed report: https://oss-fuzz.com/testcase?key=5765470997708800

Project: llvm
Fuzzer: libFuzzer_llvm_clang-fuzzer
Fuzz target binary: clang-fuzzer
Job Type: libfuzzer_asan_llvm
Platform Id: linux

Crash Type: Stack-overflow
Crash Address: 0x7ffc0cfb4eb8
Crash State:
  GetFullTypeForDeclarator
  clang::Sema::GetTypeForDeclarator
  clang::Sema::ActOnBlockArguments

Sanitizer: address (ASAN)

Regressed:  
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=201812050231:201812060233
Fixed:  
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=201812080235:201812090231


Reproducer Testcase:  
https://oss-fuzz.com/download?testcase_id=5765470997708800


See https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md for  
more information.


If you suspect that the result above is incorrect, try re-doing that job on  
the test case report page.


--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 11776 in oss-fuzz: llvm/clang-fuzzer: Stack-overflow in GetFullTypeForDeclarator

2018-12-09 Thread ClusterFuzz-External via monorail via llvm-bugs

Updates:
Labels: ClusterFuzz-Verified
Status: Verified

Comment #2 on issue 11776 by ClusterFuzz-External: llvm/clang-fuzzer:  
Stack-overflow in GetFullTypeForDeclarator

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11776#c2

ClusterFuzz testcase 5765470997708800 is verified as fixed, so closing  
issue as verified.


If this is incorrect, please file a bug on  
https://github.com/google/oss-fuzz/issues/new


--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 10907 in oss-fuzz: llvm/clang-format-fuzzer: Timeout in llvm_clang-format-fuzzer

2018-12-09 Thread ClusterFuzz-External via monorail via llvm-bugs


Comment #4 on issue 10907 by ClusterFuzz-External:  
llvm/clang-format-fuzzer: Timeout in llvm_clang-format-fuzzer

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10907#c4

ClusterFuzz has detected this issue as fixed in range  
201812080235:201812090231.


Detailed report: https://oss-fuzz.com/testcase?key=5750465615101952

Project: llvm
Fuzzer: libFuzzer_llvm_clang-format-fuzzer
Fuzz target binary: clang-format-fuzzer
Job Type: libfuzzer_asan_llvm
Platform Id: linux

Crash Type: Timeout (exceeds 25 secs)
Crash Address:
Crash State:
  llvm_clang-format-fuzzer

Sanitizer: address (ASAN)

Regressed:  
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=201808010242:201808040250
Fixed:  
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=201812080235:201812090231


Reproducer Testcase:  
https://oss-fuzz.com/download?testcase_id=5750465615101952


See https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md for  
more information.


If you suspect that the result above is incorrect, try re-doing that job on  
the test case report page.


--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 10907 in oss-fuzz: llvm/clang-format-fuzzer: Timeout in llvm_clang-format-fuzzer

2018-12-09 Thread ClusterFuzz-External via monorail via llvm-bugs

Updates:
Labels: ClusterFuzz-Verified
Status: Verified

Comment #5 on issue 10907 by ClusterFuzz-External:  
llvm/clang-format-fuzzer: Timeout in llvm_clang-format-fuzzer

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10907#c5

ClusterFuzz testcase 5750465615101952 is verified as fixed, so closing  
issue as verified.


If this is incorrect, please file a bug on  
https://github.com/google/oss-fuzz/issues/new


--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 39930] New: Clang thinks that C11 program does not declare anything but it does.

2018-12-09 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=39930

Bug ID: 39930
   Summary: Clang thinks that C11 program does not declare
anything but it does.
   Product: clang
   Version: trunk
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P
 Component: -New Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: anders.granlun...@gmail.com
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
neeil...@live.com, richard-l...@metafoo.co.uk

Consider the following C11 program (prog.c):

  int main()
  {
struct { enum { a } b; };
  }

This program does NOT violate rule 6.7.2 in the C11 standard since the
declaration declares a member of an enum (a).

I tried to compile it with the following command line:

  clang prog.c -std=c11 -pedantic-errors "-w"

I get the following unexpected error message:

  error: declaration does not declare anything

This is wrong. The declaration does declare the enum member  a  and according
to the C11 standard it does not need to declare anything else.

Link to online compiler:

  https://wandbox.org/permlink/faE68OsNgwxxizMs

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 11791 in oss-fuzz: llvm/clang-fuzzer: Stack-overflow in clang::FunctionProtoType::getExtProtoInfo

2018-12-09 Thread ClusterFuzz-External via monorail via llvm-bugs

Status: New
Owner: 
CC: k...@google.com, masc...@google.com, jdevlieg...@apple.com,  
igm...@gmail.com, eney...@google.com, llvm-b...@lists.llvm.org,  
j...@chromium.org, v...@apple.com, mitchphi...@outlook.com,  
xpl...@gmail.com, akils...@apple.com
Labels: ClusterFuzz Stability-Memory-AddressSanitizer Reproducible  
Engine-libfuzzer Proj-llvm Reported-2018-12-09

Type: Bug

New issue 11791 by ClusterFuzz-External: llvm/clang-fuzzer: Stack-overflow  
in clang::FunctionProtoType::getExtProtoInfo

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11791

Detailed report: https://oss-fuzz.com/testcase?key=5636511282757632

Project: llvm
Fuzzer: libFuzzer_llvm_clang-fuzzer
Fuzz target binary: clang-fuzzer
Job Type: libfuzzer_asan_llvm
Platform Id: linux

Crash Type: Stack-overflow
Crash Address: 0x7ffc0f75aac8
Crash State:
  clang::FunctionProtoType::getExtProtoInfo
  clang::FunctionProtoType::Profile
  llvm::ContextualFoldingSetclang::ASTContext&>::NodeEq


Sanitizer: address (ASAN)

Reproducer Testcase:  
https://oss-fuzz.com/download?testcase_id=5636511282757632


Issue filed automatically.

See https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md for  
more information.


When you fix this bug, please
  * mention the fix revision(s).
  * state whether the bug was a short-lived regression or an old bug in any  
stable releases.

  * add any other useful information.
This information can help downstream consumers.

If you need to contact the OSS-Fuzz team with a question, concern, or any  
other feedback, please file an issue at  
https://github.com/google/oss-fuzz/issues.


--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 39931] New: False positive on -Wmissing-braces for structure with non-integer subobject

2018-12-09 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=39931

Bug ID: 39931
   Summary: False positive on -Wmissing-braces for structure with
non-integer subobject
   Product: clang
   Version: 7.0
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: Frontend
  Assignee: unassignedclangb...@nondot.org
  Reporter: pe...@lekensteyn.nl
CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
richard-l...@metafoo.co.uk

When the first subobject of a structure within another structure is not a
signed integer (e.g. unsigned integer, char, short, long), it triggers a
-Wmissing-braces warning.

Reproducer:

 struct s1 {
short f1;  // "int f1" is fine.
 };
 struct s2 {
struct s1 f2;
int x;
 };
 struct s2 x = {0};
 // warning: suggest braces around initialization of subobject
[-Wmissing-braces]

An earlier issue with the "universal zero initializer" was resolved with bug
21689 (Clang 6), but this one still remains.

Found in:
clang 7.0.0-1 (Arch Linux)
clang version 8.0.0 (trunk 348720) (llvm/trunk 348724)

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 32156] Should = { 0 }; fire -Wmissing-braces in C99?

2018-12-09 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=32156

Peter Wu  changed:

   What|Removed |Added

 CC||pe...@lekensteyn.nl
 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #5 from Peter Wu  ---
The example in the original report seems fixed and seems a duplicate, marking
it as such. (There still seem to be other unhandled edge cases such that
trigger a -Wmissing-braces warning though, bug 39931).

*** This bug has been marked as a duplicate of bug 21689 ***

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 39932] New: An undefined __label__-declared label is unnecessarily a hard error

2018-12-09 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=39932

Bug ID: 39932
   Summary: An undefined __label__-declared label is unnecessarily
a hard error
   Product: clang
   Version: unspecified
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Frontend
  Assignee: unassignedclangb...@nondot.org
  Reporter: psko...@gmail.com
CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
richard-l...@metafoo.co.uk

int main()
{
__label__ unused_label;
return 0;
}

Fails on clang but succeeds on gcc and tinycc.
I think this ought to be a silenacable warning instead of an error.

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 11795 in oss-fuzz: llvm/clang-fuzzer: Stack-overflow in clang::DiagnosticIDs::isUnrecoverable

2018-12-09 Thread ClusterFuzz-External via monorail via llvm-bugs

Status: New
Owner: 
CC: k...@google.com, masc...@google.com, jdevlieg...@apple.com,  
igm...@gmail.com, eney...@google.com, llvm-b...@lists.llvm.org,  
j...@chromium.org, v...@apple.com, mitchphi...@outlook.com,  
xpl...@gmail.com, akils...@apple.com
Labels: ClusterFuzz Stability-Memory-AddressSanitizer Reproducible  
Engine-libfuzzer Proj-llvm Reported-2018-12-10

Type: Bug

New issue 11795 by ClusterFuzz-External: llvm/clang-fuzzer: Stack-overflow  
in clang::DiagnosticIDs::isUnrecoverable

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11795

Detailed report: https://oss-fuzz.com/testcase?key=5751748677861376

Project: llvm
Fuzzer: libFuzzer_llvm_clang-fuzzer
Fuzz target binary: clang-fuzzer
Job Type: libfuzzer_asan_llvm
Platform Id: linux

Crash Type: Stack-overflow
Crash Address: 0x7fff5ac75b08
Crash State:
  clang::DiagnosticIDs::isUnrecoverable
  clang::DiagnosticIDs::ProcessDiag
  clang::DiagnosticsEngine::EmitCurrentDiagnostic

Sanitizer: address (ASAN)

Regressed:  
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=201803270519:201803280525


Reproducer Testcase:  
https://oss-fuzz.com/download?testcase_id=5751748677861376


Issue filed automatically.

See https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md for  
more information.


When you fix this bug, please
  * mention the fix revision(s).
  * state whether the bug was a short-lived regression or an old bug in any  
stable releases.

  * add any other useful information.
This information can help downstream consumers.

If you need to contact the OSS-Fuzz team with a question, concern, or any  
other feedback, please file an issue at  
https://github.com/google/oss-fuzz/issues.


--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 39933] New: Clang prints incorrect diagnostic notes chain for an implicitly deleted move assignment operator

2018-12-09 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=39933

Bug ID: 39933
   Summary: Clang prints incorrect diagnostic notes chain for an
implicitly deleted move assignment operator
   Product: clang
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: Frontend
  Assignee: unassignedclangb...@nondot.org
  Reporter: ori...@gmx.fr
CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
richard-l...@metafoo.co.uk

Consider the following code:

struct A { A& operator=(A&&); };
struct B { B(B&&); };
//struct B { B(B&&); B& operator=(B&&); };
struct C { A a; B b; };
struct D { C c; D& operator=(D&&) = default; };

Since https://reviews.llvm.org/rL343285 it triggers
-Wdefaulted-function-deleted: operator=(D&&) can not be defaulted because
operator=(B&&) is missing. (The fix is to use the commented out definition of
B.) However, Clang prints:

x.cpp:5:20: warning: explicitly defaulted move assignment operator is
implicitly deleted [-Wdefaulted-function-deleted]
struct D { C c; D& operator=(D&&) = default; };
   ^
x.cpp:5:14: note: move assignment operator of 'D' is implicitly deleted because
field 'c' has a deleted move assignment operator
struct D { C c; D& operator=(D&&) = default; };
 ^
x.cpp:4:14: note: copy assignment operator of 'C' is implicitly deleted because
field 'a' has a deleted copy assignment operator
struct C { A a; B b; };
 ^
x.cpp:1:15: note: copy assignment operator is implicitly deleted because 'A'
has a user-declared move assignment operator
struct A { A& operator=(A&&); };
  ^

All these diagnostics are true, but the "copy assignment operator of 'C' is
implicitly deleted" and the following are irrelevant, since what D needs from C
is a move assignment operator. The diagnostics do not even mention the culprit
B.

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs