SuccessChanges

Summary

  1. [clangd] Actually parse Index section of the YAML file. (details)
  2. [clang-tidy] Crash fix for bugprone-misplaced-pointer-arithmetic-in-alloc (details)
  3. [ASTMatchers] Fix `hasBody` for the descendants of `FunctionDecl` (details)
  4. CGBlocks.cpp - assert non-null CGF pointer. NFCI. (details)
  5. TokenAnnotator.cpp - remove useless pointer null test. NFCI. (details)
  6. [AST] ASTReader::ReadModuleMapFileBlock - assert non-null Module. NFCI. (details)
  7. Update dead links to Itanium and ARM ABIs. NFC (details)
  8. [Sema] isOpenMPCapturedDecl - assert we locate CapturedRegionScopeInfo. NFCI. (details)
Commit 7029e5d4ca20d20982da8efe89de27acd8d7d75b by adamcz
[clangd] Actually parse Index section of the YAML file.

This fixes a bug in dbf486c0de92c76df77c1a1f815cf16533ecbb3a, which
introduced the Index section of the config, but did not register the
parse method, so it didn't work in a YAML file (but did in a test).

Differential Revision: https://reviews.llvm.org/D87710
The file was modifiedclang-tools-extra/clangd/unittests/ConfigYAMLTests.cpp (diff)
The file was modifiedclang-tools-extra/clangd/ConfigYAML.cpp (diff)
Commit 779a2a2edcea89ad5f5bf99eeac90516542159d9 by adam.balogh
[clang-tidy] Crash fix for bugprone-misplaced-pointer-arithmetic-in-alloc

Placement new operators on non-object types cause crash in
`bugprone-misplaced-pointer-arithmetic-in-alloc`. This patch fixes this
issue.

Differential Revision: https://reviews.llvm.org/D87683
The file was modifiedclang-tools-extra/test/clang-tidy/checkers/bugprone-misplaced-pointer-arithmetic-in-alloc.cpp (diff)
The file was modifiedclang-tools-extra/clang-tidy/bugprone/MisplacedPointerArithmeticInAllocCheck.cpp (diff)
Commit dbd45b2db8e0c396fa20d4c72734c4f31f54af96 by adam.balogh
[ASTMatchers] Fix `hasBody` for the descendants of `FunctionDecl`

//AST Matcher// `hasBody` is a polymorphic matcher that behaves
differently for loop statements and function declarations. The main
difference is the for functions declarations it does not only call
`FunctionDecl::getBody()` but first checks whether the declaration in
question is that specific declaration which has the body by calling
`FunctionDecl::doesThisDeclarationHaveABody()`. This is achieved by
specialization of the template `GetBodyMatcher`. Unfortunately template
specializations do not catch the descendants of the class for which the
template is specialized. Therefore it does not work correcly for the
descendants of `FunctionDecl`, such as `CXXMethodDecl`,
`CXXConstructorDecl`, `CXXDestructorDecl` etc. This patch fixes this
issue by using a template metaprogram.

The patch also introduces a new matcher `hasAnyBody` which matches
declarations which have a body present in the AST but not necessarily
belonging to that particular declaration.

Differential Revision: https://reviews.llvm.org/D87527
The file was modifiedclang-tools-extra/clang-tidy/modernize/UseEqualsDeleteCheck.cpp (diff)
The file was modifiedclang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp (diff)
The file was modifiedclang/include/clang/ASTMatchers/ASTMatchersInternal.h (diff)
The file was modifiedclang/include/clang/ASTMatchers/ASTMatchers.h (diff)
Commit 4abb5cd83902f1351db473c720ee0b95ebdcb338 by llvm-dev
CGBlocks.cpp - assert non-null CGF pointer. NFCI.

Fixes static analyzer warning.
The file was modifiedclang/lib/CodeGen/CGBlocks.cpp (diff)
Commit aa1e15dda9e5941611f2183ba34087c2d02beb1a by llvm-dev
TokenAnnotator.cpp - remove useless pointer null test. NFCI.

We dereference the Left pointer throughout the parseParens() function apart from this single case - just add an non-null assertion and drop the check.

Fixes clang static analayzer null dereference warning.
The file was modifiedclang/lib/Format/TokenAnnotator.cpp (diff)
Commit 439f5749d978acfa69f1a2d20c797c3fc0d97989 by llvm-dev
[AST] ASTReader::ReadModuleMapFileBlock - assert non-null Module. NFCI.

At this stage the Module* shouldn't be null - add an assert to fix a clang static analyzer warning.
The file was modifiedclang/lib/Serialization/ASTReader.cpp (diff)
Commit f5c7102dbc7223e98ce5c0f02b343ed92062987c by sam.mccall
Update dead links to Itanium and ARM ABIs. NFC
The file was modifiedclang/lib/CodeGen/ItaniumCXXABI.cpp (diff)
Commit 0a0abc0ede0ff8015e30aae89a3f89c7dc5b3f0f by llvm-dev
[Sema] isOpenMPCapturedDecl - assert we locate CapturedRegionScopeInfo. NFCI.

Fixes clang static analayzer null dereference warning.
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp (diff)