Commit Graph

6298 Commits

Author SHA1 Message Date
yronglin
111c1ba5b4
[NFC][Clang] Fix test constexpr-function-recovery-crash.cpp (#65269)
Signed-off-by: yronglin <yronglin777@gmail.com>
2023-09-05 23:21:44 +08:00
Corentin Jabot
890f11d60f [Clang] Realize generic lambda call operators are dependent sooner
When parsing a trailing return type / noexcept / constraint
of a generic lambda, we need to know that we are in a dependent
context. We currently don't because we only create a TemplateDecl
for the call operator one its fully parsed.

This patch attach a template decl to the call operator as soon
as the parameter declaration clause is parsed - the point at which
we  have collected all template parameters

Fixes #64689

Reviewed By: erichkeane

Differential Revision: https://reviews.llvm.org/D159358
2023-09-02 08:05:49 +02:00
Podchishchaeva, Mariya
e4e56f91df [clang] Emit Wformat for bool value and char specifier confusion in scanf
Fixes https://github.com/llvm/llvm-project/issues/64987

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D159279
2023-09-01 01:38:07 -07:00
Younan Zhang
2fd01d75a8 [clang] Construct ExprRequirement with SubstitutionDiagnostic on SubstFailure
We're expecting a SubstitutionDiagnostic in diagnoseUnsatisfiedRequirement
if the status of ExprRequirement is SubstFailure. Previously, the Requirement
was created with Expr on SubstFailure by mistake, which could lead to the
assertion failure in the subsequent diagnosis.

Fixes https://github.com/clangd/clangd/issues/1726
Fixes https://github.com/llvm/llvm-project/issues/64723
Fixes https://github.com/llvm/llvm-project/issues/64172

In addition, this patch also fixes an invalid test from D129499.

Reviewed By: erichkeane

Differential Revision: https://reviews.llvm.org/D158061
2023-09-01 15:49:39 +08:00
Nick Desaulniers
cfa578cde0 [Sema] add test cases for D152495 NFC
Ensure these don't regress the next time we reland D152495.

Link: https://github.com/ClangBuiltLinux/linux/issues/1926

Reviewed By: cor3ntin, MaskRay

Differential Revision: https://reviews.llvm.org/D159307
2023-08-31 14:17:41 -07:00
Nick Desaulniers
f0f395e00e Revert "Reland "[Clang][SemaCXX] Add unused warning for variables declared in condition expressions""
This reverts commit 92023b1509.

Further issues were uncovered:
- False positive -Wunused-variable on function-static variables with the
  used attribute. https://github.com/ClangBuiltLinux/linux/issues/1926
  A test case needs to be added for this.
- Request for a new flag for these.
  https://reviews.llvm.org/D152495#4628877
  https://reviews.llvm.org/D152495#4628887
2023-08-31 11:58:41 -07:00
Hans Wennborg
a4fbc09184 Clang: Don't warn about unused private fields of types declared maybe_unused
The compiler should not warn on code such as:

  class [[maybe_unused]] MaybeUnusedClass {};
  class C {
    MaybeUnusedClass c;
  };

Patch based on comments on the bug by Shafik and Aaron.

Fixes #61334

Differential revision: https://reviews.llvm.org/D159083
2023-08-30 09:06:39 +02:00
Serge Pavlov
8859c644ed [clang][test] Make check pattern shorter
A check pattern in clang/test/SemaCXX/template-64605.cpp contains template
specialization kind (the text "implicit_instantiation"). It does not need to
be checked and can be safely removed.

Presence of this text in the check pattern prevents from backporting some
commits to the release branch: https://github.com/llvm/llvm-project/issues/64605.
It has only recently been printed and the relevant commit is not present in
the release/17.x branch.
2023-08-30 13:08:48 +07:00
Takuya Shimizu
92023b1509 Reland "[Clang][SemaCXX] Add unused warning for variables declared in condition expressions"
This patch marks the declarations with initializations in condition expressions such as
if (int var = init) as unused and unreferenced so that -Wunused can warn on them.

Fixes https://github.com/llvm/llvm-project/issues/61681

Reviewed By: cor3ntin
Differential Revision: https://reviews.llvm.org/D152495
2023-08-30 10:05:10 +09:00
Shafik Yaghmour
6f30ef3601 [Clang] Modify Parser::ParseLambdaExpressionAfterIntroducer to check whether the lambda-declarator is valid
We had a couple of crashes due to invalid lambda trailing return types that
were diagnosed but not treated as errors during parsing. So now in
Parser::ParseLambdaExpressionAfterIntroducer(...) after ActOnStartOfLambdaDefinition(...)
we also check if the lambda-declarator is invalid and if so we end up in ActOnLambdaError(...).

Fixes: https://github.com/llvm/llvm-project/issues/64962
https://github.com/llvm/llvm-project/issues/28679

Differential Revision: https://reviews.llvm.org/D158808
2023-08-29 11:28:57 -07:00
Podchishchaeva, Mariya
bcc881161a [clang] Emit an error if variable ends up with incomplete array type
This adds an error if variable with incomplete type has initializer with
incomplete type, so it is not possible to deduce array size from
initializer.

Fixes https://github.com/llvm/llvm-project/issues/37257

Reviewed By: aaron.ballman, shafik

Differential Revision: https://reviews.llvm.org/D158615
2023-08-29 06:50:32 -07:00
Aaron Ballman
a02f9a7756 Revert "[clang] Enable sized deallocation by default in C++14 onwards"
This reverts commit 2916b125f6.

Reverting due to failures on:
https://lab.llvm.org/buildbot/#/builders/216/builds/26407
https://lab.llvm.org/staging/#/builders/247/builds/5659
http://45.33.8.238/win/83485/step_7.txt
2023-08-29 09:36:59 -04:00
wangpc
2916b125f6 [clang] Enable sized deallocation by default in C++14 onwards
Since C++14 has been released for about nine years and most standard
libraries have implemented sized deallocation functions, it's time to
make this feature default again.

Reviewed By: rnk, aaron.ballman, #libc, ldionne, Mordante, MaskRay

Differential Revision: https://reviews.llvm.org/D112921
2023-08-29 15:42:50 +08:00
Aaron Ballman
0f1c1be196 [clang] Remove rdar links; NFC
We have a new policy in place making links to private resources
something we try to avoid in source and test files. Normally, we'd
organically switch to the new policy rather than make a sweeping change
across a project. However, Clang is in a somewhat special circumstance
currently: recently, I've had several new contributors run into rdar
links around test code which their patch was changing the behavior of.
This turns out to be a surprisingly bad experience, especially for
newer folks, for a handful of reasons: not understanding what the link
is and feeling intimidated by it, wondering whether their changes are
actually breaking something important to a downstream in some way,
having to hunt down strangers not involved with the patch to impose on
them for help, accidental pressure from asking for potentially private
IP to be made public, etc. Because folks run into these links entirely
by chance (through fixing bugs or working on new features), there's not
really a set of problematic links to focus on -- all of the links have
basically the same potential for causing these problems. As a result,
this is an omnibus patch to remove all such links.

This was not a mechanical change; it was done by manually searching for
rdar, radar, radr, and other variants to find all the various
problematic links. From there, I tried to retain or reword the
surrounding comments so that we would lose as little context as
possible. However, because most links were just a plain link with no
supporting context, the majority of the changes are simple removals.

Differential Review: https://reviews.llvm.org/D158071
2023-08-28 12:13:42 -04:00
Podchishchaeva, Mariya
5ade434a7e [clang] Fix assertion fail when function has cleanups and fatal errors
Fixes https://github.com/llvm/llvm-project/issues/48974

Reviewed By: shafik

Differential Revision: https://reviews.llvm.org/D158827
2023-08-28 02:25:57 -07:00
Shafik Yaghmour
33b6b67462 [clang] Fix crash in __builtin_strncmp and other related builtin functions
The implementation of __builtin_strncmp and other related builtins function use
getExtValue() to evaluate the size argument. This can cause a crash when the
value does not fit into an int64_t value, which is can be expected since the
type of the argument is size_t.

The fix is to switch to using getZExtValue().

This fixes: https://github.com/llvm/llvm-project/issues/64876

Differential Revision: https://reviews.llvm.org/D158557
2023-08-25 13:54:50 -07:00
Félix Cloutier
04e6178ae9
[Sema] tolerate more promotion matches in format string checking
It's been reported that when using __attribute__((format)) on non-variadic
functions, certain values that normally get promoted when passed as variadic
arguments now unconditionally emit a diagnostic:

```c
void foo(const char *fmt, float f) __attribute__((format(printf, 1, 2)));
void bar(void) {
	foo("%g", 123.f);
	//   ^ format specifies type 'double' but the argument has type 'float'
}
```

This is normally not an issue because float values get promoted to doubles when
passed as variadic arguments, but needless to say, variadic argument promotion
does not apply to non-variadic arguments.

While this can be fixed by adjusting the prototype of `foo`, this is sometimes
undesirable in C (for instance, if `foo` is ABI). In C++, using variadic
templates, this might instead require call-site fixing, which is tedious and
arguably needless work:

```c++
template<typename... Args>
void foo(const char *fmt, Args &&...args) __attribute__((format(printf, 1, 2)));
void bar(void) {
	foo("%g", 123.f);
	//   ^ format specifies type 'double' but the argument has type 'float'
}
```

To address this issue, we teach FormatString about a few promotions that have
always been around but that have never been exercised in the direction that
FormatString checks for:

* `char`, `unsigned char` -> `int`, `unsigned`
* `half`, `float16`, `float` -> `double`

This addresses issue https://github.com/llvm/llvm-project/issues/59824.
2023-08-25 10:14:01 -07:00
Takuya Shimizu
615d812696 [clang][ExprConstant] Improve error message of compound assignment against uninitialized object
BEFORE this patch, compound assignment operator against uninitialized object such as uninit += 1 was diagnosed as subexpression not valid
This patch clarifies the reason for the error by saying that uninit is an uninitialized object.

Fixes https://github.com/llvm/llvm-project/issues/51536

Reviewed By: shafik, tbaeder
Differential Revision: https://reviews.llvm.org/D157855
2023-08-25 16:08:07 +09:00
Corentin Jabot
6824d156d5 [Clang] Fix a crash when an invalid immediate function call appears in a cast
Fixes #64949

Reviewed By: Fznamznon, erichkeane, shafik

Differential Revision: https://reviews.llvm.org/D158733
2023-08-25 08:50:41 +02:00
Podchishchaeva, Mariya
f4c886b6aa [clang] Properly print unnamed members in diagnostics
Use member's type when printing.
This also fixes a bug in warning diagnostic for out of order
initialization with designated initializers so it points to a valid
source location when an anonymous member is being initialized.

Fixes https://github.com/llvm/llvm-project/issues/63759

Reviewed By: aaron.ballman, shafik

Differential Revision: https://reviews.llvm.org/D158526
2023-08-24 07:24:29 -07:00
Corentin Jabot
3f98cdc815 [Clang] Always constant-evaluate operands of comparisons to nullptr
even if we know what the result is going to be.
There may be side effects we ought not to ignore,

Fixes #64923

Reviewed By: ChuanqiXu

Differential Revision: https://reviews.llvm.org/D158601
2023-08-24 16:11:10 +02:00
Corentin Jabot
158f4f30ad [Clang] Do not change the type of captured vars when checking lambda constraints
When checking the constraint of a lambda, we need to respect the constness
of the call operator when establishing the type of capture variables.

In D124351, this was done by adding const to the captured variable...
However, that would change the type of the variable outside of the scope
of the lambda, which is clearly not the desired outcome.

Instead, to ensure const-correctness, we need to populate
a LambdaScopeInfo with the capture variables before checking the
constraints of a generic lambda.

There is no changelog as I'd like to tentatively propose we backport
this change to RC3 as it is a regression introduced in the Clang 17
cycle.

Fixes #61267

Reviewed By: aaron.ballman, #clang-language-wg

Differential Revision: https://reviews.llvm.org/D158433
2023-08-24 16:10:08 +02:00
Reid Kleckner
0d9919d362 Revert "[Clang] CWG1473: do not err on the lack of space after operator"""
This reverts commit f2583f3acf.

There is a large body of non-conforming C-like code using format strings
like this:

  #define PRIuS "zu"
  void h(size_t foo, size_t bar) {
    printf("foo is %"PRIuS", bar is %"PRIuS, foo, bar);
  }

Rejecting this code would be very disruptive. We could decide to do
that, but it's sufficiently disruptive that I think it requires
gathering more community consensus with an RFC, and Aaron indicated [1]
it's OK to revert for now so continuous testing systems can see past
this issue while we decide what to do.

[1] https://reviews.llvm.org/D153156#4607717
2023-08-22 18:10:41 -07:00
Ziqing Luo
b58e528898 [-Wunsafe-buffer-usage] Stop generating incorrect fix-its for variable declarations with unsupported specifiers
We have to give up on fixing a variable declaration if it has
specifiers that are not supported yet.  We could support these
specifiers incrementally using the same approach as how we deal with
cv-qualifiers. If a fixing variable declaration has a storage
specifier, instead of trying to find out the source location of the
specifier or to avoid touching it, we add the keyword to a
canonicalized place in the fix-it text that replaces the whole
declaration.

Reviewed by: NoQ (Artem Dergachev), jkorous (Jan Korous)

Differential revision: https://reviews.llvm.org/D156192
2023-08-21 16:34:44 -07:00
Ziqing Luo
3a67b91238 [-Wunsafe-buffer-usage] Refactor to let local variable fix-its and parameter fix-its share common code
Refactor the code for local variable fix-its so that it reuses the
code for parameter fix-its, which is in general better. For example,
cv-qualifiers are supported.

Reviewed by: NoQ (Artem Dergachev), t-rasmud (Rashmi Mudduluru)

Differential revision: https://reviews.llvm.org/D156189
2023-08-21 14:50:04 -07:00
Podchishchaeva, Mariya
91088978d7 [clang] Report missing designated initializers in C++
Prior to this change clang didn't emit missing-field-initializers
warning for designated initializers. The comments say that it is done to
match gcc behavior. However, gcc behaves so only for C. For C++ warnings
are emitted.

Fixes https://github.com/llvm/llvm-project/issues/56628

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D157879
2023-08-21 02:05:34 -07:00
Serge Pavlov
73e5a70e67 [clang] Run test for concrete target
The test clang/test/SemaCXX/template-64605.cpp uses pragma FENV_ACCESS,
which is not supported on all targets. Restrict it to x86_64 only.
2023-08-21 13:23:06 +07:00
Serge Pavlov
0baf85c331 [clang] Set FP options in Sema when instantiating CompoundStmt
When an expression is instantiated, TreeTransform skips ImplicitCastExpr
nodes, assuming they are recreated when the instantiated expression is
built. It breaks functions that use non-default floating-point options,
because they are kept in these ImplicitCastExprs. In this case the
recreated ImplicitCastExpr takes FP options from the current Sema state
and not from AST node.

To fix this issue the FP options in Sema object are set when a compound
statement is cloned in TreeTransform.

This change fixes https://github.com/llvm/llvm-project/issues/64605
([Regression 16 -> 17] Template instantiation ignores FENV_ACCESS being
ON for both definition and instantiation).

Differential Revision: https://reviews.llvm.org/D158158
2023-08-21 12:36:41 +07:00
John Brawn
9e11a6d8fd [Sema] Fix handling of functions that hide classes
When a function is declared in the same scope as a class with the same
name then the function hides that class. Currently this is done by a
single check after the main loop in LookupResult::resolveKind, but
this can give the wrong result when we have a using declaration in
multiple namespace scopes in two different ways:

 * When the using declaration is hidden in one namespace but not the
   other we can end up considering only the hidden one when deciding
   if the result is ambiguous, causing an incorrect "not ambiguous"
   result.

 * When two classes with the same name in different namespace scopes
   are both hidden by using declarations this can result in
   incorrectly deciding the result is ambiguous. There's currently a
   comment saying this is expected, but I don't think that's correct.

Solve this by checking each Decl to see if it's hidden by some other
Decl in the same scope. This means we have to delay removing anything
from Decls until after the main loop, in case a Decl is hidden by
another that is removed due to being non-unique.

Differential Revision: https://reviews.llvm.org/D154503
2023-08-18 12:39:37 +01:00
Rashmi Mudduluru
2afcda693a [-Wunsafe-buffer-usage] Fix assertion failure in case of BindingDecl
Differential Revision: https://reviews.llvm.org/D158112#inline-1530312
2023-08-17 16:18:38 -07:00
Ziqing Luo
41279e870f [-Wunsafe-buffer-usage] Refactor and improve for parameter fix-its
- Factor out the code that will be shared by both parameter and local variable fix-its
- Add a check to ensure that a TypeLoc::isNull is false before using the TypeLoc
- Remove the special check for whether a fixing variable involves unnamed types. This check is unnecessary now.
- Move tests for cv-qualified parameters and unnamed types out of the "...-unsupported.cpp" test file.

Reviewed by: NoQ (Artem Dergachev)

Differential revision: https://reviews.llvm.org/D156188
2023-08-17 15:27:38 -07:00
Po-yao Chang
f2583f3acf [Clang] CWG1473: do not err on the lack of space after operator""
In addition:
  1. Fix tests for CWG2521 deprecation warning.
  2. Enable -Wdeprecated-literal-operator by default.

Differential Revision: https://reviews.llvm.org/D153156
2023-08-17 23:10:37 +08:00
John Brawn
6244e38406 [Sema] Add tests for handling of decls hidden by invalid decls
These tests check that invalid declarations don't hide any other
declarations, but valid declarations do hide invalid declarations.
2023-08-17 15:25:53 +01:00
Takuya Shimizu
b3469ce6f8 [clang][Analysis] Handle && and || against variable and its negation as tautology
This patch introduces a new warning flag -Wtautological-negation-compare grouped in -Wtautological-compare that warns on the use of && or || operators against a variable and its negation.
e.g. x || !x and !x && x
This also makes the -Winfinite-recursion diagnose more cases.

Fixes https://github.com/llvm/llvm-project/issues/56035

Differential Revision: https://reviews.llvm.org/D152093
2023-08-17 17:55:48 +09:00
Rashmi Mudduluru
cf1c64b94d [-Wunsafe-buffer-usage] Replace assert that declarations are always found
Differential Revision: https://reviews.llvm.org/D157018
2023-08-15 15:41:56 -07:00
Timo Stripf
3bfafc4f22 [clang][AST] TextNodeDumper learned to output template specialization kind
Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D157705
2023-08-15 15:46:31 +00:00
Corentin Jabot
98322d3eb4 Complete the implementation of P2361 Unevaluated string literals
The attributes changes were left out of Clang 17.
Attributes that used to take a string literal now accept an unevaluated
string literal instead, which means they reject numeric escape sequences
and strings literal with an encoding prefix - but the later was already
ill-formed in most cases.

We need to know that we are going to parse an unevaluated string literal
before we do - so we can reject numeric escape sequence,
so we derive from Attrs.td which attributes parameters are expected
to be string literals.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D156237
2023-08-15 14:13:13 +02:00
Takuya Shimizu
5aded521ea Revert "Reland "[Clang][SemaCXX] Add unused warning for variables declared in condition expressions""
This causes a lot of warning in sanitizer build:
https://lab.llvm.org/buildbot/#/builders/258/builds/5424
https://lab.llvm.org/buildbot/#/builders/36/builds/36560

This reverts commit 8e329caa94.
2023-08-15 19:54:51 +09:00
Takuya Shimizu
8e329caa94 Reland "[Clang][SemaCXX] Add unused warning for variables declared in condition expressions"
This patch marks the declarations with initializations in condition expressions such as
if (int var = init) as unreferenced so that -Wunused can warn on them.

Fixes https://github.com/llvm/llvm-project/issues/61681

Reviewed By: cor3ntin
Differential Revision: https://reviews.llvm.org/D152495
2023-08-15 17:24:13 +09:00
David Blaikie
19f2b68095 Make globals with mutable members non-constant, even in custom sections
Turned out we were making overly simple assumptions about which sections (& section flags) would be used when emitting a global into a custom section. This lead to sections with read-only flags being used for globals of struct types with mutable members.

Fixed by porting the codegen function with the more nuanced handling/checking for mutable members out of codegen for use in the sema code that does this initial checking/mapping to section flags.

Differential Revision: https://reviews.llvm.org/D156726
2023-08-14 22:25:42 +00:00
Matt Arsenault
9e3d9c9eae clang: Add __builtin_elementwise_sqrt
This will be used in the opencl builtin headers to provide direct
intrinsic access with proper !fpmath metadata.

https://reviews.llvm.org/D156737
2023-08-11 19:32:39 -04:00
Kadir Cetinkaya
7d259b36d2
Revert "[Sema] Fix handling of functions that hide classes"
This reverts commit d031ff3877.
See https://reviews.llvm.org/D154503#4576393 for a reproducer and
details.
2023-08-10 14:06:00 +02:00
Corentin Jabot
49e0495feb [Clang] Produce a warning instead of an error in unevaluated strings before C++26
Emiting an error on unexpected encoding prefix - which was allowed before C++26 -
caused build errors for a few users.
This downgrade the error to a warning on older language modes and C.

Reviewed By: aaron.ballman, hubert.reinterpretcast

Differential Revision: https://reviews.llvm.org/D156596
2023-08-10 09:43:20 +02:00
Corentin Jabot
ab4e4a6985 Revert "[Clang] Produce a warning instead of an error in unevaluated strings before C++26"
Causes build failure on bots after rebase.

This reverts commit 20e01167b1.
2023-08-10 08:47:57 +02:00
Corentin Jabot
20e01167b1 [Clang] Produce a warning instead of an error in unevaluated strings before C++26
Reviewed By: aaron.ballman, hubert.reinterpretcast

Differential Revision: https://reviews.llvm.org/D156596
2023-08-10 08:32:42 +02:00
yrong
a2132d72be [Clang] Fix the do while statement disappearing in AST when an error occurs in the conditional expression of the do while statement
```
constexpr int test() {
    do {} while (a + 1 < 10);
    return 0;
}
```
Before:
```
`-FunctionDecl 0x56512a172650 <./recovery.cpp:1:1, line:4:1> line:1:15 constexpr test 'int ()' implicit-inline
  `-CompoundStmt 0x56512a172860 <col:22, line:4:1>
    `-ReturnStmt 0x56512a172850 <line:3:5, col:12>
      `-IntegerLiteral 0x56512a172830 <col:12> 'int' 0
```
Now:
```
`-FunctionDecl 0x5642c4804650 <./recovery.cpp:1:1, line:4:1> line:1:15 constexpr test 'int ()' implicit-inline
  `-CompoundStmt 0x5642c48048e0 <col:22, line:4:1>
    |-DoStmt 0x5642c4804890 <line:2:5, col:28>
    | |-CompoundStmt 0x5642c4804740 <col:8, col:9>
    | `-BinaryOperator 0x5642c4804870 <col:18, col:26> '<dependent type>' contains-errors '<'
    |   |-BinaryOperator 0x5642c4804850 <col:18, col:22> '<dependent type>' contains-errors '+'
    |   | |-RecoveryExpr 0x5642c4804830 <col:18> '<dependent type>' contains-errors lvalue
    |   | `-IntegerLiteral 0x5642c48047b0 <col:22> 'int' 1
    |   `-IntegerLiteral 0x5642c48047f0 <col:26> 'int' 10
    `-ReturnStmt 0x5642c48048d0 <line:3:5, col:12>
      `-IntegerLiteral 0x5642c48048b0 <col:12> 'int' 0
```

Reviewed By: hokein

Differential Revision: https://reviews.llvm.org/D157195
2023-08-08 19:34:43 +08:00
Podchishchaeva, Mariya
38cf47f037 [clang] Error on substitution failure within lambda body inside a requires-expression
Per CWG 2672 substitution failure within the body of a lambda inside a
requires-expression should be a hard error.

Fixes https://github.com/llvm/llvm-project/issues/64138

Reviewed By: cor3ntin

Differential Revision: https://reviews.llvm.org/D156993
2023-08-08 01:08:38 -07:00
Takuya Shimizu
24c91d4432 [clang][ExprConstant] Fix crash on uninitialized base class subobject
This patch fixes the reported regression caused by D146358 through adding notes about an uninitialized base class when we diagnose uninitialized constructor.

This also changes the wording from the old one in order to make it clear that the uninitialized subobject is a base class and its constructor is not called.
Wording changes:
BEFORE: `subobject of type 'Base' is not initialized`
AFTER: `constructor of base class 'Base' is not called`

Fixes https://github.com/llvm/llvm-project/issues/63496

Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D153969
2023-08-08 15:53:17 +09:00
Shivam Gupta
a845252337 Revert "[Clang] Fix -Wconstant-logical-operand when LHS is a constant"
This reverts commit dfdfd306cf.

An issue is reported for wrong warning, this has to be reconsidered.

Differential Revision: https://reviews.llvm.org/D157352
2023-08-08 08:00:02 +05:30
Nico Weber
0342bbf223 Revert "Anonymous unions should be transparent wrt [[clang::trivial_abi]]."
This reverts commit bddaa35177.
Reverting as requested at https://reviews.llvm.org/D155895#4566945
(for breaking tests on Windows).
2023-08-07 15:48:23 -04:00