5 Commits

Author SHA1 Message Date
Aaron Ballman
3aaf0bed1c Account for whitespace in the test regex
Yet another amendment to 9bb28a18d962e8f6e3fa8f48bd2c6dc183154d26, this
addresses issues found in:
https://lab.llvm.org/buildbot/#/builders/188/builds/29204
2023-05-03 16:05:27 -04:00
Aaron Ballman
24f81228ab Speculative fix for 9bb28a18d962e8f6e3fa8f48bd2c6dc183154d26 2023-05-03 15:46:47 -04:00
Aaron Ballman
298d9becef Another fix for 9bb28a18d962e8f6e3fa8f48bd2c6dc183154d26
This addresses the issue found in:
https://lab.llvm.org/buildbot/#/builders/245/builds/7882

This time, the issue was that not every platform has the same alignment
values, so those were removed from the test case.
2023-05-03 15:27:59 -04:00
Aaron Ballman
b210ebe5c5 Fix test bot breakage from 9bb28a18d962e8f6e3fa8f48bd2c6dc183154d26
This addresses the issue found by:
https://lab.llvm.org/buildbot/#/builders/197/builds/4783
https://lab.llvm.org/buildbot/#/builders/188/builds/29201
2023-05-03 15:18:48 -04:00
Aaron Ballman
9bb28a18d9 [C2x] Update 'nullptr' implementation based on CD comments
We filed some CD ballot comments which WG14 considered during the
ballot comment resolution meetings in Jan and Feb 2023, and this
updates our implementation based on the decisions reached. Those
decisions were (paraphrased for brevity):

US 9-034 (REJECTED)
  allow (void *)nullptr to be a null pointer constant
US 10-035 (ACCEPTED)
  accept the following code, as in C++:
  void func(nullptr_t); func(0);
US 22-058 (REJECTED)
  accept the following code, as in C++:
  nullptr_t val; (void)(1 ? val : 0); (void)(1 ? nullptr : 0);
US 23-062 (REJECTED)
  reject the following code, as in C++:
  nullptr_t val; bool b1 = val; bool b2 = nullptr;
US 24-061 (ACCEPTED)
  accept the following code, as in C++:
  nullptr_t val; val = 0;
US 21-068 (ACCEPTED)
  accept the following code, as in C++:
  (nullptr_t)nullptr;
GB-071 (ACCEPTED)
  accept the following code, as in C++:
  nullptr_t val; (void)(val == nullptr);

This patch updates the implementation as appropriate, but is primarily
focused around US 10-035, US 24-061, and US 23-062 in terms of
functional changes.

Differential Revision: https://reviews.llvm.org/D148800
2023-05-03 14:50:15 -04:00