SuccessChanges

Summary

  1. [clang-offload-bundler] Add option -allow-missing-bundles (details)
  2. [sanitizer-common] Pickup llvm-symbolizer from $OUT/bin IFF exists. (details)
  3. PR47474: Add test for Clang's current behavior. (details)
  4. Print source location in the error message when parens are missing around sizeof typename and the expression is inside macro expansion (details)
Commit b9fb063e63c7959e8bc9b424bd34b266ca826826 by Yaxun.Liu
[clang-offload-bundler] Add option -allow-missing-bundles

There are out-of-tree tools using clang-offload-bundler to extract
bundles from bundled files. When a bundle is not in the bundled
file, clang-offload-bundler is expected to emit an error message
and return non-zero value. However currently clang-offload-bundler
silently generates empty file for the missing bundles.

Since OpenMP/HIP toolchains expect the current behavior, an option
-allow-missing-bundles is added to let clang-offload-bundler
create empty file when a bundle is missing when unbundling.
The unbundling job action is updated to use this option by
default.

clang-offload-bundler itself will emit error when a bundle
is missing when unbundling by default.

Changes are also made to check duplicate targets in -targets
option and emit error.

Differential Revision: https://reviews.llvm.org/D93068
The file was modifiedclang/test/Driver/clang-offload-bundler.c
The file was modifiedclang/tools/clang-offload-bundler/ClangOffloadBundler.cpp
The file was modifiedclang/test/Driver/openmp-offload.c
The file was modifiedclang/test/Driver/hip-toolchain-rdc-separate.hip
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
Commit 30d292ddbb7ec84b422738cf52ee0cf49b0369f3 by 31459023+hctim
[sanitizer-common] Pickup llvm-symbolizer from $OUT/bin IFF exists.

Fix-forward for D93352.

Slight rework of the same idea, pickup the external symbolizer from the
binary directory iff it exists.
The file was modifiedcompiler-rt/test/sanitizer_common/lit.common.cfg.py
The file was modifiedcompiler-rt/test/sanitizer_common/lit.site.cfg.py.in
Commit 735ab86b811e40f1533ced98dfc4b7a0c09c545b by richard
PR47474: Add test for Clang's current behavior.

Our current behavior rejects the example, following the current language
rules, but it's likely the rules will be revised to allow this example.
The file was modifiedclang/test/SemaCXX/cxx2a-destroying-delete.cpp
Commit e53b9f733a7cb0a5da372b73ab6b7711c0300d65 by richard
Print source location in the error message when parens are missing around sizeof typename and the expression is inside macro expansion

Given the following code:

```
void Foo(int);

void Baz()
{
Bar(sizeof int);
}
```

The error message which is printed today is this:
```
error: expected parentheses around type name in sizeof expression
```

There is no source location printed whatsoever, so fixing a compile break like this becomes extremely hard in a large codebase.

My change improves the error message. But it doesn't output a FixItHint because I wasn't able to figure out how to get the locations for left and right parens. So any tips would be appreciated.

```
<source>:7:6: error: expected parentheses around type name in sizeof expression
        Bar(sizeof int);
            ^
```

Reviewed By: rsmith

Differential Revision: https://reviews.llvm.org/D91129
The file was modifiedclang/lib/Parse/ParseExpr.cpp
The file was addedclang/test/Parser/sizeof-missing-parens.c