Skip to content
Unverified Commit 3caedfd1 authored by Balazs Benics's avatar Balazs Benics Committed by GitHub
Browse files

[clang] Fix pretty-printing assume_aligned attributes (#67331)

Inside `writePrettyPrintFunction()`, we check if we need to emit the
given argument:
```C++
if (!arg->isOptional() || arg->getIsOmitted() == "false") {
    FoundNonOptArg = true;
    continue;
}
```
For the `AssumeAligned` attribute, the second argument was optional, but
the `getIsOmitted()` returned `false`, thus we treated this argument as
**non-optional** in the end because of that disjunction.

It was because `getIsOmitted()` did not account for `Expr *` type, and
returned `false` on the fallthrough branch.

Fixes #67156
parent e39add89
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment