[libc++] Fix constraints for `optional`'s constructors taking `in_place_t` and related `make_optional` overloads (#173467)
Some constraints are incorrect for constructors of `optional<T&>`:
- for the `(in_place_t, Arg&&)` constructor, it should be more
constrained to reject dangling references;
- for the `(in_place_t, initializer_list<U>, Args&&...)` constructor, it
shouldn't be available for `optional<T&>` at all.
For `make_optional` overloads, the standard wording already required
them to propagate SFINAE constraints before LWG3627 (via "_Effects_:
Equivalent to", see also [structure.specifications]/4). So they need to
be constrained.
Drive-by: Refactor test files to run more cases during constant
evaluation.
[-Wunsafe-buffer-usage] Fix a false negative introduced in #173096 (#174253)
A downstream test recovers a false negative introduced in #173096, where
it changed the use of variable `FmtArgIdx` to `FmtArgStartingIdx`. The
two variables are different in that `FmtArgIdx` refers to the index of
the format string and `FmtArgStartingIdx` refers to the index of the
first format argument. The consequence is that the analysis will miss
reporting an unsafe format string.
This fix also upstreams the test catching the FN.
[acc] add RegionBranchTerminatorOpInterface to acc.terminator (#174165)
This further helps with propagation in data flow analysis through acc
regions. Also cleaned up some comments in the unit test.
[asan] Adjust interception compatibility for AIX (#131870)
Adjust asan interceptor compatbility for AIX. AIX uses dlsym to retrieve
addresses of exported functions. However, some functions in libc.a, such
as memcpy, are not exported, so we currently have a limitation in
retrieving these addresses.
Issue: https://github.com/llvm/llvm-project/issues/138916
[TableGen] Remove TypeInfer::isConcrete/getConcrete. NFC (#174235)
These don't use any state from TypeInfer and only wrap methods in
TypeSetByHwMode. We can use the TypeSetByHwMode methods directly.
[clang-doc] Add friends to class template (#173960)
This patch also allows comments to be associated with friend
declarations. Currently, it seems like the comments for friend `RecordDecl`
are taken from the actual class declaration, while a friend
function's comments are taken from the actual `friend` declaration.
[VPlan] Simplify ~VPDef (NFCI).
Slightly simplify ~VPDef to avoid setting Def to nullptr, which is done
when remove the VPValue from VPDef, via VPValue's destructor.
Also use to_vector() instead of make_early_inc_range; as this is a
vector that may get modified, to_vector is appropriate.
[clang-doc] Add friends to class template
This patch also allows comments to be associated with friend
declarations. Currently, it seems like the comments for friend `RecordDecl`
are taken from the actual class declaration, while a friend
function's comments are taken from the actual `friend` declaration.
[clang-doc] Add nested records to class template (#173959)
Nested records already had some tags, but they weren't
compatible with the current JSON scheme.