[all-commits] [llvm/llvm-project] bd1272: [clang] Ignore inline namespace for `hasName` (#10...
Alejandro Álvarez Ayllón via All-commits
all-commits at lists.llvm.org
Fri Oct 11 06:24:08 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bd12729a828c653da53f7182dda29982123913db
https://github.com/llvm/llvm-project/commit/bd12729a828c653da53f7182dda29982123913db
Author: Alejandro Álvarez Ayllón <alejandro.alvarez at sonarsource.com>
Date: 2024-10-11 (Fri, 11 Oct 2024)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/include/clang/AST/PrettyPrinter.h
M clang/lib/AST/Decl.cpp
M clang/lib/AST/TypePrinter.cpp
M clang/lib/ASTMatchers/ASTMatchersInternal.cpp
M clang/lib/CodeGen/CGDebugInfo.cpp
M clang/lib/CodeGen/CodeGenTypes.cpp
M clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
Log Message:
-----------
[clang] Ignore inline namespace for `hasName` (#109147)
Add a new enumeration `SuppressInlineNamespaceMode` to `PrintingPolicy` that
is explicit about how to handle inline namespaces. `SuppressInlineNamespace`
uses that enumeration now instead of a Boolean value.
Specializing a template from an inline namespace should be transparent.
For instance
```
namespace foo {
inline namespace v1 {
template<typename A>
void function(A&);
}
}
namespace foo {
template<>
void function<int>(int&);
}
```
`hasName` should match both declarations of `foo::function`.
Makes the behavior of `matchesNodeFullSlow` and `matchesNodeFullFast`
consistent, fixing an assert inside `HasNameMatcher::matchesNode`.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list