SuccessChanges

Summary

  1. Improve modeling of variable template specializations with dependent (details)
  2. [NFC][Attributor] Add missing override (details)
  3. [NFC][StackSafety] Count dataflow inputs (details)
  4. More cleanup after removing the ability to reference a dependent (details)
  5. [NFC][StackSafety] Add a couple of early returns (details)
  6. [clang] Allow DynTypedNode to store a TemplateArgumentLoc (details)
  7. [Concepts] Dump template arguments for immediately declared constraint. (details)
  8. [clang-tidy] Fix a crash in bugprone-not-null-terminated-result check when `__STDC_WANT_LIB_EXT1__` was undefined after definition. (details)
Commit 617007240cbfb97c8ccf6d61b0c4ca0bb62d43c9 by richard
Improve modeling of variable template specializations with dependent
arguments.

Don't build a variable template specialization declaration until its
scope and template arguments are non-dependent.

No functionality change intended, but the AST representation is now more
consistent with how we model other templates.
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/lib/Sema/SemaExprMember.cpp
The file was modifiedclang/lib/Sema/SemaTemplateInstantiateDecl.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/lib/Sema/SemaTemplate.cpp
Commit fbd33baa27f8acce24ea58013fda0c2421c928f9 by Vitaly Buka
[NFC][Attributor] Add missing override
The file was modifiedllvm/include/llvm/Transforms/IPO/Attributor.h
Commit 8d91ce8f589c0ab62bd782fd314cecdc979556f7 by Vitaly Buka
[NFC][StackSafety] Count dataflow inputs
The file was modifiedllvm/lib/Analysis/StackSafetyAnalysis.cpp
Commit a4ca710d9ca9a779a97050149a483f7a5b24dd02 by richard
More cleanup after removing the ability to reference a dependent
VarTemplateSpecializationDecl.
The file was modifiedclang/lib/Sema/SemaExpr.cpp
Commit 1970eefb17e9790ed8a1087805ac2a05a7f36727 by Vitaly Buka
[NFC][StackSafety] Add a couple of early returns
The file was modifiedllvm/lib/Analysis/StackSafetyAnalysis.cpp
Commit b1c7f84643ffa63e72733b7089cea89723b82afc by zeratul976
[clang] Allow DynTypedNode to store a TemplateArgumentLoc

The patch also adds a templateArgumentLoc() AST matcher.

Differential Revision: https://reviews.llvm.org/D85621
The file was modifiedclang/lib/ASTMatchers/ASTMatchersInternal.cpp
The file was modifiedclang/include/clang/ASTMatchers/ASTMatchersInternal.h
The file was modifiedclang/lib/AST/ASTTypeTraits.cpp
The file was modifiedclang/docs/LibASTMatchersReference.html
The file was modifiedclang/include/clang/ASTMatchers/ASTMatchers.h
The file was modifiedclang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
The file was modifiedclang/include/clang/AST/ASTTypeTraits.h
The file was modifiedclang/include/clang/ASTMatchers/ASTMatchFinder.h
The file was modifiedclang/lib/ASTMatchers/ASTMatchFinder.cpp
Commit 626d0f5818b223f04904c510eaa682db7a41c2dd by hokein.wu
[Concepts] Dump template arguments for immediately declared constraint.

The template arguments were dumped as part of the TemplateTypeParmDecl, which
was incorrect.

Differential Revision: https://reviews.llvm.org/D85282
The file was modifiedclang/lib/AST/TextNodeDumper.cpp
The file was modifiedclang/include/clang/AST/ASTNodeTraverser.h
The file was modifiedclang/test/AST/ast-dump-concepts.cpp
Commit 5965fbf81b25217c40b09b48bd808a8f4a5d4e89 by platonov.aleksandr
[clang-tidy] Fix a crash in bugprone-not-null-terminated-result check when `__STDC_WANT_LIB_EXT1__` was undefined after definition.

PP->getMacroInfo() returns nullptr for undefined macro, so we need to check this return value before dereference.
Stack dump:
```
#0 0x0000000002185e6a llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/llvm-project/build/bin/clang-tidy+0x2185e6a)
#1 0x0000000002183e8c llvm::sys::RunSignalHandlers() (/llvm-project/build/bin/clang-tidy+0x2183e8c)
#2 0x0000000002183ff3 SignalHandler(int) (/llvm-project/build/bin/clang-tidy+0x2183ff3)
#3 0x00007f37df9b1390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#4 0x000000000052054e clang::tidy::bugprone::NotNullTerminatedResultCheck::check(clang::ast_matchers::MatchFinder::MatchResult const&) (/llvm-project/build/bin/clang-tidy+0x52054e)
```

Reviewed By: hokein

Differential Revision: https://reviews.llvm.org/D85523
The file was addedclang-tools-extra/test/clang-tidy/checkers/bugprone-not-null-terminated-result-undef-stdc-want-lib-ext1.c
The file was modifiedclang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp